mathjax

Peter Krautzberger on MathJax — Accessibility & Future

📖Read Time: 7 minutes
📊Readability: Accessible (Clear & approachable)
🔖Core Topics: mathjax, mathematics, mathml, math, people

Peter KrautzbergerWe are pleased to introduce Peter Krautzberger. Peter is a manager for MathJax, the technology behind the display of equations on Physics Forums.

“The core of the MathJax project is the development of its state-of-the-art, open source, JavaScript platform for display of mathematics.”

Please give us a bit of background on yourself

I was born and raised in Germany, accidentally studied mathematics, and did some research afterward. After a few years in the US, I’m now back in Germany working as an independent consultant.

When did you first become interested in math?

While school mathematics has little to do with mathematics, I vividly remember my 7th grade math teacher, who you could catch with gleaming eyes whenever we moved to a new topic. I suspect it was this kind of enthusiasm that opened me to the idea that this stuff could be fascinating. Still, I only accidentally studied mathematics but was quickly hooked on the thrill of pushing one’s mind, and on a great cohort of students.

What are some of your favorite topics in math and why?

My research was in set theory and I mostly studied ultrafilters on countable semigroups. I suppose I was attracted to set theory since it provides a foundation for all of mathematics; I became interested in ultrafilters because I applied aspects of set theory to mainstream subjects like additive combinatorics.

What is MathML and why should people care about it?

MathML is an XML standard for describing equations. I don’t think anybody must care about it, to be honest, but it’s useful to know that MathML is very successful in the publishing world, so most published equations get converted to MathML at some point. For the TeX-heads out there, you could view MathML as TeX after cleaning up macros (and adding angular brackets), which is very useful for archival purposes; this is, of course, a lie.

Why was MathJax started?

MathJax was conceived as a successor to jsmath, which our lead developer Davide Cervone created back in 2004. Where jsmath was focused on just TeX, MathJax broadened the scope to a modular system with MathML as an internal format and a decoupled structure for input, internals, and output mechanisms. This allowed MathJax to overcome many limitations that strict adherence to TeX introduces. After all, TeX is a programming language for print layout and predates web technologies like HTML, SVG, and Unicode.

Take us through the first few years of MathJax

I only joined MathJax in 2012, so I wasn’t around for the first few years. Retrospectively, Robert Miner was the key person who made MathJax happen. He knew Davide from their postdoc days and brought together the American Mathematical Society, the Society for Industrial and Applied Mathematics, and Design Science (where Robert was CTO until he passed away in 2011).

These three founders funded Davide during the first years of development. Robert then established the MathJax sponsorship program and recruited the first group of sponsors—many of whom still support MathJax today. He also worked with Davide on MathJax’s architecture, which has held up for over six years (and we’re only now beginning to revise). Since then, MathJax has slowly grown to a stable team of three part-timers, and we’ve steadily improved and extended MathJax.

What challenges have you overcome developing MathJax?

The key problem for any open-source project is resources—and MathJax is very lucky to have a great group of sponsors who support it.

The greatest technical challenge is the ever-changing nature of the web. MathJax launched when IE8 was state of the art, so much of its original design reflects an earlier era of the web. At the same time, IE8 remains relevant for many developers, so we can’t simply abandon it. MathJax’s modular architecture allowed us to develop new components (such as the SVG and CommonHTML outputs) that take advantage of improved browsers.

Sometimes you need to take a bigger leap. This year we’re revising some of MathJax’s internals to drop legacy weight and better fit modern developer workflows of today and tomorrow.

There is also a psychological challenge. It’s great to get regular thanks from users for “doing magic,” but the trouble with magic is that it’s really hard work—the simplest effects often take the greatest toll. For example, a recent design meeting for MathJax v3.0 focused on supporting arbitrary Unicode characters: it seems obvious and important for the web, but it’s full of subtle complexity and technical challenges. Making an elephant disappear in a split second on a live stage may look effortless, but it requires a lot of work.

Do’s and Don’ts for using MathJax

In the vein of ShopTalkShow: just use MathJax! I wouldn’t want to label anything a strict “Don’t.” Use MathJax, push it to its limits, and when things break, let us know. Keep an open mind about possible solutions and accept that some things might be out of scope for MathJax (for example, LaTeX users sometimes expect full support for text-mode macros); that doesn’t mean you can’t do those things, only that we can’t always spend time on every request.

One practical “Do”: think about the web as a medium in its own right. Create for this medium (instead of sticking to pre-web habits)—explore the web’s grain.

What do many people not know about MathJax?

We don’t talk a lot about our size. You can see the team consists of three people, all part time, and you can estimate our budget from the sponsorship program, but you probably don’t know how many people rely on MathJax. Of course, neither do we—MathJax is open source and used in many settings we don’t even know about. We can give a lower bound: according to passive CloudFlare analytics, the MathJax CDN exceeded 100 million unique visitors per month this year, which is a rather humbling number.

What are some current issues with web accessibility?

Simply put: it’s virtually impossible to provide fully accessible rendering today. For a long time, people said MathML would be best for accessibility. Unfortunately, that made assistive technologies focus only on MathML while browser vendors deprioritized it. Today we have some solutions that voice MathML, but they don’t help much because MathML isn’t always suitable for visual rendering.

More fundamentally, it’s very difficult to make equations accessible. It is unrealistic to expect authors to change their writing style broadly, and it would be prohibitive to require mathematics be written both semantically and visually correct for every context (ignoring legacy content). The best approach is to analyze an equation’s structure and—ideally with contextual information—guess the meaning of its parts. That’s not impossible (visual users do it), and there are tools that can do this reasonably well for school and college content.

However, exposing that information on the web is hard. You need to embed semantic information in the visual output (which can be more complex, e.g., an underbrace with a description, or more compressed, e.g., partial differentiation). Finally, you want that information exposed in a way any technology can pick up—screen readers, search engines matching semantic or visual subexpressions, or users copying content into other applications.

Future plans and goals for MathJax

We are redesigning parts of MathJax’s inner plumbing, removing legacy components and rebuilding infrastructure to take advantage of recent browser improvements. Besides ensuring long-term success, we’ll focus on making server-side rendering a first-class output and expect another round of significant speed improvements. You can follow the discussions of our technical committee on the MathJax Developer mailing list.

We have also been working on several new accessibility tools that should allow users to get meaningful voicing and exploration within MathJax’s visual rendering. These tools will have their first public release soon, so if math accessibility matters to you, check them out and give feedback.

Finally, we are involved in a new W3C effort to improve math on the web as a whole, working with other projects to improve web standards and implementations from the bottom up. Hopefully this group will positively affect standards, implementations, and tools alike.

How will math be input and displayed by 2030?

I think by 2030, the many early-stage tools we see today will work together to allow a much more flexible way of creating mathematics. Whether you type code, use a WYSIWYG editor, hand-write, or use your voice, these methods will work seamlessly.

On the display side, we’ll see much richer visual representations of math. Beyond obvious things like 2D tools (jsxgraph, GeoGebra, Desmos), 3D (e.g., mathbox), or VR (e.g., Vi Hart’s hypernom), I expect unexpected, subtle changes. Perhaps people will adopt emoji-like glyphs instead of traditional math variants (blackboard bold, etc.)—which, amusingly, isn’t entirely new (see Byrne’s 1847 edition).

One of my pet peeves: I hope we’ll finally have a universal way to share laid-out mathematics in emails.

— There we have it! Thanks for your time and insights Peter! Keep up the great work on MathJax!

3 replies
  1. dogplayer says:

    Wonderful writing Peter. All this accomplishment without a hint of ego. Well, to be accurate,
    without a little ego we probably wouldn’t get up in the (noon). Bravo! Dogplayer

  2. Greg Bernhardt says:

    Thanks for the post! This is an automated courtesy bump. Sorry you aren’t generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?

  3. dogplayer says:

    Wonderful writing Peter. All this accomplishment without a hint of ego. Well, to be accurate,without a little ego we probably wouldn't get up in the (noon). Bravo! Dogplayer

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply