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