Hi Javier,

you might want to have a look at the math extension.

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMath/39c785dc30edc044f371f86e9cf2e2d777421992/MathTexvc.php#L204

There you see how it's done for calling texvc.
You might also want to consider to use LaTeXML instead of shelling out.
LaTeXML covers a wide range of LaTeX (including citations) and can be runs
as web-service, that produces MathML.

https://www.mediawiki.org/wiki/Extension:Math#LaTeXML

Best
Moritz





On Mon, Oct 7, 2013 at 3:14 AM, Javier Bezos <[email protected]> wrote:

> I'm not sure this is a problem in the server or in MediaWiki.
>
> I have an extension which calls a bash script with wfShellExec. The
> bash file consists essentially of
>
> touch $1.A
> latex $1
> dvipng $1
> touch $1.B
>
> The touch'es are just to see if the bash file is run. And indeed it's.
> However, neither .dvi nor .log files are created (which are the result
> of running latex). However, when running the script from the
> command line everything is ok.
>
> This extension is based on WikiTeX.php, and the lines calling the
> script are:
>
> $cmd =  wfEscapeShellArg( $wfTexConvert, $tempName, $dpi, "$storedir/$hash"
> );
> wfProfileIn( "TeX-shellexec" );
> $convtext = trim( wfShellExec( $cmd ) );
> wfProfileOut( "TeX-shellexec" );
>
> Any ideas about what's wrong? Perhaps some permission not set?
>
> By the way, TeX is TeXLive2012, installed separately, and the site is
> www.wikilengua.org .
>
> Javier
>
>
>
> --
> ______________________________
>
> Javier Bezos López
> T. 34 913 467 440
> www.fundeu.es
> www.wikilengua.org
> www.manualdeestilo.com
> Twitter <http://www.twitter.com/fundeu>,
> Facebook<http://www.facebook.com/fundeu>,
> YouTube <http://www.youtube.com/user/fundeu>y Google+<
> http://gplus.to/fundeu>
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



-- 
Mit freundlichen Grüßen
Moritz Schubotz

  Telefon (Büro):  +49 30 314 22784
  Telefon (Privat):+49 30 488 27330
  E-Mail: [email protected]
  Web: http://www.physikerwelt.de
  Skype: Schubi87
  ICQ: 200302764
  Msn: [email protected]
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to