5 ms·
Announcing ... MathML! (WebKit)
- waratuman 16y agoThis is awesome. I've been waiting for this for a while.
- Aqua_Geek 16y agoAwesome! 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!
- lmkg 16y agoAre 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.
- kohlhase 16y agoWe use the LaTeXML system [http://dlmf.nist.gov/LaTeXML/ http://dlmf.nist.gov/LaTeXML/], see also http://trac.mathweb.org/LaTeXML http://trac.mathweb.org/LaTeXML for developer-related stuff. LaTeXML can transform (most of) your LaTeX documents to XHTML+MathML which can then be presented in the browser. In the arXMLiv project [http://arxmliv.kwarc.info http://arxmliv.kwarc.info] you can see LaTeXML in action: we have transformed the majority (over half a million articles) of http://arxiv.org http://arxiv.org.
- fiddlosopher 16y agoI wrote a Haskell library, [texmath](http://github.com/jgm/texmath http://github.com/jgm/texmath) that converts LaTeX to MathML; this is used in pandoc and gitit. The library comes with two executables, one a standalone command-line converter, another a CGI program. There's an interactive demo [here](http://johnmacfarlane.net/texmath http://johnmacfarlane.net/texmath). The library just handles standard LaTeX math + AMS extensions. It doesn't yet know how to parse macros.
- _delirium 16y agoSeveral 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 http://www1.chapman.edu/~jipsen/mathml/asciimath.html), which inspired LaTeXMathML (http://math.etsu.edu/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/ 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/ http://gva.noekeon.org/blahtexml/
- nimrody 16y agoThere is also mathjax (http://www.mathjax.org/ http://www.mathjax.org/) which can render MathML if your browser supports it (the actual markup you use is the de-facto standard LaTeX notation). Now I only need something that will let me paste Matlab figures into HTML documents as SVG... (would make for a great research wiki.)
- koenigdavidmj 16y agoI am quite fond of http://golem.ph.utexas.edu/~distler/blog/itex2MML.html http://golem.ph.utexas.edu/~distler/blog/itex2MML.html . It's not exactly the same, but the only glitch that you are likely to hit is that "ab" is not the same as "a b": the first is one variable (MathML has the concept of multiletter variable names), and the second is two variables neighbouring.
- carterschonwald 16y agocheck out pandoc http://johnmacfarlane.net/pandoc/ http://johnmacfarlane.net/pandoc/
- avar 16y agoMediaWiki has a tool that parses LaTeX, sanity checks it, and can spew out LaTeX again or a very limited version of MathML. If anyone out there knows OCaml enough to improve its emitter that would mean MathML for Wikipedia articles in WebKit browser once this comes out.
- wtallis 16y agoWindows 7 has the Math Input Panel, which lets you write equations on a tablet and convert them to MathML. The same recognition engine can be used from OneNote, which I've used to take notes during a lecture and later convert to a decent-looking document.
- dhimes 16y agoI use Open Office, and export. The OO editor is pretty quick for typing math. I then have a couple of scripts that clean things up a bit.
- Groxx 16y agoWeird... 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 16y agoInteresting. 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?
- natmaster 16y agoGood to see WebKit picking this up as well!
- bialecki 16y agoI 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 16y ago> I wonder when search engines will start indexing MathML More importantly, to understand the same formula under different notations.
- tomjen3 16y agoThat would be nice, but whether two formulas are equivalent is undecidable.
- vilya 16y agoThe 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.
- pepijndevos 16y agoAre 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 16y agoNot selecting, but making math render crisply like text does.
- ez77 16y agoChrome doesn't support it now. As it's WebKit based, will the next version incorporate this feature?
- ionfish 16y agoThis is just a nightly build; both Chrome and Safari's public releases lag some way behind the nightlies, for obvious reasons.
- omaranto 16y agoWhen 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.
- nanairo 16y agoFinally! 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).
- dstein 16y agoWhat I don't get, is why is MathML only for displaying formulas, not not for making actual, working algorithms?
- nanairo 16y agoWhat do you mean?