Mailing List Archive

Secrets for Enabling TeX ?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

Greetings:

One of my users has asked me to enable TeX in our mediawiki. TeX is
installed on the box, so I went into Localsettings.php and changed $wgUseTeX
to true and tried loading an article with some math markup.

I get:
Failed to parse (unknown error): \sum_{n=0}.....

What am I missing?




AL


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Exmh version 2.5 01/15/2001

iQCVAwUBQEiE89uN3h5YyVRRAQJGlgQAk+aJXUx+4DHQxYPl1z/p3PZGccEwEfPc
65NGmC2PbiF4GlJhlq6vR3QLRUkhmQ5+oNL83BTEVGkVGaAXhqk3qgGk12XO4URp
SCejN6B5n+GS2vCpmd18tjPRF8LVhDvg4QhcmN1ahCiIML/60mAJ7TqXWPw9R2Hv
79DqFCFhHFE=
=KAfp
-----END PGP SIGNATURE-----


***********************************************************************
This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited. If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us
immediately.
***********************************************************************
Re: Secrets for Enabling TeX ? [ In reply to ]
On Mar 5, 2004, at 05:47, Al Potter wrote:
> One of my users has asked me to enable TeX in our mediawiki. TeX is
> installed on the box, so I went into Localsettings.php and changed
> $wgUseTeX
> to true and tried loading an article with some math markup.
>
> I get:
> Failed to parse (unknown error): \sum_{n=0}.....
>
> What am I missing?

TeX support is a little tricky, I'm afraid, and usually doesn't give
very helpful error messages. Here's the rundown on what you need
available in the PATH:

LaTeX (latex)
dvips
ImageMagick (convert)
GhostScript (gs)

Make sure those commands are available in the PATH for the web server.

You also need to have installed the support program 'texvc', which
verifies the TeX input, produces HTML text if possible, and sends it on
to the above programs for rasterization. You'll find texvc in the
'math' subdirectory of the MediaWiki tarball; you'll need ocaml 3.06 or
later to compile it. If Ocaml's installed, just go in and run 'make'.
(On BSD systems you need to use gmake.)

I've put a copy of the binary we use on Wikipedia, which should run
without need for installing ocaml, up at:
http://download.wikimedia.org/texvc-linux-x86-20040107.tar.gz
The texvc binary should go in a 'math' subdirectory under the location
where wiki.phtml is (or index.php in 1.2.0).

Make sure that the $wgMathDirectory and $wgTmpDirectory variables in
the config point to directories that are writable by the web server,
and $wgMathPath should point to the URI path to get to the
MathDirectory, which is where output .png files are put. The
TmpDirectory is used to hold intermediate files.

For troubleshooting, you might try manually running texvc to confirm it
works; see is README file.

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> Comment: Exmh version 2.5 01/15/2001

Incidenally, I'm unable to verify the GPG signature on your message:
gpg: Signature made Fri Mar 5 05:47:31 2004 PST using RSA key ID
58C95451
gpg: BAD signature from "Al Potter <apotter@planetcable.net>"

I'm using gpg 1.2.2 on Mac OS X.

-- brion vibber (brion @ pobox.com)