Urgent.News

What's breaking now, across thousands of outlets.

Tech

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

A new open-source LaTeX editor called TeXbrain allows users to write and compile LaTeX documents directly in their web browsers. No accounts, installations, or servers are required – just open a tab and start writing. The editor is built on CodeMirror 6 with a custom LaTeX grammar and offers autocomplete features. It supports multiple open files and syncs content between the local filesystem and an in-memory git working tree.

The compilation engine uses SwiftLaTeX's pdfTeX, running in a memory filesystem (MEMFS) to handle file requests. Resolved files are cached in the browser's storage to ensure efficient downloads. Git operations are handled by isomorphic-git, a JavaScript implementation of git, with remote operations going through a CORS proxy. The PDF viewer is powered by Mozilla's pdf.js, supporting multi-page rendering with selectable text.

The app utilizes the File System Access API to read/write files locally on Chromium-based browsers, while other browsers use an Origin Private File System fallback. TeXbrain is a full client-side LaTeX editor that compiles .tex files to PDFs right in the browser, requiring no backend or server processing. It can be accessed at http://localhost:5173 in supported browsers, with full functionality requiring the File System Access API.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in Tech

Feedback for the first post on my blog

I just started a blog and published my first blog post about Logical Volume Management. I'm new to documenting my work, so I'd really appreciate any feedback on the content, clarity, or writing style…

More from Tuesday 25 August →