Recent Changes · Search:

Support the Project



edit SideBar


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.

  1. 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
  2. From the Cookbook:PublishPDF library:
    • move the cookbook/latexrender directory into the cookbook directory
    • move the pub/latexrender directory into the pub directory
  3. Add this to local/config.php:
  4. Edit $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)
  5. Make sure PmWiki has write access to the pub/latexrender/tmp and pub/latexrender/pictures directories
  6. Create a test page with an equation on it

\displaystyle \int_a^b f(x) dx

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 »

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 21 October 2011 at 08:14 PM