Extension:WikiLogic


 * 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  tags. By informally, what is meant is that a user could write, for instance:
 * " ", or maybe

...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.

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.

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.

Parameters
Arguments can be specified when calling the extension: xyz

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.

Installation
The extension is stored in a file called  , the code for which is stored here. The file should be placed in your extensions folder.

To activate the extension, include it from your   with: ...and change any internal variables you need to, to alter its functionality.

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.