MathML! Seriously!

09 October 2013

MathML, HTML5, ePub3, IGP:Digital Publisher, Production Challenges, Multiple Format Production, Demonstration Books

So MathML production and format packaging in IGP:Digital Publisher is done and released. We are celebrating by releasing The Theory of Heat Radiation by Max Planck in ePub3 with pure MathML

MathML Fully Supported in IGP:Digital Publisher

So MathML production and format packaging in IGP:Digital Publisher is done and released. Phew! The features in brief are:

Cover image created with HTML and CSS with a background image.

  1. MathML is now fully maintained inline in IGP:Writer and can be manually edited at any time in MathML editing pop-up windows. These work for both Inline and Block MathML.
  2. The MathML is stored in IGP:Writer in XHTML5 format without namespaces. Namespaces are processed in if required for format packaging.
  3. MathML inline or blocks can be exported as stand-alone MathML files at any time.
  4. MathML inline or blocks can be exported as stand-alone SVG, PNG or JPG images at any time. Image resolution can be set for the package. For example 600dpi for PDF production.
  5. Format generation options include:
    1. Pure HTML5 with no namespace MathML for archiving and any other use (such as websites, static pages, LMS, etc.) with or without MathJax (with is smart!)
    2. ePub3 with format compliant MathML.
    3. ePub3 with format compliant MathML and MathJax packaged.
    4. ePub3/2 with MathML converted to SVG inline images.
    5. ePub3/2 with MathML converted to PNG or JPG images. Image scaling can be set.

As genius, mathematical and scientific as mankind has become, producing maths for print remains a very hard up-hill journey. Producing maths for e-book reading devices is an even steeper journey and involves a wade through the ePub reading system swamps.

Yes There is a Reading System MathML Swamp!

Figure xx Your Caption

Swamp critter 1. ADE (Adobe Diatome Edition) and reading systems using the dreadful RMSDK are the quality sucking parasites at the bottom of the swamp. EPub2 so no MathML support of course. But the SVG, JPG and PNG rendering without any anti-aliasing is the worst-of-the-worst. No matter what you do to your Math images, resize them and they look disgusting.

Swamp critter 2. Kindle Mobi. Does a respectable job with maths as JPG as long as they are not resized, which is hard to do anyway. It is probably pointless even showing maths of any sort in this thing.

Swamp critter 3. Kindle Fire. Does a sort-of respectable job with maths as PNG or JPG images. But again the whole reading system/experience is not designed for academic, education or maths.

Swamp critter 4. iBooks + Images. MathML support is very limited to the extent it is unusable. Doesn't use inline style statements on images. Does work if MathML with MathJax is packaged with the book. That's a lot of work and overhead.

Swamp fringe critter 5. Any reading system built on Webkit or its recent clones. You have to compromise with MathJax or images for their multi-billion dollar business that were significantly built on MATHS.

Land Walker 1. MathJax. Makes MathML sing and dance everywhere. Incredibly active, supportive and dynamic development team. Probably the saviour of MathML.

Land Walker 2. Firefox Browser. Firefox, FirefoxOS and Mozilla XULRunner all have excellent support for

Land Walker 3. AZARDI Desktop. Perfect in every way with full support for pure native MathML ePub3 books with MathJax included, plus maths as resizeable SVG and/or images.

Land Walker 4. AZARDI Mobile (Android/IOS) Semi-perfect in every way with MathML only in the ePub3 package because MathJax awesomeness is built into the reading system.

One Format for All

Figure xx Your Caption

A publisher of books or journals containing mathematics has to overtly face this reading system swamp challenge if the goal is to distribute brilliant maths content.

The current general approach is lazy format production with maths as non-resizing JPG images to address the requirements of the lowest performing ePub2 reading system...Adobe Digital Editions any version.

In the emerging ePub3 world MathJax is probably going to be used pervasively on Android reading systems. Today, the bottom line is to deliver the highest-quality mathematics means delivering three ePub editions.

That wasn't good enough for our customers. We have put MathML very high on the content tree (with SVG). Brilliant education content cannot really be created without this left-right punching pair.

And to Celebrate... A Book

We are celebrating this glorious occassion with a glass of champagne and Dr. Max Planck's legendary book "The Theory of Heat Radiation".

Weighing in at 2,968 MathML statements this book is appropriately in the MathML heavyweight class and is now available as a top-line ePub3 with pure MathML.

Download Dr. Max Planck's masterpiece and be a part of MathML unfettered history. It's available from the AZARDI EPUB3 SAMPLES page here.

ePub3 - XHTML5 Inline MathML

This will only work in AZARDI Desktop natively or a reading system that has MathJax and STIX fonts pre-installed. Yes! That's AZARDI  mobile for Android and IOS, AND AZARDI Online.

How This Is Done

A talented, dedicated and well-trained human sits down and creates the MathML. There are a number of painful ways to do this:

  1. Create the maths in LaTeX and convert it to MathML with a third party tool.
  2. Create the maths in a word processor plugin like MathType from Design Science or MathMagic. Export the MathType book as DaisyXML using the DaisyMath plugin from Design Science.
  3. Use a tool like the FireMath plugin for Firefox.
  4. Go crazy typing it by hand.
  5. Adopt a mediative position and will it into your book.

Once the MathML exists it was imported into IGP:Digital Publisher where it's life as MathML was assured for an unlimited future.

Stored in IGP:Writer as inline or block display HTML5 MathML, unencumbered by ugly name-spaces items it is ready for instant format production.

  1. A PDF can be directly generated. The MathML is coverted to SVG and then high-resolution PNG for generation of the content.
  2. An ePub3 can be directly generated. During ePub3 packaging the ugly namespaces are processed in by the IGP:Formats On Demand engine so the HTML5 production source MathML remains pure, reusable and editable.
  3. Other e-anything formats can be produced with the images being processed at 96DPI to highlight the limitations of the mediocre Reading Systems.
  4. The E0 of course is just directly exported as HTML5 and is instantly ready for presentation. Awesome.

ePub3 - Pure HTML5 Inline MathML AND MathJax Included

This will work in AZARDI (which knows how to let go and let the packaged Javascript do it's work) or a reading system that supports Javascript. There is not a lot of them out there.

How This Is Done

It's simple. The MathML is processed for the ePub3 package and MathJax and STIX (or other MathJax recommended) fonts are installed at ePub3 packaging time.

It is a complete, self-contained MathML rendering package. This will work on the partial ePub3 reading system available, IOS. However too much Maths and it will groan like a groaning thing.

This package is also used by the AZARDI Mobile editions and AZARDI Online to ensure complete and reliable MathML presentation everywhere.

Finally we have to thank Dr. Max Planck for his book and the team at The Sayahna Foundation from Kerala, India, who produced the MathML pages from the Gutenberg TeX files in the first place. This is the first of the 14 MathML Online books their volunteers have converted into HTML5 with MathML only.

Crossing the MathML Rubicon

I have to confess more than a little pride watching the team develop a complete MathML production, management and format packaging solution. It is more than a little exciting to have finally crossed this Rubicon. This is especially true

Credit where credit is due... It really happened because of  the seamless integration of MathML into HTML5, the awesome support of MathML in Firefox XULRunner and the equally awesome MathJax project. With enough e-presentation rendering support available there was a reason to bring it all together.

We finally have a substantial and reliable MathML production system that manages and works with standards based MathML and enables the creation of e-books and print-ready PDF.

The compromises, and most gratefully, the packaged maths as images has no reason to live another day.

Posted by Richard Pipe