Extension:WikiTex/Installation

WikiTex Installation and Source code

The worker program
It is called with three arguments texconvert The texfile is a fully qualified random filename without extension which contains the plain tex file to be processed. It resides in a directory which is writeable by the process, thus a temp directory can be generated there. dpi is the resolution for the generated picture; the default is 120. Finally resultpicture is the fully qualified filename without the .png extension where the resulting png picture should be generated. The picture might exist prior to the call. The worker program should erase and not create the picture if there is any error. Otherwise the output should be OK:12.34 where the number after OK is the depth of the formula below the base line measured in points.

The bash script below uses two external programs: tex and dvipng. On a debian based linux distribution (such as UBUNTU) you can get these programs by issuing sudo apt-get install tetex-bin tetex-base tetex-extra dvipng Change the location of these program in the script below.

The extension program
Cut and copy the program below into the extension directory just below your main Mediawiki files, and name it ''WikiText.pnp".

LocalSettings.php
Put the following line somewhere at the end in your LocalSettings.php file: require_once( "extensions/WikiTex.php" );

Default CSS file
Formula numbers in displayed formulas use a special CSS setting which should be defined. Edit, as sysop, the MediaWiki:Common.css file. CSS placed there will be applied to all skins. Add the following CSS: