Purpose
LATEX is the compiled surface for governed PDF output.
Any scope that produces PDFs inherits LATEX. The pipeline is universal: governed Markdown compiles to LaTeX, LaTeX compiles to PDF. The governance lives in Markdown. The surface lives in LaTeX. The output lives in PDF. Nothing else.
Pipeline
GOV (.md) → SURFACE (.tex) → OUTPUT (.pdf)
↑ ↑ ↑
source of compiled by filed /
truth pandoc + xelatex downloaded
Markdown is the source of truth. LaTeX is compiled from it. PDF is the output artifact.
Compilation
{SOURCE}.md → pandoc (template) → {SOURCE}.tex → xelatex → {SOURCE}.pdf
↑
LATEX service governs
what pandoc emits
The compiler MUST:
- Read governed Markdown (headings, tables, math, citations)
- Apply scope-specific LaTeX template (paper, book, patent)
- Emit clean LaTeX from governed source
- Produce filing/download-ready PDF without manual editing
Template Contract
Scopes that inherit LATEX provide their own template:
| Scope | Template | Output |
|---|---|---|
| PATENT | patent template (longtable, USPTO formatting) | Filing-ready PDF |
| PAPER | academic template (abstract, TOC, citations, appendices) | Download-ready PDF |
| BOOK | book template (cover, PARTS, CHAPTERS, TOC) | Download-ready PDF |
Templates are pandoc .tex templates stored in _latex/ at the scope root.
Surface Rules
- Governed Markdown MUST be pure Markdown — zero embedded LaTeX after pipeline is built.
- Raw
{=latex}blocks are TRANSITIONAL — they exist only until the compiler pipeline covers the use case. - The compiler reads Markdown tables and emits LaTeX environments per template.
- The compiler enforces scope governance — prohibited content rejected at compile time.
- PDF output MUST be artifact-ready without manual LaTeX editing.
Ecosystem Connectivity
- Upstream:
SERVICESgovernance contracts and scope inheritance. - Downstream: PATENT, PAPER, BOOK scopes inherit LATEX for PDF compilation.
- Frontend:
paper.htmlandbook.htmllayouts link to compiled PDFs viapdf:front matter. - Toolchain:
pandoc+xelatex— same tools, different templates per scope.
Constraints
MUST: Every inheriting scope provides a pandoc template
MUST: Templates use DESIGN tokens for branding (fonts, colors, spacing)
MUST: PDF output is deterministic — same .md source = same .pdf output
MUST: Compiler rejects prohibited content at compile time
MUST NOT: Store .tex or .pdf in governance layer — they are compiled outputs
MUST NOT: Hand-edit any compiled artifact
| *LATEX | SPEC | SERVICES* |