Rendered at 22:23:10 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
jerf 5 hours ago [-]
Over the years many people have hypothesized that once WASM was really mature, it would become practical to fix the issues with web browser layout by sending down custom layout machines to users.
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.
PaulDavisThe1st 4 hours ago [-]
I added DVI support to NCSA Mosaic back in 1993-94, believing it to be a better format for "rich" documents than HTML or PDF.
Nobody else seemed convinced :(
dhosek 56 minutes ago [-]
The problem with DVI is twofold:
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.
gjvc 2 hours ago [-]
pretty sure I remember reading about this with excitement and wonder ...
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.
jerf 5 hours ago [-]
I feel like it's fair to say that you have not "fixed the issues with browser layout" if you lose accessibility and input. System fonts I can live without, we can push our own, but those two things are a big deal.
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".
exe34 2 hours ago [-]
Nowadays I imagine OCR and vllms would solve that? Tesseract is incredibly fast and accurate.
nicoburns 4 hours ago [-]
I mean, I agree it's not fixed. I guess I'm just saying it's not the layout engine that's the blocker.
FWIW, I actually think it would be much more valuable just to fix the spec and make CSS layout fast-by-default.
LudwigNagasena 3 hours ago [-]
Hard to imagine anything worse than LaTeX for web layout. Imagine resizing a page and waiting for the re-compilation of the whole page.
jerf 3 hours ago [-]
That's part of the reason I'd find it so funny, yes.
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.
stschaef 5 hours ago [-]
I immediately received the following error :|
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
kridsdale1 3 hours ago [-]
Same.
dunham 4 hours ago [-]
Is this related to web2js[1], which has been around for a while? It compiles the pascal code of TeX to wasm.
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.
Add LuaLaTeX and you're cookin' with gas. For real would be fantastic if we could get more or less the full LaTeX ecosystem readily and rapidly available online and in a huge variety of desktop applications.
fph 1 hours ago [-]
I'm looking forward to run Lua inside Latex inside Javascript inside Firefox inside my Android ART virtual machine.
kridsdale1 3 hours ago [-]
I’m really glad the main AI chatbot apps and sites support latex rendering. I tuned my system prompts to get the bots to explain their high level reasoning in equations for me to read if they think it will convey more nuance or dimensionality than casting down to English.
andai 1 hours ago [-]
I might be interested in running this offline too. Every time I try to do anything with LaTeX it pulls gigabytes of stuff but it's somehow still not batteries-included. I'm assuming this distribution is a bit more curated and out-of-the-box.
williamstein 5 hours ago [-]
https://www.swiftlatex.com/editor.html for the wysiwyg editor says "We are working hard to fix the editor." It has said this for many years. I think I tried it once when it was live and it was pretty cool. My guess is people observed it could corrupt documents, so it was taken down.
christoff12 2 hours ago [-]
> Due to the way Bibtex works, you may need to compile at least three times to see correct reference numbers in the PDF.
I'm not sure I understand why the second or third compile would work, but not the first.
It is not 3 compiles of the same code after another, but e.g. latex, bibtex, latex, with each step creating part of the final output. I imagine latex like part of multi-pass compiler, so calling latex once is like running only one stage of the compiler. Latexmk (https://www.ctan.org/pkg/latexmk) solves this problem more elegantly by knowing how often each tool and in what order is required.
exe34 2 hours ago [-]
In latex, I have to compile once so that it can find out the references it needs, then bibtex so that it extracts the actual references, compile a second time to get the references into the paper and then a third time because a ton of things shift around and now it knows all the figure/page numbers etc.
casey2 35 minutes ago [-]
Pretty funny that there is both an installation and that its not cross platform. What is the point of web assembly again?
psc007 3 days ago [-]
Why is there no npm registry package?
hulitu 1 days ago [-]
> LaTeX Engines in Browsers
This is hillarious. Browsers lost the ability to print some 10 years ago.
Today, printing a web page is an exercise in masochism.
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.
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.
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.
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.
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.
[1]: https://github.com/kisonecat/web2js
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.