[Mediawiki-l] Problems with texvc Latex -- Help!

L K royliuk at hotmail.com
Tue Apr 11 03:10:43 UTC 2006


Hi,
Sorry to bother you guys here. 
I spent a whole day trying to enable Latex rendering in wiki. But failed...
I checked almost everything as folows.

1. texvc in the wiki_installation_path/math directory DOES work from the 
command line, but not from PHP. 

2. I checked the permission, the webserver has write permission on 
wiki_installation_path/images
wiki_installation_path/images/math
wiki_installation_path/images/tmp

3. File upload has no problem.

4. When I write <math>\sqrt{10}</math> and click the Save button, I got the 
following error msg

Failed to parse (unknown error/math/texvc 
'/afs/edu/users/roy/pub/www/wiki/images/tmp' 
'/afs/edu/users/roy/pub/www/wiki/images/math' ' \sqrt{10} ' 'utf-8'): 
\sqrt{10}

I think this error msg is generated by the following line from 
wiki_installation_path\includes\Math.php.

 return "<strong class='error'>$mf ($errmsg$append): $source </strong>\n"; 

-----------------------------------------------------------------------------

Here are what I observed.

1. In the Math.php file (source code can be found at 
http://wikipedia.sourceforge.net/doc//__filesource/fsource_MediaWiki__includesMath.php.html), 
there is a command 

$contents = `$cmd`;

Is this correct?  Should it be $contents = $cmd; ?
It seems that `$cmd` contains nothing.

2. If I change $contents = `$cmd`; to $contents = $cmd;

I will get the same error msg. However, in this case, I checked the 
variable 

$cmd = ./math/texvc '/afs/edu/users/roy/pub/www/wiki/images/tmp' 
'/afs/edu/users/roy/pub/www/wiki/images/math' ' \sqrt{10} ' 'utf-8'

$contents  is the same as $cmd

$retval = .

Now it seems that the unknown error results from the condition check of 
$retval.

How could this happen? What does variable $retval in Math.php acutally 
mean? 


Any help is much appreciated!
Best,

Roy





More information about the MediaWiki-l mailing list