Difference between revisions of "Enabling math markup"
(links) |
(Localsettings) |
||
| Line 7: | Line 7: | ||
Enabling math markup requires the following binaries [[W:LaTeX|latex]], [[W:dvips|dvips]], [[W:Ghostscript|gs]], and [[W:ImageMagick|ImageMagicks]] convert . These must all be available in $PATH. | Enabling math markup requires the following binaries [[W:LaTeX|latex]], [[W:dvips|dvips]], [[W:Ghostscript|gs]], and [[W:ImageMagick|ImageMagicks]] convert . These must all be available in $PATH. | ||
The binary ''texvc'' must also be available, either as a binary or source installation. | The binary ''texvc'' must also be available, either as a binary or source installation. | ||
| − | + | ==Installation of texvc== | |
| − | == | + | ==From source== |
#Note: OCaml 3.06 or later is required to compile texvc; this can be acquired from http://caml.inria.fr/ if your system doesn't have it available.'' The apt-get commands <code>apt-get install dvipng tetex-extra cjk-latex ocaml</code> (documented in [[Debian Post Install]]) install OCaml. | #Note: OCaml 3.06 or later is required to compile texvc; this can be acquired from http://caml.inria.fr/ if your system doesn't have it available.'' The apt-get commands <code>apt-get install dvipng tetex-extra cjk-latex ocaml</code> (documented in [[Debian Post Install]]) install OCaml. | ||
#Inside each mediawiki instance ./math directory there is a README file which documents the process involved to make an executable from source called ''texvc''. | #Inside each mediawiki instance ./math directory there is a README file which documents the process involved to make an executable from source called ''texvc''. | ||
| − | ==Binary | + | ==Binary== |
The <code> apt-get install mediawiki-math</code> creates the texvc executable in /usr/local/bin. | The <code> apt-get install mediawiki-math</code> creates the texvc executable in /usr/local/bin. | ||
| Line 25: | Line 25: | ||
Make sure the directories 'tmp' and 'math' under 'images' exist and are writable. | Make sure the directories 'tmp' and 'math' under 'images' exist and are writable. | ||
| − | + | ==LocalSettings.php customization== | |
| + | The following lines need to be added; | ||
| + | {{code|<PHP> | ||
| + | $wgUseTex = true; # and | ||
| + | $wgTexvc = 'usr/bin/texvc'; # alternative location from 'sudo apt-get install mediawiki-math' installation | ||
| + | $wgMathDirectory = "$IP/images/math"; # optional | ||
| + | </PHP> | ||
==See also== | ==See also== | ||
*[http://www.mwusers.com/forums/showthread.php?t=8168&highlight=math Thread on mwusers] | *[http://www.mwusers.com/forums/showthread.php?t=8168&highlight=math Thread on mwusers] | ||
Revision as of 07:02, 17 July 2008
| Enabling math markup Organic Design procedure |
Enabling math markup requires the following binaries latex, dvips, gs, and ImageMagicks convert . These must all be available in $PATH. The binary texvc must also be available, either as a binary or source installation.
Contents
Installation of texvc
From source
- Note: OCaml 3.06 or later is required to compile texvc; this can be acquired from http://caml.inria.fr/ if your system doesn't have it available. The apt-get commands
apt-get install dvipng tetex-extra cjk-latex ocaml(documented in Debian Post Install) install OCaml. - Inside each mediawiki instance ./math directory there is a README file which documents the process involved to make an executable from source called texvc.
Binary
The apt-get install mediawiki-math creates the texvc executable in /usr/local/bin.
You should then test that it works from the command line for example;
texvc /tmp /var/www/mediawiki-1.12.0/math "y=x+2" iso-8859-1
should create a file in /var/www/mediawiki-1.12.0/math.
Make sure the directories 'tmp' and 'math' under 'images' exist and are writable.
LocalSettings.php customization
The following lines need to be added; {{code|<PHP> $wgUseTex = true; # and $wgTexvc = 'usr/bin/texvc'; # alternative location from 'sudo apt-get install mediawiki-math' installation $wgMathDirectory = "$IP/images/math"; # optional </PHP>



