Extension:WikiLogic
This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.
|
Wikilogic Release status: experimental |
|
|---|---|
| Implementation | Tag |
| Description | Specific vernacular text conversion for Formal Logic |
| Author(s) | w:User:Alfakim |
| Last version | 0.93a (25-09-2006) |
| MediaWiki | 1.6 |
| License | No license specified |
| Download | Extension:WikiLogic/Syntax |
|
Check usage (experimental) |
|
- NOTE!: This is a development version. It has never been tested.
WikiLogic (previously, EasyLogic) is an extension for MediaWiki that adds the ability to informally write Formal Logic between <logic></logic> tags. By informally, what is meant is that a user could write, for instance:
- "
<logic>p AND s THEREFORE q OR ExFx</logic>", or maybe - "
<logic>a&b SO q V EXISTENTIALxGx</logic>"
...and the extension would parse all the logical words into the correct characters. Non-logical words remain untouched, and certain short-cut phrases (e.g. "E" for an existential quantifier) are also parsed.
These logical symbols cannot usually be written using a keyboard, and at least not without great pains, so the idea of the extension is to make writing logic easier. In this sense it is an informal, logic-based version of LaTeX.
There are internal options to output images rather than text, and external, parameter-controlled options to output a LaTeX or template string. The LaTeX does not yet work.
[edit] Usage
CAPITALS are converted to logic, lowercase are left as they are (constants or variables). Furthermore, individual characters can be escaped with "\", e.g. "\E" produces a literal "E" rather than the existential quantifier.
[edit] Logical symbols supported
Below is a list of the symbols supported by the extension. If you are using images, then each requires an image on your server stored at a directory (e.g. "/logic/") designated in the code for the extension.
Currently there are 22 logical symbols that this extension can convert text into. They are the main symbols of Propositional Logic, Quantifier Logic and Modal Logic and Set Theory logic.
[edit] Parameters
Arguments can be specified when calling the extension:
<logic argument="value" argument2="value2">xyz</logic>
Argument "output" can be set to "latex" or "template" to output a LaTeX or wikitext template string instead.
The argument "width" can be specified to determine the width of images if in image mode. The width is in CSS units, e.g. "1em", "20px", "1cm", etc.
[edit] Installation
The extension is stored in a file called WikiLogic.php, the code for which is stored here. The file should be placed in your extensions folder.
To activate the extension, include it from your LocalSettings.php with:
require_once("extensions/WikiLogic.php");
...and change any internal variables you need to, to alter its functionality.
[edit] Development
This extension was written by w:User:Alfakim to make it easier and less daunting for philosophy students to write Formal logic on a Wiki.
Currently the extension is quite crude, and a major improvement to it would be to combine it with the LaTeX engine so that it generates a .PNG file all by itself.
However, in the meantime, the extension can be easily improved by adding more symbols that it can convert.
