org-agenda.el (org-agenda-get-deadlines, org-agenda-get-scheduled): Minor refactoring
[org-mode.git] / contrib / scripts / staticmathjax / README.org
blobd28fc90126edf4e29799f401de356a09770764a2
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
7 file.
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.
21 * Usage
22   To run Static MathJax, an existing XULRunner installation is
23   required. From the directory to which you unpacked Static MathJax,
24   run:
25     
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
32   
33   - input file :: 
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.
38   - output file ::
39       name of the output file.
41   - --embed-fonts :: 
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
50       website.
51           
52           All references to math fonts in the output file will point to
53           this directory.
55 * Caveats
56   
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:
61   
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.
72   
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.