Live data from Hacker News

Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

github.com

11–20 of 31 posts

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#14
Why you choose to base this off of TeX Live 2020? Is that just when you initially started the project, or are there some incompatibilities with the later versions?

Also, we (the TeX Live team) would be happy to add Wasm as an officially-supported platform, it's just that nobody has volunteered yet [0]. Coincidentally, someone else suggested something similar to us a few months ago [1]. Feel free to reach out if you're interested.

[0]: https://tug.org/texlive/build.html#volunteers

[1]: https://github.com/TeX-Live/texlive-source/issues/87

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#15
post #7

This is super cool. I wish there was something like this for ConTeXt too.

My project https://latex.to supports ConTeXt (plus all other TeX Live engines). Click + then New from showcase then ConTeXt to try it.

Cool! But it appears to always use LuaTeX as the engine, so only the older MkIV format is supported, and not the current LMTX format. The caching also doesn't seem to work quite right, since it appears to regenerate the font caches every time that you run it, which makes recompiles quite slow.

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#16
Cool, this project looks very interesting!

I tried uploading a .tex file created earlier this year and was able to see a PDF preview without any additional configuration.

As someone who has a local TeX setup, I'm a fan of your approach to loading dependencies on demand with a service worker. The installation process on my computer took a while because it was downloading a bunch of dependencies I didn't need.

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#17
post #10

Earlier quoted context omitted.

I wrote a Markdown -> ConTeXt -> PDF editor that may interest you. * https://keenwrite.com/ * https://keenwrite.com/screenshots.html

Interesting. I usually use pandoc for converting my Markdown, which goes via LaTeX. Is there a specific reason you picked ConTeXt?

> I usually use pandoc for converting my Markdown

See my Typesetting Markdown series:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow...

> Is there a specific reason you picked ConTeXt?

LaTeX:

* doesn't (easily, or practically) separate content from presentation;

* has arcane, antiquated syntax;

* packages can have namespace conflicts (rare, but happens);

* requires package installation for additional features.

ConTeXt, being monolithic and newer, avoids all those issues. The feature matrix lists a number of samples typeset with ConTeXt:

https://keenwrite.com/blog/2025/09/08/feature-matrix/

FWIW, pandoc has the ability to generate ConTeXt code.

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#18

Why you choose to base this off of TeX Live 2020? Is that just when you initially started the project, or are there some incompatibilities with the later versions? Also, we (the TeX Live team) would be happy to add Wasm as an officially-supported platform, it's just that nobody has volunteered yet [0]. Coincidentally, someone else suggested something similar to us a few months ago [1]. Feel free to reach out if you'r…

The 2020 part isn't really something I chose, it comes with the SwiftLaTeX engine, which ships a precompiled format from that era. I just inherited it with the engine.

The format and packages have to agree, and when I pulled in newer packages against that old format, some things broke (hyperref had changed its aux label format, for which I ended up backporting a padding fix, and babel was missing some aliases in the mismatched version, e.g. brazil-portuges).

And yes, I'd be very happy to help with that and will get in touch via the volunteers page!

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#19
post #4

Does this work on Firefox or Safari? You say “Firefox or Safari fall back to a virtual filesystem” but somehow I can’t get this fallback to work. When I click New Project I just get a reminder to use Chrome or Edge. Is there a button to press to trigger the fallback?

There's no button (that's a gap on my side, not intended behavior). New Project currently goes only through the folder picker, so on Firefox or Safari it just stops there. The virutal filesystem fallback is only in Open File, which is also why zahrevsky's workaround gets you in.

I'll make New Project also fall back the same way, so it works in Firefox and Safari without the detour.

Re: Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

#20
post #4

Does this work on Firefox or Safari? You say “Firefox or Safari fall back to a virtual filesystem” but somehow I can’t get this fallback to work. When I click New Project I just get a reminder to use Chrome or Edge. Is there a button to press to trigger the fallback?

I'm on Safari, and it seems you can open your local LaTeX file to use the tool. It's an “Open file” button at the top. Although I agree that it would be cool to have some hello-world example pre-opened.

The hello-world example sounds like a good idea, I'll try to add that as well, so that the user lands on a working document.
Post reply on HN