Do you want a better support for mathematical expressions on the Web and in ebooks? Then please support this project to improve MathML implementations in browsers and create a collection of EPUB documents with mathematical formulas inside! If among your relatives, friends or colleagues you know Web enthusiasts, publishers, students, teachers, researchers, engineers, accessibility specialists or anyone who could be interested in this project, then spread the word and ask them to contribute, even a symbolic amount. Thanks!
update: The fundraising campaign is now closed! For companies/organizations interested in this project and willing to support MathML developments, please contact me directly at fredDOTwangATfreeDOTfr so that we can find an arrangement (invoice, contract etc).
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 Mathematics in MathML displayed in Firefox
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 the rendering of a mathematical formula (TeXbook, 18.40)
What are the funds 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...
Here is a list. Note however that there is no guarantee that all these bugs will be fixed. Also, some bugs that are outside this list could be fixed too. In general, the focus is on operators and spacing.
Operator Stretching: MathML operators not stretched horizontally, Render stretched operators on all platforms, msup do not stretch operators, Draw radicals with glyphs for better rendering, Large stretch size error for MathML operators, RenderMathMLOperator does not properly handle non-BMP characters when determining stretchability
Operator Spacing: Invisible Operators should not add space, Implement MathML spacing around operators, Add support for minsize/maxsize attributes, Implement the MathML Operator Dictionary
Characters: Multi-character and some Unicode mis italic in WebKit but not Firefox, Add support for @mathvariant attribute, support for mathvariants that cannot be emulated via CSS
Major rendering issues: Base of munderover not stretched, Incorrect widths and heights of MathML with italics in table cells
Font support: RFE: Add font autoinstallation support, Bundle fonts to enable MathML rendering without site-supplied fonts, migrate nsMathMLChar measuring and drawing from nsRenderingContext to gfx/thebes classes, read OpenType MATH table for variants and parts of stretchy characters
Characters: Support for the 'mathvariant' attribute ; Dotless i's and j's in <mi> ; Primes and other "pre-scripted" glyphs require special treatment when used within msup
Here is the list. More choices could be added later when I have a better idea on how to fix some bugs and how much effort it would take. Note that these bugs are outside the main development and thus will be done during my free time. I can not guarantee how long it will take to fix them.
Implement MathML bidi
MathML Acid2 fails to render properly (Add support for mpadded element, Add support for the maction element, Support semantics annotation-xml elements, Add support for @href attribute in MathML, Add an MathMLSelectElement class to implement maction and semantics, Add support for maction@toggle, Implement negative width for mspace)
Displaystyle and scriptlevel (Scriptlevel attribute implementation, Add support for displaystyle, Improve how the script size is determined)
Dynamic update bugs (Editing text content of MathML tags in inspector sometimes doesn't update rendering until reflow, entries misplaced in mtable after rowspan, mo element fails to update dynamically when the DOM changes, mfenced element fails to update dynamically when its open, close and separators attributes are changed, mathbackground attribute is not rendered correctly for dynamically created mi elements)
Implement clipboard specification
Code refactoring/cleanup (Keep only mstyle attributes from the first category and map them to CSS, Refactor implementation of displaystyle using a -moz-display-style property, Private MathML attributes should not be accessible from DOM, ASSERTION: aWhichFlags should only be displaystyle or compression flag, Rewrite mtable implementation to avoid use of _moz-* attributes, MathML: rendering of mtable with a columnalign attribute is sometimes incorrect, MathML attributes are not mapped to style)
Better Operator rendering (lspace/rspace should only have effect on embellished operators inside (inferred) mrow, Improve stretching in the presence of large operators, parentheses too tall adjacent to embellished operators, Implement heuristic rules to determine the default value of the form attribute of MathML operators)
Better Tabular support (Rewrite mtable implementation to avoid use of _moz-* attributes,Add support for mlabeledtr, Add support for mtable@rowspacing/columnspacing attributes)
- I can get the reward at level 4999€ but the bug/feature I'm interested in has already been chosen/fixed...
If the feature has already been chosen/fixed or if it is the one which received the most votes for the 149€ reward level, you may either change your choice (if it remains other choices from the predefined list) or keep it (to speed up the fix/implementation).
No, only on WebKit and Gecko where the MathML situation is best: open source code with developers & volunteers willing to help developments. However, the work on WebKit could be exported to Blink later, so if you are interested in MathML support in Chrome you might consider helping WebKit developments first.
Passing the MathML Acid tests is not part of the objectives. However, improvements will certainly make WebKit pass the Acid 1 test and increase Gecko & WebKit's scores in general. Passing the MathML Acid 2 in WebKit is part of the "bonus" feature for the rewards at level 149€ and 4999€.
Well, first WebKit monoculture is bad and I expect to see more FirefoxOS devices that can rely on Gecko's native MathML support :-) More relevant here, one of the goal is to reach high rendering quality in a short time frame so relying on the work of Gecko MathML is appropriate whereas WebKit's goal is more modest (only fix serious rendering bugs with operators and spacing). Finally, WebKit's MathML implementation will benefit from the experience of Gecko and take inspiration from Gecko's design.
For the most adventurous people, nightly builds are available for WebKit (Mac) and Gecko ; Bill Gianopoulos also maintains some mozilla-central builds with WIP MathML patches... Otherwise, you will have to wait the official releases, which can be several months after the fixes landed in the development branch.
I will post regular news on Ulule for pledgers with summary and screenshots. The development is entirely public so you can check it on Bugzilla WebKit and Mozilla. If you are not afraid of bugspams, create an account and enter my email address in Preferences → Email preferences → User Watching (you can uncheck some boxes on this page to reduce bug spams).
EPUB3 for ebooks and XHTML5 for Web pages.
The choice of XHTML rather than HTML is for convenient validation and EPUB3-to-XHTML conversion. The encoding must be UTF-8 and no HTML5 entity names should be used.
LaTeX files or EPUB sources. The XHTML files in the EPUB may obviously contain MathML but I also accept LaTeX fragments that can be converted using itex2MML. The LaTeX files will be converted using tools like LaTeXML or tex4ht. I may accept other formats, as long as they can be converted in EPUB using open source tools that could easily be integrated in the workflow.
Standard Unix tools and open source programs: make, find, java, sed, unzip/zip, wget, xsltproc, perl to mention a few of them. The LaTeX fragments in the EPUB sources will be processed by itex2MML while LaTeX documents will be converted using LaTeXML or tex4ht. The process will be entirely automated so that people could generate the documents by themselves and create their own additional documents. I might consider supporting other tools like as long as they are open source tools that could easily be integrated in the workflow.
The documents will be in Web formats, so in theory yes. However, we will certainly find issues in the accessibility / authoring tools or in the document design, so we will have to work together to address them.
The idea is to cover a wide ranges of scientific topics (especially fields relying on math formulas) from elementary level to more advanced concepts.
Mostly English, although for completeness I will create a few examples with non-ASCII characters and right-to-left languages.
I'll get in touch with you by email, but feel free to contact me. Most rewards can be claimed during the whole development period (February 1 to April 31). The exact time for the 149€ and 4999€ rewards is not guaranteed but it will probably be after the end of the project development. If the project reaches its funding goal before February 1 then perhaps the rewards related to the collection of documents can happen sooner. I might also offer some "bonus" rewards at any time by making a few XHTML/EPUB documents accessible to all the pledgers.
At the moment, I plan to publish them on my Web site with access restricted to some pledgers during the development period (February 1 to April 31). I might consider publishing them earlier if project reaches its funding goal before February 1. In any cases, everything will be released on June 1 and published on my GitHub account.
- How will you guarantee secured access for the documents? Will I be allowed to share them with other people?
I will just protect directories using Apache directives and basic access authentication (username and password). Remember that I plan to publish the documents at the end, so I don't want to worry too much about the protection. The idea is just to offer privileged access to pledgers so that they can take part of the development, test the documents before other people and provide feedback. I'm fine if you share the authentication information with your team but in general please try to keep it confidential until the end of the development... after all you paid to get that privilege!
Your name will be mentioned in the acknowledgements of the final collection of documents.
You will be able to report MathML issues you encounter in the latest Nightly builds of Gecko/WebKit and get feedback about possible work around, the exact bugs in Bugzilla (I will create a new entry if necessary) and an estimate of how/when the bugs could be fixed.
During the project development, you will have access to the Web versions of the documents in the collection.
You will be allowed to submit your own documents for inclusion in the final collection. The requests will be accepted under some conditions (open license, content of the ebook related to the collection, source in a supported format etc See the FAQ).
During the project development, you will have access to the Unix scripts used to generate the collection of documents.
During the project development, you will have access to the EPUB versions of documents.
You may vote for one big Gecko/WebKit MathML bug/feature among a predefined list (see the FAQ). When I have time outside the main project development and/or after the project end, I'll work on the bug that received the most votes.
During the project development, you will get a access to all the sources, documents and scripts that are used to create the collection.
I will have email exchanges with you to provide help regarding integration of math in your own EPUB projects. Limited to at most 5 organizations/companies.
You will be able to propose an idea for scientific topic to include in the collection and I will write a small ebook under the limits of my technical knowledge or will rely on one article from Wikipedia.
Monthly in person meeting during the project development. We may discuss the development of the project and integration of MathML in your own projects. This reward is limited to 3 organizations/companies in Paris.
When I have time outside the main project development and/or after the project end, I'll fix/implement one big MathML bug/feature of your choice in Gecko/WebKit among a predefined list (see the FAQ).
My self-employed status "autoentrepreneur" allows a maximal limit of money before having to switch to another status for bigger business. If there are enough money from pledgers to exceed that limit, we'd better discuss a long-term plan for MathML funding with possibly additional developers.