From the WikiPublisher

Cookbook: Activate Latexrender

The Wikipublisher plug-in for PmWiki includes a recipe that adds support for the latexrender [1] 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.

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

If you wish to generate png (png is not gif) 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.


Copyright © 2005–2022 the Wikipublisher wiki and its authors



Retrieved from

Page last modified on 21 October 2011 at 08:14 PM