Skip to content

About

WarraqCraft - clean-room, Rust-native LaTeX authoring and typesetting environment (ArtCraft family): local-first, Overleaf-class desktop UX

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

WarraqCraft icon: a cream pen nib on a navy tile with a gold accent

WarraqCraft

A LaTeX studio for the desktop; open source, local-first, built in pure Rust.
Overleaf-class editing comfort — project awareness, real compilation, SyncTeX,
citations, history — without a server account or cloud dependency.
The typesetting engine under the writing tools — LaTeX-grade PDF output
and BibTeX/CSL-JSON citations on your own machine.
Named after the warrāq (ورّاق), the paper-makers and copyists of the medieval manuscript trade.
macOS · Windows · Linux · BSD · the web

License: MIT OR Apache-2.0 Written in Rust Runs on macOS, Windows, Linux, BSD and the web Agent-drivable over MCP Status: alpha
Listed on Remade

Quick start · Highlights · Features · Layout · Status · License


Quick start

cargo run -p warraqcraft                                   # the studio
cargo run -p warraqcraft-cli -- check paper.tex            # structural issues (exit 1 if any)
cargo run -p warraqcraft-cli -- compile paper.tex          # system-TeX compile → .warraqcraft/
cargo run -p warraqcraft-cli -- parse paper.tex            # document structure outline
cargo run -p warraqcraft-cli -- mcp                        # MCP server on stdio

Compilation uses a bundled Tectonic when present, or a detected system XeLaTeX/LuaLaTeX/pdfLaTeX.

Highlights

A real project editor

File tree, syntax highlighting, folding, command/environment completion, live diagnostics and cross-file navigation through \input/\include graphs.

Compile and navigate

Tectonic or system TeX, hayro-rendered PDF preview, clickable error log, and two-way SyncTeX — click the source, land on the PDF; click the PDF, land on the line.

Multilingual by design

16 document languages and a bidirectional-aware UI — Arabic-script text renders correctly through run-level bidi and font fallback, with 144 original templates.

Feature overview

  • Compile and preview — bundled Tectonic subprocess when present, or a detected system XeLaTeX/LuaLaTeX/pdfLaTeX; hayro-rendered PDF preview; clickable error/warning log; two-way SyncTeX navigation.
  • Editing helpers — slim formatting toolbar, section and math insertion, common environments, categorized Greek/operator/relation/arrow symbol palette, line operations and occurrence mirrors.
  • Documents and recovery — untitled buffers protected by dirty-state guards; autosave of text, path and cursor offered on restart; external disk changes surface an explicit reload/overwrite choice, never silent data loss.
  • Git collaboration — repository detection, branch/status display, initialize/pull/push/commit, conflict counts and guarded branch commands; credentials stay with the user's Git tooling.
  • Bibliography and references — project-wide \label/\ref completion, .bib parsing, inline \cite key completion, searchable cite dialog and bibliography backend detection; cite.fetch resolves DOI/arXiv/PMID records, bib.import folds a reference manager's CSL-JSON (Zotero) or RIS export into a project .bib with deduplication, bib.audit flags duplicates, and the library pane attaches PDFs per cite key. Deliberately not a reference manager — Zotero already covers storage, free — WarraqCraft cites from the library you already keep and differentiates on typesetting and authoring.
  • Templates — 144 original source-only starters (article, beamer, letter, report, book, thesis, CV, homework, poster × 16 document languages) plus an explicit user/community import that records provenance.
  • History and tools — .warraqcraft/ snapshot history, named user tools, math preview, document statistics, Hunspell spell-checking, printing and PDF export.
  • Multilingual UI — English fallback plus Arabic, Persian, Urdu, French, Italian, German, Spanish, Portuguese, Turkish, Latin, Russian, Mandarin, Japanese, Korean and Hindi.
  • Automation surfaces — the same engine commands from the GUI, warraqcraft-cli, the opt-in TCP control channel and the opt-in MCP server.

The layout

Layered like the sibling craft apps; nothing below L6 touches egui/winit:

Layer Crate Job
L0 texparse .tex lexer/structure scan, .bib parser, SyncTeX data
L1 typeset boxes/glue, Knuth–Plass line breaking, math layout
L2 texpdf, texbib PDF writer; BibTeX/CSL-JSON/RIS import & render
L3 texpkg package/class registry + loader (arabdoc built in)
L5 engine command registry + Session guard
L6 mcp, ui-egui JSON-RPC server; egui studio UI
L7 apps/* warraqcraft studio + control server, warraqcraft-cli

cargo xtask layers enforces the stack. Everything is a command: document.compile, cite.insert, figure.insert, project.snapshot, history.diff — reachable identically from the GUI, CLI, control channel and MCP.

Status

Alpha. The desktop studio already supports multi-file LaTeX projects, real compilation, PDF preview, SyncTeX navigation, templates, citations, local history, autosave recovery, spell-checking and a 16-language bidirectional-aware UI. The in-process ArtCraft-tradition typesetter remains a research track. ROADMAP.md tracks what lands next.

WarraqCraft is LaTeX-compatible; it does not claim to be TeX.

License

MIT OR Apache-2.0. Clean-room: semantics come from public sources only — The TeXbook's published algorithms, LaTeX2e/3 public documentation and CTAN package docs. No GPL/LGPL code (pdfTeX, LuaTeX, BibTeX, biber stay banned); Tectonic's MIT core is the one allowed engine dependency; \write18-style shell escape is always disabled.

About

WarraqCraft - clean-room, Rust-native LaTeX authoring and typesetting environment (ArtCraft family): local-first, Overleaf-class desktop UX

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages