Live data from Hacker News

LaTeX.wasm: LaTeX Engines in Browsers

swiftlatex.com

41–42 of 42 posts

Re: LaTeX.wasm: LaTeX Engines in Browsers

#41
post #39

Earlier quoted context omitted.

Citations. Until we can cite specific passages in HTML as quickly, easily and readably as we can cite pages in paged media, HTML will remain a second class citizen for serious scholarship.

Sections, anchors, url text fragments. In many fields citing a page is also quite rare.

Yes, I'm aware. The problem with anchors is that the author has to take care to make them both unique and human-readable across the whole document. The problem with URL text fragments is that they generally become too long to be a citation. Both need quality-of-life improvements in the tooling before academics will consider using them.

For example, it's pretty easy to use CSS counters to create as many automatically incrementing counters as you need. Page number, section number, theorem number, etc. But (a) you can't do this in raw HTML, which means you can't rely on this working in any user agent that has poor support for CSS; and (b) you can't refer to the values of those counters outside of CSS. Thus, there's no way for you, as an author, to write the write the equivalent of LaTeX's "See Theorem~\ref{thm:foo}" in HTML and rely on having it auto-numbered and rendered correctly wherever your readers are. So the number has to already be there as text in the HTML, and you need a separate, document-unique id attribute coordinated with the number to use for linking. This means you need a separate compilation step to produce the HTML, so you've lost pretty much the only advantage that HTML had over LaTeX.

But fundamentally, the problem is that citation practices assume that the reading format is controlled by the author/publisher, so that all readers are looking at a common view of the document, whereas the Web assumes that the reading format is controlled by the user agent, and user agents vary widely. Thus, on the Web, you need formatting-independent citation practices, which have not yet evolved, or at least not become widely used, because it's too hard compared to page-based media, which have been working for centuries.

Re: LaTeX.wasm: LaTeX Engines in Browsers

#42
Is anyone else where familiar with MathML[1] and tried using it place of LaTeX?

Obviously not a replacement for all usecase of the above package (like rendering existing documents), but I use mostly for rendering math here and there in my own notes, I prefer it as I can render math without any dependencies, some examples here [2].

That said I'm my own user and mostly view it the same browser, but I've heard there are inconsistencies in rendering in different browsers.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML

[2] https://akst.io/notes/?app=unsw.3202.07#uc-widget-0-title-13

Post reply on HN