WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Advice on writing a graphics extension for MathJax

Peter Krautzberger edited this page Oct 21, 2013 · 4 revisions

Frequently, contributors are interested in graphical extensions to MathJax.

Two methods

Since MathJax's internal format is MathML, such extensions have to either expand MathJax's internal format or have to work around MathJax.

As an example for an extension that extends MathJax's internal format, see XYjax, an partial XYpic implementation.

As an example for a library working "around" MathJax, see Mathapedia, a PStricks implementation (with interactive enhancements), also available as a client-side solution http://latex2html5.com/

It's entirely reasonable that SVG could become part of MathJax internal format in the long term.

A third approach

There are many powerful graphics libraries out there, see the List of general purpose graphics JavaScript libraries.

Implementing the syntax of an established TeX package as an API on top of such packages is a sensible compromise for writing an extension as the more complex task of maintaining the rendering is outsourced to a stable project.

MathJax's resource loader makes it easy to combine secondary libraries and synchronize the layout process.

Clone this wiki locally