Compiler
Local TeX output becomes editor-grade diagnostics.
LatexDo runs the user's own TeX toolchain, isolates every build, and converts noisy logs into actionable errors, warnings, and source highlights.
Connected code: electron/compiler.ts,
electron/latexDiagnostics.ts,
src/features/compile/useCompile.ts
Pipeline
- Find
latexmkfrom standard TeX locations, including/Library/TeX/texbinon macOS. - Support
pdflatex,xelatex, andlualatexthrough engine-specificlatexmkflags. - Run with
-synctex=1,-file-line-error,-interaction=nonstopmode, and-halt-on-error. - Return one compile result with PDF path, duration, raw output, diagnostics, and failure reason.
Diagnostics
- Parse file-line errors, LaTeX warnings, package warnings, class warnings, and overfull or underfull boxes.
- Detect low-information failures like emergency stops and surface the real earlier compiler problem.
- Enrich diagnostics with source context, confidence, highlight text, suggested fixes, and cascade ranking.
- Sanitize stale
latexmkfailure output so old failed runs do not confuse the user.
Runtime controls
Compile jobs are cancellable and have a timeout. On cancellation or timeout the app terminates the process group, waits briefly, then force-kills if needed. Shared cloud projects are materialized into a bounded scratch folder before local compile, with file count and size limits.