4 ms·
Very nice! I like how the HTML rendering is responsive and allows you to read on narrow screens. MathJax seems to handle most things, but not 100%: https://www
by ivan_ah 9y ago
Very nice! I like how the HTML rendering is responsive and allows you to read on narrow screens.
MathJax seems to handle most things, but not 100%:
https://www.semanticscholar.org/paper/Quantum-Broadcast-Channels-Yard-Hayden/8be3e848c2b69982150a3220674801e43c943ea0/read https://www.semanticscholar.org/paper/Quantum-Broadcast-Chan...
What are you using for parsing the LaTeX --> (HTML+MathJax) conversion?
- ktpsns 9y agoThe main workhorse is https://dlmf.nist.gov/LaTeXML/ https://dlmf.nist.gov/LaTeXML/ as you can find once you reach https://github.com/arxiv-vanity/engrafo https://github.com/arxiv-vanity/engrafo. LaTeXML converts tex to XML by running latex ("only latex can parse latex") and working on the DVI output. But nevertheless this is a hard job so I will loook into the engrafo code soon because I want to apply this to a book we have written.
- thecodeviking 9y agoYup, @kpsns nailed it. LaTeXML does the heavy lifting in converting TeX to XML. From there some post processing does the job of converting it to a nice responsive template (that's done by Engrafo / the ArXiv Vanity team). We love OSS at AI2, and are looking to collaborate with the Engrafo / ArXiv Vanity team as we expand the functionality.
- ktpsns 9y agoSo I digged into the code (engrafo repository) and was quite surprised that -- contrary to the suggestive title -- the method inherits all the problems LaTeXML already has. This is the fact that (for instance compared to the TeXLive distribution), tons of widespread sty files miss a LaTeXML integration and thus the conversion fails for a wide range of papers. Converting a TeX document to XML with LaTeXML really requires a lot of debugging and ideally starting from a plain LaTeX paper/book and compiling with pdflatex and latexml at the same time, making sure nothing breaks.
- thecodeviking 9y agoYea, it's tough work. We're hoping to invest more in the conversion library (and support the Engrafo's team to do so). It's going to take a lot of time and elbow grease to get it to where it needs to be!