First off to create thumbnails of images you need to install ImageMagick, which gives you the incredibly handy convert program.
Second you can add maths support, using TeX, for this you need ocaml, latex and dvipng. Grab the required programs from MacPorts, they are available from Fink as well.
Tell ImageMagick where
Finally tell MediaWiki to use TeX, by editing your LocalSettings.php with $wgUseTeX = true;
Now math support should be good to go. Thank to this compilation of advice for assistance.
So now this wikitext will produce the following:-
sudo port install ImageMagick
-
sudo port install ocaml
-
sudo port install tetex
-
sudo port install ghostscript
/opt/local/bin
to the four commands let cmd_dvips tmpprefix = "/opt/local/bin/dvips -R -E " ^ tmpprefix ^ ".dvi -f >" ^ tmpprefix ^ ".ps"Them recompile texvc with make, ocaml will take over here.
let cmd_latex tmpprefix = "/opt/local/bin/latex " ^ tmpprefix ^ ".tex >/dev/null"
let cmd_convert tmpprefix finalpath = "/usr/local/bin/convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps " ^ finalpath ^ " >/dev/null 2>/dev/null"
let cmd_dvipng tmpprefix finalpath = "/opt/local/bin/dvipng -gamma 1.5 -D 120 -T tight --strict " ^ tmpprefix ^ ".dvi -o " ^ finalpath ^ " >/dev/null 2>/dev/null"
Tell ImageMagick where
gs
is, by editing /opt/local/lib/ImageMagick-X.X.X/config/delegates.xml
, where X.X.X
is version number. Replaces every "gs"
with "/opt/local/bin/gs"
, only edit "gs"
entries, about half a dozen.Finally tell MediaWiki to use TeX, by editing your LocalSettings.php with $wgUseTeX = true;
Now math support should be good to go. Thank to this compilation of advice for assistance.
== Magical latex in action ==
<math>\left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace</math>
<math>x \implies y</math> an AMS command
<math>f(n) =
\begin{cases}
n/2, & \mbox{if }n\mbox{ is even} \\
3n+1, & \mbox{if }n\mbox{ is odd}
\end{cases}</math>
== Image thumbnail ==
[[Image:OpenSUSE.png|frame|Full size|center]]
[[Image:OpenSUSE.png|thumb|A thumbnail|center]]