[Scummvm-devel] New Wiki extensions for math stuff
Max Horn
max at quendi.de
Wed Feb 10 11:56:13 CET 2010
Hi there,
as you may know, we didn't have support for the <math> MediaWiki tag
so far, as it required installing a TeX distribution on the web
server, which we can't do. Yesterday I discovered a replacement for
this based on jsMath <http://www.math.union.edu/~dpvc/jsMath/> which
renders TeX-style math formulas on the client side using JavaScript.
Here you can read about how to use it:
<http://wiki.scummvm.org/index.php/
Instructions_to_Wiki_Editors#JsMath>
And here is another brief example:
<http://wiki.scummvm.org/index.php/User:Fingolfin/Sandbox>
This is not perfect, as it requires JavaScript and has a certain
overhead when loading a page, but it also has advantages; like if you
increase the font size, then unlike the static PNGs generated by the
default MediaWiki code, this formulas created by jsMath scale along.
Also, you can download some free TrueType fonts from
<http://www.math.union.edu/~dpvc/jsMath/download/jsMath-fonts.html>
and
<http://www.math.union.edu/~dpvc/jsMath/download/extra-fonts/welcome.html
>
to speed up the rendering; as a side effect, this also makes it
possible to copy&paste the rendered formulas to a degree.
If your browser does not support JavaScript or is console based (say
w3m or links), you'll see the formulas in LaTeX notation; e.g. for my
sandbox, you'd see
[...]
Some math mode tests:
\displaystyle \sqrt{2}+\pi^{20+a_i} - \tfrac{23}{42}
\displaystyle \sum_{k=1}^n k = \frac{k(k+1)}{2}
[...]
To me as a mathematician (i.e. being used to reading LaTeX formulas),
this is actually a lot lot more readable than the alternative (using
HTML entities and unicode to encode the same formula); and the
graphical rendition looks better anyway.
Enjoy,
Max
More information about the Scummvm-devel
mailing list