The Wikipublisher plug-in for PmWiki includes a recipe that adds support for the latexrender php class library. This is disabled by default. Here are instructions for installing and activating it.
- Install LATEX on the server running the PmWiki software — the recipe will not work without it; if necessary, ask the server administrator for help to do this
- From the Cookbook:PublishPDF library:
- move the cookbook/latexrender directory into the cookbook directory
- move the pub/latexrender directory into the pub directory
- Add this to local/config.php:
$FarmD/cookbook/latexrender/latexrender.php and set the correct paths to the latex, dvips, convert and identify binaries (the script includes a couple of options to illustrate)
- Make sure PmWiki has write access to the pub/latexrender/tmp and pub/latexrender/pictures directories
- Create a test page with an equation on it
If all is well, the page will display an equation. See LATEX Equations for some examples of the recipe in action.
Tip 1. The convert program uses gs (ghostscript) to convert the LATEX ps (postscript) output into an image. Make sure gs is installed and is in the web server’s search path. Under Mac OS X, for example, you need to make a symlink to gs:
sudo ln -s /usr/local/bin/gs /usr/bin/gs
Tip 2. If you wish to generate png images, uncomment the line in
$FarmD/cookbook/latexrender/latexrender.php that sets $LatexrenderImageFmt to ‘png’. See issue 00129.
Contributor: John Rankin, Friday, 26 September 2008.
« | Cookbook | Advanced Table Heads »