Mathematics in ebooks

Improving MathML in Gecko & WebKit and Creating a collection of EPUB samples

About

Please read End of the project

Motivation

In the past few years, the ebook market has been exploding. The convergence towards the EPUB standard and the proliferation of mobile devices has enabled ebooks to benefit from progress on reflowable, stylable, scriptable, animatable, hackable and accessible content that people are used to see on the Web. For educational or scientific materials, one of the fundamental feature is the ability to write equations ; from basic math taught in school to more sophisticated notations of academia. Electronic textbooks have many advantages: they are cheaper than their paper counterpart, take up less room & weight and can be made more interactive or accessible tovisually impaired.

While the MathML language is available for math layouton the Web, the implementation in WebKit and Gecko has mainly be driven by volunteers and does not always reach professional quality. This means that even when publishers use MathML in their internal XML workflow, they must distribute their math books in several versions to work around the limitations of ebook readers. This includes relying on images of formulas or on MathML polyfills and thus losing many benefits of native Web formats.


Presentation of MathML (Mozilla Summit 2013)

This "Mathematics in ebooks" project aims at creating synergy between authors of MathML authoring tools, EPUB and accessibility actors as well as developers of layout engines in order to improve the current situation. In addition, the MathML improvements to browser layout engines will benefit to the Web community. For example Wikipedia is likely to switch to native MathML for Gecko soon and hopefully this project will allow the same for WebKit.

Arabic math
Arabic Mathematics in MathML displayed in Firefox

Project Goals

Obtaining perfect MathML support in layout engines and ensuring its integration in EPUB readers & ebooks is a very big project. In order to have something achievable in a reasonable time frame, I have selected two main goals:

  • Create a collection of educational & scientific documents that will serve as examples & test cases for publishers and implementers.
  • Improve rendering quality in WebKit and Gecko so that EPUB publishers can rely on it.

The first goal is to get something similar to the EPUB 3 Sample Documents for scientific documents. The complete collection of documents, source and scripts will be released in an open format at the end of the project. Most pledgers will have access to the documents during the project development, so that they can test them with their own environments and provide feedback.


Interactive ebook on Matrices (AZARDI EPUB reader)

Regarding the second goal, the objectives are different for the two rendering engines but in both cases there are MathML developers who are willing to help. WebKit has serious rendering bugs and very limited support for spacing and stretchy operators and the purpose will be to improve its MathML implementation with focus on addressing these issues. Gecko has much better MathML support and the main objective will instead be to rely on the Open Type MATH table to get high rendering quality with modern math fonts. This table is used in Microsoft Word and modern LaTeX engines ; and has been submitted to the MPEG group for standardization.

Comparison of WebKit, Gecko and XeTeX
Comparison of the rendering of a mathematical formula (TeXbook, 18.40)

What are the fund for?

The intended schedule is a 2-month-long preliminary work funded with my savings. If the fundraising campaign is successful, it will be followed by a 3-month-long development period during which I will use the funds to make a living. Based on the legal wage in France, I'm setting the minimal goal to 3960€.

This is of course a very small wage for a Computer Engineer in Paris but I believe it is important that someone dedicates some time and money to boost MathML developments. If necessary, I will use my savings and other part-time missions during the project development. However, If the funds obtained significantly exceeds the targeted amount then I will be able to work full-time on the project and may even extend the development period. This would allow to bring even more improvements to MathML support in Gecko/WebKit :-)

About the project owner

Since he was 11, Frédéric Wang has had strong interest in sciences. This was also the period where the Web started to grow up. Frédéric learned a lot thanks to the scientific content that was available for free and was happy to share his own knowledge on his Web site. Tired of the bad math rendering quality he soon focused on the MathML language. In 2007, he joined the Mozilla MathML project and has been one of the main leader for the project since then.

After Classes Préparatoires in Rennes where he studied mainly mathematics, physics and chemistry, he was admitted to an engineering school and finally obtained his M.S. in Computer Science in 2010. He then moved to Paris to study mathematics at Pierre and Marie Curie University. At the same time, he created his own business and started to do some part-time job for the MathJax Project.

In 2012, he obtained his M.S. in Mathematics and started to work full-time for the MathJax Project. During that year, he got the opportunity to participate in many other open source projects including the WebKit MathML project or MediaWiki Math. He now wants to use his expertise to spend more time on browser MathML developments...

Books VS eBooks

FAQ's