10 ms·
So, I originally posted this last year. When I posted it, I was using tectonic as my LaTeX compiler, and since it didn't support HTML output yet, I didn't actua
by pyjamafish 3y ago
So, I originally posted this last year. When I posted it, I was using tectonic as my LaTeX compiler, and since it didn't support HTML output yet, I didn't actually try the article's suggestion.
Today, when I saw that I got an invitation to repost this article from the mods, I thought I'd take the time to try it out.
The two commands that the article suggests can be combined into one:
latexmlpost --dest=mydoc.html --format=html5 <(latexml mydoc.tex)
I did a comparison[1] of pdflatex and latexml using some old assignments, and it looks like compiling to HTML isn't fully there yet: the spacing was off in some places, and manual line breaks didn't work. But, I remain hopeful. If this gets polished, viewing LaTeX documents on phones would be much nicer.
[1]: https://imgur.com/a/yyyXWL8 https://imgur.com/a/yyyXWL8
- thewakalix 3y agoWhat's the advantage of that subshell redirection over a simple pipe?
- pyjamafish 3y agoI don't know if there's an advantage, haha. It was just the first thing that came to mind. Looks like a pipe is also supported; you just need to pass `-` as the name of the file to `latexmlpost`. latexml mydoc.tex | latexmlpost --dest=mydoc.html --format=html5 -
- tkw01536 3y agoYou can actually also use the latexmlc omni-executable [1] (that is part of the latexml distribution), which can convert to html in one command: latexmlc --dest=mydoc.html --format=html5 mydoc.tex [1] https://math.nist.gov/~BMiller/LaTeXML/manual/commands/latexmlc.html https://math.nist.gov/~BMiller/LaTeXML/manual/commands/latex...
- PrimeMcFly 3y ago> Today, when I saw that I got an invitation to repost this article from the mods The mods personally invited you to repost a year later?
- pyjamafish 3y agoYes! I was surprised too. It's a cool hidden mechanic of HN, the second chance pool[1]. [1]: https://news.ycombinator.com/item?id=26998308 https://news.ycombinator.com/item?id=26998308
- PrimeMcFly 3y agoInteresting! Thanks for the link :)
- marknazzaro 3y agoThere's some good news... arXiv just adopted LaTeXML for in-house HTML conversions of its papers. They allow users to submit bug reports and have collected over 700 so far. LaTeXML is maintained by a team at NIST, and they are actively responding to the bug reports on github issues. The LaTeX team headed by Frank Mittelbach is also working to add more structural information to the output of LaTeX, which will make compiling to HTML much easier.
- deleted 3y ago[deleted]