I write latex because most of my work eventually ends up as PDFs in journals, and there nothing comes close to comparing to LaTeX's quality. When I use markdown I end up using LaTeX extensions to write the maths anyway.
However, it would be nice I could get better html output, as PDFs aren't nice to view online.
Because actual documents are complicated? A version of Markdown capable of expressing all possible LaTeX constructs is roughly as complicated as LaTeX.
More so, I'd imagine, since some LaTeX constructs would almost certainly require an encoding to avoid confusing them with non-LaTeX Markdown constructs.
Disclosure: I'm the author of the wrapper mentioned here, and a LaTeXML and Authorea developer.
In my view, MarkDown is a great kernel for what one could call "structured writing", while LaTeX is a great exploration of, and ecosystem for, the entirety of technical writing. I see both as points of departure to finding the best approach to write 21st century technical documents. More details on that opinion at [1].
This is also part of the fundamental mission of Authorea, where we offer support for writing all of MarkDown, LaTeX and RichText today, while working hard with the larger community to arrive at better tools in the long run.
Anyhow, there are non-trivial trade-offs in making these choices, and I personally find it exciting to see where one can reap the best returns.
This looks like it just shells out[1] to a local executable.
It'd be remiss not to mention my own Ruby gem, https://github.com/gjtorikian/mathematical. It does La/TeX conversions by wrapping C code, though admittedly, it only converts the math portions.
If you're using it in daemon mode, it only shells out to boot a conversion server, and only if necessary.
From that point on it's sending very basic RESTful requests. I wouldn't recommend using latexml if you're interested in performance-critical math parsing.
Its best use case is converting entire LaTeX documents/fragments with arbitrarily complex package dependencies, macro definitions and any other power latex techniques.
I hadn't heard of LaTeXML before today. I've always simply used MathJax for my web-math needs.
So I set LaTeXML up and tried using it. I found it to be pretty easy to use, although I had to update a few things and install some perl modules. It turns out it is rather easy to convert directly from a .tex document to a MathML document. [This is using LaTeXML directly --- not through this ruby]
Something I noticed about using LaTeXML out of the box is that the resulting MathML has the original LaTeX as alt-text. So it is encoded in the page, and therefore (potentially) searchable. This is in start contrast to most MathML equations, which (can) look nice but which are neither text-searchable or easily copy-able.
Now I am a bit less-certain about my preference for MathJax instead of MathML. I wonder if anyone else has a strong preference and wouldn't mind sharing why you have that preference?
Disclaimer: I'm the author of the wrapper, and a LaTeXML and Authorea developer.
Indeed, LaTeXML has been producing great presentation MathML, since before MathJaX was created. But it's also a very different tool and the two projects are largely complementary, rather than competing. I'm happy to hear your first experiment went well, and as a note - most components, including and especially the math output, are highly configurable.
I recently counted [1] а 95% success rate by LaTeXML's math parsing on 350 million LaTeX formulas from arXiv.org. That number should be taken with a grain of salt, as it is a self-claimed parsing success, which may not necessarily mean correct+ideal MathML. But it quite often gets the job done great visually, and there is ongoing work to keep improving the coverage.
That said, MathJax has historically (and until very recently) fully embraced MathML itself, as MathML was used for its internal representation. The main problem that had/has to be solved on the web was the lack of displaying MathML support in browsers [2], and MathJax addressed that extremely well, as you know. But if, for example, you create an HTML5+MathML document with LaTeXML, and enable MathJax on it, you will get as good a result as using MathJax on HTM5L+TeX documents.
At Authorea we use both of LaTeXML and MathJax for our formula support, as well as some alternative renderers such as KaTeX and MathQuill. It's sometimes a bit too big of a hassle to do something advanced however (see [3]), so there is still some way to go.
There are certain trade-offs to be considered, but I personally see MathML as an instrumental part of making math accessible, actionable (as a native part of the DOM) and interoperable, and am happy that both LaTeXML and MathJax have embraced it historically. The MathJax team is now officially out of patience with the browser stalemate in displaying MathML, so they're looking for alternatives to move forward. Time will show how that goes I suppose...
10 comments
[ 4.1 ms ] story [ 27.6 ms ] threadI write latex because most of my work eventually ends up as PDFs in journals, and there nothing comes close to comparing to LaTeX's quality. When I use markdown I end up using LaTeX extensions to write the maths anyway.
However, it would be nice I could get better html output, as PDFs aren't nice to view online.
In my view, MarkDown is a great kernel for what one could call "structured writing", while LaTeX is a great exploration of, and ecosystem for, the entirety of technical writing. I see both as points of departure to finding the best approach to write 21st century technical documents. More details on that opinion at [1].
This is also part of the fundamental mission of Authorea, where we offer support for writing all of MarkDown, LaTeX and RichText today, while working hard with the larger community to arrive at better tools in the long run.
Anyhow, there are non-trivial trade-offs in making these choices, and I personally find it exciting to see where one can reap the best returns.
[1] "LaTeX is Dead (long live LaTeX)" https://www.authorea.com/19359
It'd be remiss not to mention my own Ruby gem, https://github.com/gjtorikian/mathematical. It does La/TeX conversions by wrapping C code, though admittedly, it only converts the math portions.
[1]: https://github.com/Authorea/latexml-ruby/blob/798795f0631a29...
From that point on it's sending very basic RESTful requests. I wouldn't recommend using latexml if you're interested in performance-critical math parsing.
Its best use case is converting entire LaTeX documents/fragments with arbitrarily complex package dependencies, macro definitions and any other power latex techniques.
So I set LaTeXML up and tried using it. I found it to be pretty easy to use, although I had to update a few things and install some perl modules. It turns out it is rather easy to convert directly from a .tex document to a MathML document. [This is using LaTeXML directly --- not through this ruby]
Something I noticed about using LaTeXML out of the box is that the resulting MathML has the original LaTeX as alt-text. So it is encoded in the page, and therefore (potentially) searchable. This is in start contrast to most MathML equations, which (can) look nice but which are neither text-searchable or easily copy-able.
Now I am a bit less-certain about my preference for MathJax instead of MathML. I wonder if anyone else has a strong preference and wouldn't mind sharing why you have that preference?
Indeed, LaTeXML has been producing great presentation MathML, since before MathJaX was created. But it's also a very different tool and the two projects are largely complementary, rather than competing. I'm happy to hear your first experiment went well, and as a note - most components, including and especially the math output, are highly configurable.
I recently counted [1] а 95% success rate by LaTeXML's math parsing on 350 million LaTeX formulas from arXiv.org. That number should be taken with a grain of salt, as it is a self-claimed parsing success, which may not necessarily mean correct+ideal MathML. But it quite often gets the job done great visually, and there is ongoing work to keep improving the coverage.
That said, MathJax has historically (and until very recently) fully embraced MathML itself, as MathML was used for its internal representation. The main problem that had/has to be solved on the web was the lack of displaying MathML support in browsers [2], and MathJax addressed that extremely well, as you know. But if, for example, you create an HTML5+MathML document with LaTeXML, and enable MathJax on it, you will get as good a result as using MathJax on HTM5L+TeX documents.
At Authorea we use both of LaTeXML and MathJax for our formula support, as well as some alternative renderers such as KaTeX and MathQuill. It's sometimes a bit too big of a hassle to do something advanced however (see [3]), so there is still some way to go.
There are certain trade-offs to be considered, but I personally see MathML as an instrumental part of making math accessible, actionable (as a native part of the DOM) and interoperable, and am happy that both LaTeXML and MathJax have embraced it historically. The MathJax team is now officially out of patience with the browser stalemate in displaying MathML, so they're looking for alternatives to move forward. Time will show how that goes I suppose...
[1] http://prodg.org/talks/mnlp_billion_token_corpora#30
[2] http://caniuse.com/#feat=mathml
[3] http://prodg.org/blog/mathml_please