SnapTeX
Fast, local-first LaTeX editing and structural preview for VS Code and the browser.
Open SnapTeX Web · Read the documentation · Install the VS Code extension
What's new in 0.8.2: Open PDFs in the Web preview and navigate between PDF and source with offline SyncTeX. Web editing now auto-saves after a quiet delay while preserving cursor position and undo history; server projects also support Ctrl+B compilation. This release adds more Web themes and fixes table rules and project-relative graphics paths in both preview backends.
SnapTeX renders prose, math, references, citations, figures, PDFs, tables, algorithms, theorem-like environments, and TikZ without requiring a local TeX distribution. It is designed for responsive writing and navigation; use a full TeX toolchain for final pagination and publication output.
Demo
| Bidirectional sync |
Automatic scroll sync |
 |
 |
| Rich structural preview |
Fast local updates |
 |
 |
Choose a Host
| Host |
Best for |
Storage |
| VS Code extension |
Native local editing and workspace integration |
Local VS Code workspace |
| Static Web/PWA |
Browser editing, offline use, and portable workspaces |
Local folder handles or IndexedDB |
| SnapTeX Server |
Named projects stored on infrastructure you control |
Authenticated server project directory |
The public Web app performs document processing locally and does not upload local-folder or browser-workspace contents. Remote projects are available only in a separately deployed server edition.
Quick Start
VS Code
- Install SnapTeX from the VS Code Marketplace.
- Open the root
.tex file.
- Press
Ctrl+K V (Cmd+K V on macOS).
Use Ctrl+Alt+M (Cmd+Alt+M) to reveal the editor cursor in the preview. Double-click preview content to return to its source.
Web
Open SnapTeX Web and choose Open Folder, Import Folder, or Open Demo. History reopens recent browser workspaces and supported local folders; imported projects and the demo persist in browser storage and can be exported as ZIP.
Auto save is enabled by default after one second without edits; Ctrl+S saves immediately. Click a PDF in Explorer to view it, and use TeX Preview to return. A matching .synctex.gz or .synctex file enables double-click and Ctrl+Alt+M source navigation without per-query server requests. Generate it by compiling with -synctex=1; server projects can compile with Ctrl+B. See the Web guide and server setup for storage, compilation, and offline limits.
Highlights
- Elastic paged preview with flexible page-bottom space, alongside optional continuous mode.
- KaTeX math, PDF.js figures, and bundled TikZJax rendering.
- Block hashes, incremental patches, and dependency-aware refreshes.
- Default virtual mode for lower DOM and heavy-resource memory use on long documents.
- Bidirectional navigation, automatic scroll sync, references, and contextual tooltips.
- External BibTeX and inline
thebibliography previews.
- Structured metadata for titles, authors, affiliations, email addresses, abstracts, and keywords.
- Shared rendering core across VS Code, standalone Web, PWA, and server hosts.
- Web PDF viewer with local SyncTeX queries, automatic saving, and conflict-aware external updates.
- Extensible render, metadata, dependency, AST, and splitter rules assembled in
src/rules.ts.
See Rendering Support for details and intentional compatibility boundaries.
Development
npm ci
npm run compile
npm test
Web and documentation commands:
npm run web:serve-static # static Web app + docs
npm run docs:dev # documentation development server
npm run web:build-server # server-enabled Web assets
For corpus-based rendering checks, see the arXiv source audit. Downloaded paper sources are kept locally and are not packaged.
The maintained guides cover:
Core Dependencies
SnapTeX is licensed under GPL-3.0-or-later.