# TeXbrain

> TeXbrain is a free, open-source LaTeX editor running in your browser via WebAssembly. Compiles LaTeX to PDF locally with live preview, git integration, and works offline.

- **Category:** Developer Tools
- **Licence:** MIT
- **Open source:** oss
- **Languages:** Typescript, Svelte
- **Tags:** Git, Editor, Webassembly, PDF, Latex, Svelte, Typescript, Offline First, Browser based, Codemirror

## Description

TeXbrain is a browser-based LaTeX editor that compiles documents to PDF using a WebAssembly port of pdfTeX. It provides live PDF preview via pdf.js, complete git integration through isomorphic-git for cloning, committing, pushing, pulling, and branching, and direct local file system access via the File System Access API with an OPFS fallback. The editor is built on CodeMirror 6 with syntax highlighting, autocomplete for over 70 LaTeX commands, dark and light themes, a command palette, and a searchable snippet picker. It works offline once packages are cached, supports multi-file projects with tabs and drag-and-drop, and includes templates for articles, theses, presentations, reports, CVs, letters, and minimal documents. The application is built with SvelteKit's static adapter and deployed as static files. Known limitations include the pdfTeX engine only (XeTeX and LuaTeX are not available), no bibtex or biber support, TeX Live 2020-era packages, and git remotes requiring a CORS proxy.

## Links

- [Homepage](https://github.com/swimmingbrain/texbrain)
- [Website](https://tex.swimmingbrain.dev)
- [Demo](https://tex.swimmingbrain.dev)
- [Documentation](https://github.com/swimmingbrain/texbrain#readme)
- [Source code](https://github.com/swimmingbrain/texbrain)
- [Contributing guide](https://github.com/swimmingbrain/texbrain/blob/main/docs/CONTRIBUTING.md)

---
Source: https://selfhost.directory/project/texbrain