I would find it hilarious if LaTeX turned into a leader in that space. I doubt it could hold on to that. There's a lot of things that something designed from the beginning for web-like uses could probably improve on that would be capable of overcoming LaTeX. But I could see a world where it carves out a niche and holds on to that niche for a long period of time.
We already have a very powerful layouting engine: the web browser. The only missing piece is printing/pagination, for which there was some CSS Paged Media progress, but that stalled.
However, why the hell are we even doing paged media? For screen viewing it's strictly worse, and very few people print papers anymore. And even for those HTML pages print passably enough.
Nobody else seemed convinced :(
First, font support is purely by reference which means that you need some way of connecting the fonts used in the document with the DVI file. Use of the wrong font could produce some spectacularly bad output.
Second, graphical support, other than rectangular boxes is only handled through the xxx opcode which never had any standardized meaning (although I tried). This limitation also applied to colors. Really, it was only with the final victory of PDF as the universal document format that these limitations were finally ameliorated.
In 1993/94 ? It was a much stronger candidate, and given that any DVI (including images) could be rendered into PDF (or whatever), its supposed technical limitations at that time were not of much significance.
The things you can't do are things like expose an accessibility tree (without a dummy DOM), interact with the system IME, and access system fonts.
Even input you might be able to hack around but accessibility is a big deal and the "hack" at that point is nearly to both lay it out in the browser and the supposed "fixed" layout system, and while that may work in some sense I again have lots of questions about whether that is really "fixed".
FWIW, I actually think it would be much more valuable just to fix the spec and make CSS layout fast-by-default.
It's solvable, except for what isn't solvable because the browser doesn't expose it, which can be solved by fixing that too. But it's a lot more work than meets the eye. And building the layout engine is hard enough in the first place. Give me a week and an AI budget and I'll produce you some sort of layout engine that works when fed exactly the sorts of inputs I anticipated, but to build something that survives contact with the real world is going to be well beyond something you just prompt your way around today.
The reason why I consider it a possibility is that LaTeX has two things out of the gate: The technical capability, and a small but arguably rabid user base. It's the sort of thing that can take an early lead but is quite unlikely to sustain it.
But you can't deny that LaTeX has had incredible staying power, despite the list of issues that everyone who uses it has with it.
Now if only the browser conglomerates can disrupt Pantone too...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (SwiftLaTeX PDFTeX 0.3.0) (preloaded format=swiftlatexpdftex) I can't find the format file `swiftlatexpdftex.fmt'!
Likewise for XeTeX
It looks like the live demo is no longer up, but it did run latex in the browser and render the dvi output to html. The wasm for TeX is about 495kb / 88kb compressed, but the memory image for LaTeX was a bit larger.
I'm not sure I understand why the second or third compile would work, but not the first.
This is hillarious. Browsers lost the ability to print some 10 years ago. Today, printing a web page is an exercise in masochism.
I am very curious how the output will look like.