Hacker News new | ask | show | jobs
by indrora 908 days ago
I remember stumbling upon your work long ago when I was working on a project to have "e-zines" that consumed a series of `article` class files and rendered them out into PDF and HTML as a series package.

I had come across latex2html, Dan Gildea's project, and found myself unpleasantly dissatisfied with how it worked. As I understand it, it's more a "half implementation of lots of packages" rather than what ar5iv seems to be, which is "enough of the core LaTeX engine producing HTML instead of DVI"? I'd love to know more about the nitty gritty of how the engine does its thing.

I'm curious: How has modern web tech (e.g. WebAssembly, Canvas, etc) helped or gotten in the way of getting good LaTeX rendering in the browser?

1 comments

Right, that's LaTeXML - it tries to emulate as much as possible of the TeX typesetting system, while retaining enough control to emit structured markup.

Which also allows us (and generally all contributors of latexml package support) to conveniently maintain various parallel data structures and metadata needed along the way.

Modern HTML is very often helpful to produce higher quality article renderings. Examples:

1. we recently started using flexbox for subfigures, allowing them to reflow.

2. we have started emitting ARIA accessibility annotations (there is now an "alt" key for \includegraphics)

3. MathML Core allowed us to have native web rendering for math expressions in every browser.

As to LaTeX rendering in the browser, there are various other projects out there you could look up with partial support. For latexml the WebAssembly route seems most realistic, as we are undergoing a rewrite in Rust. But there are quite a number of pieces to flesh out before we get there.