

Announcing ... MathML! (WebKit) - swannodette
http://webkit.org/blog/1366/announcing…mathml/

======
lmkg
Are there any good tools for generating MathML automatically, or converting
LaTeX to MathML? Writing MathML for an expression[1] is a tedious pain in the
ass. The MathML expansion of a formula ends up being very similar to a verbose
parse tree represented in XML, and mathematical notation can be very dense so
those trees get large.

[1] This is where the word "non-trivial" usually goes, but not this time.

~~~
_delirium
Several approaches:

1\. The semi-official answer seems to be to use a WYSIWYG editor, which seems
to be the solution XML proponents take to any syntax problem. ;-) For example,
you can export to MathML from OpenOffice's equation editor.

2\. If your goal is just to display math in webpages, there are some .js
libraries that replace MathML's concrete syntax inline: you write a different
syntax directly in your markup, and then it's converted at load time to MathML
for browser rendering. The first widely used one was ASCIIMathML
(<http://www1.chapman.edu/~jipsen/mathml/asciimath.html>), which inspired
LaTeXMathML (<http://math.etsu.edu/LaTeXMathML/>), and possibly others.

3\. There are a number of offline translators from TeX math syntax to MathML.
I've only ever used Blahtex (<http://blahtex.org/>), but there are a ton, in
various stages of completeness and maintained-ness.

edit: it looks like the original blahtex is abandoned for a few years now, but
a maintained descendant is here: <http://gva.noekeon.org/blahtexml/>

------
omaranto
When this version of WebKit makes its way into Chrome I'll finally be able to
stop using Firefox. Nowadays I only use it for MathML.

------
Groxx
Weird... the square roots look like crap, especially compared to the rest and
when zoomed in (r65222, so not _most_ recent, but still very). No color-AA.

The rest of that is gorgeous, though. Awesomeness.

edit: nope, r65398 doesn't fix it.

~~~
sgift
Interesting. Opera supports MathML and the square root also looks like crap
zoomed in, while the rest looks fine. Maybe a bug in some shared library?

------
nanairo
Finally! Once it percolates down to Safari and Chrome, I hope to see a real
adoption of MathML in the academic community (which tends to use IE less,
while having a stronger demand for MathML).

------
ez77
Chrome doesn't support it now. As it's WebKit based, will the next version
incorporate this feature?

~~~
ionfish
This is just a nightly build; both Chrome and Safari's public releases lag
some way behind the nightlies, for obvious reasons.

------
Aqua_Geek
Awesome! I worked on an iPhone app about 6 months ago that could have really
benefitted from this. Instead we had to use a third party lib on the server to
render the MathML into images. It was a huge mess.

Here's to hoping we see this trickle down to UIWebView soon!

------
bialecki
I wonder when search engines will start indexing MathML. I spent a good part
of college trying to figure out exactly what to search for in Google while
working on problem sets and being able to search expressions would've saved
some late nights.

~~~
est
> I wonder when search engines will start indexing MathML

More importantly, to understand the same formula under different notations.

~~~
vilya
The problem is context. A formula means nothing without it. Identifying the
correct context (or even just the most likely one) for a formula is Not Easy.

Different fields within maths, engineering & physics frequently reuse names
and symbols to mean different things, so formulas which look the same can have
completely different meanings. And as you alluded to, formulas which look
different can end up meaning the same thing.

MathML is split into presentation markup and content markup. The presentation
markup describes the rendering of a formula; the content markup describes its
semantics. If anyone actually used the semantic markup, it could help with
this problem.

------
waratuman
This is awesome. I've been waiting for this for a while.

------
pepijndevos
Are we supposed to be able to select text in an equation? Selection looks kind
of weird there, and when pasted, looks like this: ζnk1∞1kn

~~~
pierrefar
Not selecting, but making math render crisply like text does.

------
dstein
What I don't get, is why is MathML only for displaying formulas, not not for
making actual, working algorithms?

~~~
nanairo
What do you mean?

------
natmaster
Good to see WebKit picking this up as well!

