Mailing List Archive

Math Problems
Hello,

I installed Mediawiki 1.1.0, but there are no PNG images generated for
math formulas.

latex, dvips and convert are in the path and executable by the
webserver, and the following paths are writable:

$wgMathDirectory = "/var/www/wiki.mikrocontroller.net/upload/math";
$wgTmpDirectory = "/var/www/wiki.mikrocontroller.net/upload/tmp";

HTML formulas are displayed correctly, but no PNG image is created, both
$wgMathDirectory and $wgTmpDirectory are empty. The following message
appears in the Apache error log every time a formula is changed:

This is dvips(k) 5.86e Copyright 2001 Radical Eye Software (www.radicaleye.com)
' TeX output 2004.02.03:1832' ->
<texc.pro>. [1]

Any hints?

Andreas
Re: Math Problems [ In reply to ]
On Feb 3, 2004, at 09:35, Andreas Schwarz wrote:
> HTML formulas are displayed correctly, but no PNG image is created,
> both
> $wgMathDirectory and $wgTmpDirectory are empty. The following message
> appears in the Apache error log every time a formula is changed:

Please see the updated README file:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/wikipedia/phase3/math/
README?content-type=text%2Fplain&rev=1.4

First, stop texvc from deleting its temporary files. Edit render.ml and
add (* and *) around the 'Sys.remove' calls in unlink_all() to comment
them out. (Or just delete the lines.) Recompile texvc. This should
leave some fun looking files in the tmp directory on the next run. Try
manually converting the DVI file:

dvips -R -E longtempfilename.dvi -f >output.eps

See if that looks ok.

Now convert that to PNG:

convert -quality 100 -density 120 ps:- output.png <output.eps

Error messages from this last step are for some reason suppressed...
Note that convert shells out to Ghostscript (gs) among other things.

If you're lucky you'll see some obvious problem that can be corrected.
:) The Internet-Encyclopedia folks had a terrible time getting this
working because their login environment was, it turned out, on a
differently configured machine than the actual web server. You might
try putting the test shellouts into a PHP script to also check that
things run right under the web user's account.

-- brion vibber (brion @ pobox.com)