Hi all, I have recently installed Mediawiki here at work and everything is going fine. During the install I thought that I wouldn't need maths formula rendering so didn't install imagemagic etc. Now it's a case of "silly me" as there is a mathematician here who used Tex when doing his PhD and would like to enter maths formula's on his pages.
I've subsequently set $whUseTex to true and then installed imagemagick etc. I next loaded one of his pages and get in red text:
Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert):
If I fire up a shell, I'm running Gentoo Linux with the version of Mediawiki being the latest, and type in:
latex
I get:
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) **
----------------------- dvips I get:
This is dvips(k) 5.95b Copyright 2005 Radical Eye Software (www.radicaleye.com) Missing DVI file argument (or -f). Try --help for more information.
----------------------- gs
I get:
GNU Ghostscript 8.16 (2005-05-09) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>
----------------------- convert I get:
Version: ImageMagick 6.2.6 05/18/06 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
Where options include: -adjoin join images into a single multi-image file -affine matrix affine transform matrix -annotate geometry text annotate the image with text -antialias remove pixel-aliasing ..... .... ... .. .
-----------------------
If I go into the ....../mediawiki/math directory view the README file and grab the bit of example code for texvc and run it:
texvc /tmp /home/samba/public "y=x+2" iso-8859-1
I get a nice *.png file with y = x+2 rendered on it.
I think I have all of the appropriate apps in place and within the PATH, all of the above was entered from /var/www/localhost/htdocs/mediawiki, although texvc is in the ....../mediawiki/math dir and I had to explicitly go into this dir for it to run. Can anyone think of what could be wrong and in turn point me in the right direction so that I can make the mathematician happy. Either a fix to my problem or where to look to start debugging would be greatly appreciated.
Regards, Andrew Lowe
On 5/23/06, Andrew Lowe andrew.lowe@quantm.net wrote:
[...] I've subsequently set $whUseTex to true and then installed imagemagick etc. I next loaded one of his pages and get in red text:
Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): [...] If I go into the ....../mediawiki/math directory view the README file and grab the bit of example code for texvc and run it:
texvc /tmp /home/samba/public "y=x+2" iso-8859-1
I get a nice *.png file with y = x+2 rendered on it.
I think I have all of the appropriate apps in place and within
the PATH, all of the above was entered from /var/www/localhost/htdocs/mediawiki, although texvc is in the ....../mediawiki/math dir and I had to explicitly go into this dir for it to run. [...]
texvc should print some characters on the screen, like
Cdaa63ef966cc412541190bc8794731de<i>y</i> ...
I assume that it does that.
Try running texvc as the user that the web server runs under, to see whether some permissions are set incorrectly. And try to simulate the command that MediaWiki uses:
$wgTexvc $wgTmpDirectory $wgTmpDirectory "y=x+2" $wgInputEncoding
where $wgTexvc, $wgTmpDirectory, and $wgInputEncoding are as set in LocalSettings.php. Unless you changed something, the command is:
./math/texvc /var/www/localhost/htdocs/mediawiki/images/tmp /var/www/localhost/htdocs/mediawiki/images/tmp "y=x+2" UTF-8
to be run from /var/www/localhost/htdocs/mediawiki .
Sorry not to give a more focused answer, but I don't know what could be the problem.
Good luck, Jitse
mediawiki-l@lists.wikimedia.org