LaTeX on a shared host

''It is possible to run LaTex under a shared host, It might not be so beautiful but it works. If you wish to do this be aware that this is not an official hack.''

''I am writing this because I had a hard time finding the information, I found it on google's cache of an old forum which did not exist outside google's cache. Therefore I'm writing it here, so that other people might also find it.''


 * 1) Install wikimedia and make it work.
 * 2) Take a backup, things might get dirty! (Anyway it best to be on that safe side).
 * 3) Find a LaTex engine:
 * 4) if you have cgi support on your host install mimetex can be found on: http://www.forkosh.com/mimetex.html (there's also precompiled onthe page).
 * 5) If you don't have cgi support use a public mimetex server: http://www.forkosh.com/cgi-bin/mimetex.cgi (Found at http://www.forkosh.com/mimetex.html)
 * 6) Update: forkosh.com now has blocked other websites "borrowing" their CGI server. But you can google "cgi-bin/mimetex.cgi" and you can find a whole list of website running mimetex.cgi. You can try using one of those if your host doesn't support CGI (but it's always faster and stabler to use yours anyway).
 * 7) Update Update: forkosh.com states this http://www.forkosh.dreamhost.com/mimetex.cgi to be the new public CGI server.
 * 8) Open Math.php in $WikiPath/includes/Math.php and find this functions:

function renderMath( $tex ) { global $wgUser; $math = new MathRenderer( $tex ); $math->setOutputMode( $wgUser->getOption('math')); return $math->render; }


 * Replace it with:

function renderMath( $tex ) { ###Hacking Math.php #global $wgUser; #$math = new MathRenderer( $tex ); #$math->setOutputMode( $wgUser->getOption('math')); #return $math->render; return ""; }

''Where http://your_host/cgi-bin/mimetex.cgi? is the adresse of you mimetex installation or the public one.''

Then enable Tex in LocalSettings.php

Remember this wikimedia is not official, and may not work with some versions, I've tried version 1.5.5.
 * Also working on version 1.5.6 --80.62.185.50 00:03, 7 February 2006 (UTC)
 * Work fine on Mediawiki 1.6.3 --82.50.10.47 12:23, 17 April 2006 (UTC)
 * Commented out all existing lines of renderMath. $math and $wgUser are obviously not used in the patched version. This change has not been tested.  See page history for old version. --Archimerged 02:58, 27 May 2006 (UTC)