Project

MathML in Chromium



Project Description

During this project, Igalia joined a W3C Community Group in order to design MathML Core, the specification that will be implemented in all browsers. It contains fundamental features from MathML3 with very detailed implementation rules based on TeX, OpenType, CSS and HTML5. Like other web technologies, conformance to this specification is verified by automated Web Platform Tests.

At the same time, Igalia is working on the necessary platform layering in order to make this core subset extensible. That way, users will be able to implement non-core MathML features or any other math extensions using modern Web technologies (DOM/IDL, shadowDOM, custom elements, CSS layout API, etc).

Igalia engineers has been following the general rules of the Chromium project for launching features. They have completed the “Idea” and “Design” phases and performed a significant portion of the “Implementation Phase” in a separate branch. They are now refining and upstreaming the MathML implementation.

Other generic goals of this project include but are not limited to:

  • Standardization. Working on MathML Core and related HTML5 and CSS specifications.
  • Interoperability. Writing tests for MathML Core, converting and exporting legacy browser tests and making them pass on all platforms.
  • Extensibility. Introducing necessary APIs to let the web community implement features that are not in MathML Core.
  • Compatibility. Ensuring that MathML is compatible with browser implementations and other web technologies.
  • High-quality. Enhancing MathML to rely on rules from TeX and OpenType in order to get good rendering of formulas.
  • Accessibility. Ensure that browsers properly expose MathML content to assistive technologies.
  • Maintenance. Aligning Gecko and WebKit on MathML Core, fixing bugs, implementing new features, refactoring code, etc

Project Roadmap (2020)

The goal for 2020 is to get the code developed in 2019 (with some extra refinements) upstreamed and reviewed.


Project Roadmap (2019)

edit 2020/06/01: This roadmap has been followed and completed in 2019 on our downstream branch.

Basic Setup

  • Simple grouping <math> (with its display attribute), <mrow>, <mstyle>, <merror> (with special CSS style), <mpadded>, <mphantom> (with visibility: hidden), edit 2020/06/01: ~~<menclose>~~ generalized to all unknown elements.
  • Simple text container: <mi>, <mn>, <mo>, <mtext> and <ms>.
  • Simple spacing: <mspace> element with width, depth, height attributes.
  • dir, mathcolor, mathbackground and mathsize attributes
  • Simplified semantics: just display the first child and hide annotations.

Basic Layout

  • Fraction (<mfrac>), with its linethickness attribute.
  • Postscripts: <msub>, <msup>, <msubsup>
  • Under and over scripts: <munder>, <mover>, <munderover>
  • Multiple pre and post scripts: <mmultiscripts>
  • Basic HTML-like implementation of mtable.
  • Advanced Spacing: mpadded with simplified interpretation of width, depth, height, lspace and voffset.

Operator Dictionary

Stretchy operators

  • Shaping large and stretchy operators using the MathVariants table.
  • Drawing of largeop operators in under and over scripts
  • Stretch logic in <mrow>-like elements and under and over scripts.
  • Using stretchy and symmetric attributes.
  • Simple embellished operators
  • Roots (msqrt, mroot)

Advanced Style

  • mathvariant
  • displaystyle
  • scriptlevel