1511c7f antonApr 18, 2026 api

create index.md via macOS

A /docs/undefined +49 -0
A /docs/undefined +49 -0
1# LaTeX
2
3sublimated compiles `.tex` files to PDF + HTML on every push.
4
5## how it works
6
7- push a `.tex` file via git or the API
8- sublimated runs `latexmk` (PDF) and LaTeXML (HTML) on Modal
9- PDF stored as `render_pdf`, HTML as `render_html`, SVG pages as `render_svg`
10- HTML is the primary web view: text selection, per-block comments, search
11- PDF always available for download
12- if LaTeXML fails (exotic packages), falls back to SVG page view
13
14## features
15
16- dual output: PDF for print/submission, HTML for web review
17- structured error log: parsed from `.log` file, not raw 500-line noise
18- multi-file projects: `\input`, `\include`, `\bibliography` resolve via sbl clone
19- cascade recompilation: edit `refs.bib` and all `.tex` files that depend on it recompile
20- TOC sidebar extracted from HTML headings
21- per-block comments on HTML elements (sections, paragraphs, theorems, figures)
22
23## demo files
24
25- [basics.tex](basics.tex) — headings, lists, emphasis, quotes
26- [math.tex](math.tex) — equations, aligned math, matrices, theorems
27- [code.tex](code.tex) — code listings with syntax highlighting
28- [tables.tex](tables.tex) — tables with formatting and multicolumn
29- [figures.tex](figures.tex) — figures, subfigures, cross-references
30- [bibliography.tex](bibliography.tex) — citations and bibliography styles
31- [layout.tex](layout.tex) — page setup, columns, spacing
32- [styling.tex](styling.tex) — fonts, colors, custom environments
33- [article.tex](article.tex) — complete article using all features
34- [refs.bib](refs.bib) — shared bibliography database
35
36## multi-file projects
37
38LaTeX projects typically have multiple files. sublimated handles this:
39- `\input{chapter1}` and `\include{chapter1}` resolve relative to the .tex file
40- `\bibliography{refs}` finds `.bib` files in the same folder
41- `\usepackage{custom}` resolves local `.sty` files
42- `\documentclass{mythesis}` resolves local `.cls` files
43- dependencies tracked automatically, cascade recompilation on any change
44
45## engines
46
47pdflatex is used by default. sublimated detects when other engines are needed:
48- `\usepackage{fontspec}` → xelatex or lualatex
49- `\usepackage{luacode}` → lualatex