pdfChip specific MathML aspects

As mentioned already, MathML support in WebKit leaves a few things to be desired. While simple equations will work fine, anything non-trivial will often show anomalies in the rendered presentation – whether in a WebKit based browser like Apple’s Safari or in the PDF output of callas pdfChip. There is an easy solution though, and it is known by the name of MathJax. The great people behind MathJax describe it as follows: “MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.” It is not only the most powerful such engine – it is also free of charge (if MathML is dear to your heart you may decide to sponsor further development of MathJax).

When used in the context of callas pdfChip it is highly recommended to download MathJax and install it locally on the machne where callas pdfChip is running. This has the following advantages:

  • callas pdfChip will create PDF with mathematical from a known version of MathJax, giving the very same results each time the same source MathML is processed. While newer versions of MathJax will most probably be better in a relevant way, better still could mean different, as in different size, leading to reflow, and so forth. When replacing the currently used version of MathJax a newer version, make sure to check whether its behavior still meets your needs.
  • Depending on online access, even when provided via a professionally maintained, globally distributed content delivery network architecture, always comes with a risk – even major players like Twitter or Facebook had their outages.
  • Retrieving resources through an internet connection will almost always be slower than retrieving the same resources from the local hard disk, and the time needed to load such resources can be deternined and willl remain a stable and known quantity.

All the details around downloading and installling a local version of MathJax are very well explained on the “Installing and testing MathJax” page. Make sure you understand that together with the actual MathJax JavaScript library, a number of essential math fonts will also (have to) be installed.

The basics of including the MathJax library in your HTML code are explained in the “Learning pdfChip - the Tutorial” section on “Including formulas”.

If you do not know how to get a MathML encoded version of a formula you care about – there are a number of interactive tools that will let you create mathematical formulas and will also let you copy them as MathML. A good online resource, besides the MathML pages on the W3C website and the MathJax Resources section listing is MathML Central by Wolfram Research. Those in need of an interactive, installable program for mathematical equations will want to have a look at MathType from Design Science.

For any advanced type setting of mathematical formulas in callas pdfChip it will be necessary to study the MathJax documentation, which is very clearly organised and well written. Special attention needs to be paid to how MathJax is configured as otherwise the way MathJax works might not meet your specific needs.