1 Static MathJax v0.1 README
2 #+AUTHOR: Jan Böcker <jan.boecker@jboecker.de>
4 Static MathJax is a XULRunner application which loads a HTML input
5 file that uses MathJax into a browser, waits until MathJax is done
6 processing, and then writes the formatted result to an output HTML
9 I have only tested exports from Emacs Org-mode as input files. (As of
10 2010-08-14, MathJax is used by default with HTML exports in the
11 current Org development version.)
13 Optionally, references to the math fonts used will be converted to
14 "data:" URIs, thus embedding the font data into the HTML file itself.
15 (see [[http://en.wikipedia.org/wiki/Data_URI_scheme]])
17 The code is licensed under the GNU General Public License version
18 2, or, at your option, any later version.
22 To run Static MathJax, an existing XULRunner installation is
23 required. From the directory to which you unpacked Static MathJax,
26 xulrunner application.ini <--embed-fonts | --final-mathjax-url <URL>>
27 <input file> <output file>
29 If you prefer to call "staticmathjax" instead of "xulrunner
30 application.ini", link xulrunner-stub into the directory:
31 ln /usr/lib/xulrunner-1.9.2.8/xulrunner-stub ./staticmathjax
34 name of the input file (the result of a HTML export
35 from Org-mode). It is assumed that this file uses the
36 UTF-8 character encoding.
39 name of the output file.
42 if specified, the math fonts will be embedded into
43 the output file using data: URIs
45 - --final-mathjax-url <URL> ::
46 if --embed-fonts is not specified, this
47 must be the URL to a MathJax installation folder (e.g. "MathJax"
48 if MathJax is installed in a subdirectory, or
49 "http://orgmode.org/mathjax" to use the version hosted on the Org
52 All references to math fonts in the output file will point to
57 The input file must not use a MathJax installation on the
58 web. Otherwise, due to a security feature of Firefox, MathJax will
59 fallback to image fonts. If you have unpacked MathJax to a
60 subdirectory "MathJax", specify the following in your Org file:
62 #+MathJax: path:"MathJax"
64 The math is rendered in Firefox, so MathJax applies its
65 Firefox-specific settings. When viewing the output files in other
66 browsers, it will look slightly different than the result that
67 running MathJax in that browser would produce.
69 Internet Explorer does not use the correct font, because it only
70 supports the EOT font format. For all other browsers (including
71 Firefox), MathJax uses the OTF font format.
73 Embedding fonts into the HTML file wastes some space due to the
74 base64 encoding used in data: URIs.
76 I have found no way to access stdout or set an exit code in an
77 XULRunner app, so any code which calls Static MathJax has no idea if
78 processing was successful and when an error occurs, graphical
79 message boxes are displayed.