|Tim Landscheidt b289a65be7 Use https for links to orgmode.org||1 year ago|
|chrome||8 years ago|
|defaults||8 years ago|
|.gitignore||8 years ago|
|README.org||1 year ago|
|application.ini||5 years ago|
Static MathJax v0.1 README
Static MathJax is a XULRunner application which loads a HTML input file that uses MathJax into a browser, waits until MathJax is done processing, and then writes the formatted result to an output HTML file.
I have only tested exports from Emacs Org-mode as input files. (As of 2010-08-14, MathJax is used by default with HTML exports in the current Org development version.)
Optionally, references to the math fonts used will be converted to "data:" URIs, thus embedding the font data into the HTML file itself. (see http://en.wikipedia.org/wiki/Data_URI_scheme)
The code is licensed under the GNU General Public License version 2, or, at your option, any later version.
To run Static MathJax, an existing XULRunner installation is required. From the directory to which you unpacked Static MathJax, run:
xulrunner application.ini <--embed-fonts | --final-mathjax-url >
If you prefer to call "staticmathjax" instead of "xulrunner application.ini", link xulrunner-stub into the directory: ln /usr/lib/xulrunner-22.214.171.124/xulrunner-stub ./staticmathjax
All references to math fonts in the output file will point to this directory.
The input file must not use a MathJax installation on the web. Otherwise, due to a security feature of Firefox, MathJax will fallback to image fonts. If you have unpacked MathJax to a subdirectory "MathJax", specify the following in your Org file:
The math is rendered in Firefox, so MathJax applies its Firefox-specific settings. When viewing the output files in other browsers, it will look slightly different than the result that running MathJax in that browser would produce.
Internet Explorer does not use the correct font, because it only supports the EOT font format. For all other browsers (including Firefox), MathJax uses the OTF font format.
Embedding fonts into the HTML file wastes some space due to the base64 encoding used in data: URIs.
I have found no way to access stdout or set an exit code in an XULRunner app, so any code which calls Static MathJax has no idea if processing was successful and when an error occurs, graphical message boxes are displayed.