claude-prism/apps
Peter-Bot 51b6d6abec feat: add local TeXLive as alternative LaTeX compilation backend
Tectonic's limited package support makes it unusable for academic work
with custom .sty/.cls files. This adds opt-in support for shelling out
to a locally installed TeXLive distribution.

Backend (latex.rs):
- compile_with_texlive(): multi-pass compilation (2-3 engine passes +
  optional bibtex/biber), with xdvipdfmx fallback for .xdv → .pdf
- find_texlive_binary(): resolves binaries via PATH, standard install
  locations, and macOS login-shell fallback for GUI apps
- detect_bib_tool(): scans .tex for biblatex/bibliography to choose
  biber vs bibtex
- texlive_env_path(): injects TeXLive bin dir into subprocess PATH so
  xelatex can find xdvipdfmx internally
- detect_texlive Tauri command: reports available engines and version
- compile_latex gains use_texlive parameter; error messages show which
  backend ran (e.g. "Compilation failed (TeXLive/xelatex)")
- All paths passed to TeX are relative to avoid tilde expansion in
  iCloud paths (com~apple~CloudDocs)

Frontend:
- New settings-store.ts with persisted compilerBackend preference
- Backend selector dropdown in PDF preview toolbar
- All compile call sites pass the setting through to the backend
- detectTexlive() and TexliveStatus for engine availability checks

Tectonic remains the default. TeXLive is opt-in via the toolbar
dropdown. All existing tests pass (152/152).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 00:02:38 +01:00
..
desktop feat: add local TeXLive as alternative LaTeX compilation backend 2026-03-27 00:02:38 +01:00