MathJax vs MathML

566 views
Skip to first unread message

Nmacgre

unread,
Oct 13, 2011, 5:26:30 PM10/13/11
to MathJax Users
I have two questions. One, what is the difference between MathJax and
MathML? Is MathJax just a tool for developing MathML? Second, are the
fonts used in MathML and MathJax the same as those used in TEX/LATEX?
If not which do you find more aesthetically pleasing?

Any help appreciated.

leathrum

unread,
Oct 14, 2011, 11:36:17 AM10/14/11
to MathJax Users
1) MathJax is a set of JavaScript tools which allow you to embed TeX/
LaTeX or MathML math code in an HTML file. If used for embedding TeX/
LaTeX, it transforms the math expression into either Presentation
MathML (if it detects browser support) or an HTML format with the math
symbols placed using CSS positioning (for browsers that don't support
MathML). If the browser supports web fonts, the math symbols are
loaded that way, but there are fallback options such as using
bitmapped image files. If used for embedding MathML, if the browser
already supports MathML then there is nothing for MathJax to do, so
the point here is that the MathJax JavaScript can allow browsers that
don't support MathML to display it properly anyway, by processing the
MathML into the CSS-positioned math symbols. There are lots of
configuration options, but this describes the default behavior.

2) Yes and no -- if the browser supports MathML, then MathJax
processes TeX/LaTeX to MathML and lets the browser pick from its own
fonts. If fonts are missing, or if it is processing to CSS-positioned
symbols, MathJax provides web fonts. If the browser doesn't support
web fonts, it provides some fallback options, such as the bitmapped
images. The web fonts are based (somewhat loosely at this point) on
the old BaKoMa fonts, which were a port of the TeX/LaTeX Computer
Modern fonts to TrueType. What fonts you get kind of depends on your
configuration. I use Firefox (which supports MathML) with the STIX
fonts installed (so the browser has local symbol fonts and doesn't
need to download the web fonts), so I get something different from
someone who uses an older browser such as one which doesn't support
MathML or web fonts (so the bitmapped images are required). The worst-
looking fonts are bound to be the symbols you get from the bitmapped
images -- they are heavy and pixel-y compared to either STIX or the
web fonts, but such is the nature of bitmapping. In my experience,
the web fonts tend to be the nicest looking, with STIX a reasonable
second. True font geeks are bound to point out problems with all of
them, but the power of MathJax is that it provides so many options and
fallbacks in its quest for wide browser support.

Davide P.Cervone

unread,
Oct 16, 2011, 8:56:33 AM10/16/11
to mathja...@googlegroups.com
Thanks for your comprehensive answer, Tom. I did want to point out a
couple of details, however.

First, MathJax's internal format is MathML, so even the TeX to HTML-
CSS pipeline goes through MathML internally.

Second, the image fonts are almost never used any longer, except if
the web-fonts take too long to download, or in certain cases when
files are loaded locally from disk rather than over the web. There
are few browsers now that will require them, other than very old
versions.

Third, the MathJax web fonts are NOT based on the BaKoMa fonts in any
way. JsMath used those in its earlier versions, but they were not
very successful, and I ended up making my own fonts for jsMath v2.0
(as I recall) and above. MathJax has never used the BaKoMa fonts, and
has always used fonts created from the TeX CM fonts via mftrace and
FontForge. Unlike the jsMath Fonts, the MathJax fonts are actually
unicode fonts (the characters are in their proper locations), and that
makes them more reliable and generally more useful. They are also OTF
fonts rather than TrueType, except for the EOT fonts used by Internet
Explorer.

Davide

Nmacgre

unread,
Oct 27, 2011, 11:19:30 AM10/27/11
to MathJax Users
Thanks for the help, I appreciate it. What I'm trying to do is find an
assessment creator with an equation editor with very nice fonts. These
assessments will be displayed on the web,need to work across most
browsers. The assessment writing tool will also need to produce
content and presentation MathML. So it sounds like I will need to use
MathJax for the cross browser functionality. Any ideas what the best
assessment tool would be? Or would I have to be using an equation
editor only? How many things will my students need to download. I'm
guessing a plugin for their browser to display mathml, a font library,
and mathreader? Again, and help appreciated.

leathrum

unread,
Oct 27, 2011, 4:58:24 PM10/27/11
to MathJax Users
What sort of assessments are you looking to create? Is this e.g. for
online homework assignments in a math class? I know, for example,
that the WeBWorK system supports MathJax (or can easily be configured
to support it). Other homework systems generally use their own
proprietary internal formatting engines. The issue of WYSIWYG editors
has come up before in this forum -- see for example this post:

http://groups.google.com/group/mathjax-users/browse_thread/thread/5b8cc4bb7076d847/da52e42952a3b86f?fwc=1

Work still needs to be done here.

Davide P. Cervone

unread,
Oct 31, 2011, 11:31:18 AM10/31/11
to mathja...@googlegroups.com
By an assessment creator, I assume you mean something that lets you create quizzes or homework assignments, and such, right?

I will have to let others make recommendations on that, as I certainly am not an expert of that. I do know that systems like WeBWorK and Moodle allow you to create homework and quizzes, and they both have the ability to use MathJax to render the mathematics. But they might not be appropriate for your situation.

As for what you students need to download, if you use MathJax, the answer is nothing at all. There are no plugins needed, and MathJax will load the fonts it needs over the web (though it will use the STIX fonts if they are on the student's computer, which does make rendering faster).

Davide

Reply all
Reply to author
Forward
0 new messages