Te

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

Hacker News

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

I'm a master's engineering student and a big fan of LaTeX, which I used for my thesis and research articles. I have used Overleaf and that was fine until I wanted to git sync, which unfortunately sits behind a paywall. Since I didn't want to pay subscriptions for things that should simply just work, I built the editor I wanted in my free time, where you open a tab, write LaTeX, get your PDF and the files stay all in one folder on my disk. TeXbrain is a static site with no backend. pdfTeX is compiled to WebAssembly (SwiftLaTeX) and runs in your browser. The editor can read and write your project folder through the File System Access API, so you can use git, any local TeX install, local AI Agents, or any other editor on the same files. Git is built in through isomorphic-git for anyone who would rather not touch a terminal and clone, branch, commit, push or pull via commands. No account is needed, no analytics, and everything works offline after the first load. Try it out: https://tex.swimmingbrain.dev/ (Chromium browsers get direct folder access, while Firefox or Safari fall back to a virtual filesystem) Or for self-hosting/contributing: https://github.com/swimmingbrain/texbrain (MIT, the pdfTeX engine is EPL 2.0 / GPL 2.0 and is listed in the THIRD_PARTY_LICENSES file). The part I'm most proud of getting to work is the package loading. The engine itself is only 1.8 MB. When it asks for a file it doesn't have, then a service worker intercepts the request and resolves it through Cache Storage first, then a small bundled subset, then a TeX Live tree mirrored on jsDelivr, then a SwiftLaTeX style server as a last resort. Every file is fetched once at most and after the first successful compilation, the core subset is prefetched in the background so that the offline story actually holds. Only file names go over the network, never any document content. So far, it only supports pdfTeX (no XeTeX or LuaTeX), so fontspec or polyglossia won't work, packages are pinned to the TeX Live 2020 era to stay coherent with the engine's format file and there is no bibtex or biber in the engine yet, which is maybe the roughest edge. This is should be a good solution for people on a work laptop, a Chromebook, or a university lab PC where installing TeX Live isn't always an option, and people who don't want to maintain a TeX install at all. If you already have a local setup you like, keep it. This isn't necessarily thought as a replacement for that. Some people have already used it for their thesis in the past months and their bug reports (which I would never have hit on my own) were then most of the summer's work. The first outside PR also landed recently, so if something doesn't compile for you, an issue with the package name or the bug itself is the most useful thing you can send me!

Share card

Actual performance

118points
28comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, latex · Missing: reddit linkedin, podcasting, created
94%94% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: agents, agent, open · Missing: mac, macos, cursor
85%85% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: lua, filesystem, ide · Missing: https docs, excited, just released
72%72% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: month, way · Missing: mobile apps, ios, personal
37%37% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: host · Missing: plus, platform, intuitive
34%34% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: subscription, sde · Missing: arr, mrr, revenue
23%23% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ti
TikZ Editor – WYSIWYG editor for figures in LaTeX80%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TikZ Editor – WYSIWYG editor for figures in LaTeX

Hacker News451
AI
AI Latex editor built with emscripten68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI Latex editor built with emscripten

Hacker News4
VA
VAX/VMS 5.5 now runs in browser55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

VAX/VMS 5.5 now runs in browser

Hacker News3
Te
TexSandbox – An AI-assisted LaTeX editor, in the browser56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TexSandbox – An AI-assisted LaTeX editor, in the browser

Hacker News2
Pe
Petal – An In-Browser Editor for LwDITA71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Petal – An In-Browser Editor for LwDITA

Hacker News1
A
A Voxel Editor in the Browser71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Voxel Editor in the Browser

Hacker News1
<1
<15MB Local-first Interactive LaTeX Scratchpad in the Browser69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

<15MB Local-first Interactive LaTeX Scratchpad in the Browser

Hacker News5
LaTeXWriter
LaTeXWriter45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Best Collaborative LaTeX Editor

Product Hunt+108Writing
Pa
Paperman – LaTeX editor with a Markdown feel74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Paperman – LaTeX editor with a Markdown feel

Hacker News120
(l
(lax) a pythonic way of writting latex74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

(lax) a pythonic way of writting latex

Hacker News12