Rules Rendering Pipeline
Canonical Sources
| Manual | LaTeX (edit this) | Generated |
|---|---|---|
| Multi-trail Warp / Warp 12 | RULES.tex | RULES.pdf, RULES.html, RULES.md, apps/Warp12/public/rules.pdf |
| Warp 6 Classic Dominoes | RULES-Classic.tex | RULES-Classic.pdf, RULES-Classic.html, RULES-Classic.md, apps/Warp12/public/rules-classic.pdf |
Do not manually edit the generated HTML / Markdown / PDF files — they are overwritten on next build.
Build Pipeline
yarn build:rules # rebuilds both manuals when inputs change
yarn build:rules:force # force both even if stamps match
tools/build-stamped.mjs (rules target):
- Two
pdflatexpasses per.tex(settleslongtablewidths) - Pandoc → HTML (MathJax) and GitHub-flavored Markdown
- Copies PDFs into
apps/Warp12/public/
Runtime
- React imports
RULES.htmlviaapps/Warp12/src/content/rules-source.ts - PDF embeds:
/rules.pdf(multi-trail),/rules-classic.pdf(Warp 6)
Why Not Browser-Side LaTeX?
We tried latex-content-renderer but it only supports simple LaTeX fragments. These manuals use multi-level sections, longtable, and cross-references — Pandoc at build time is the reliable path.
Dependencies
- pandoc:
brew install pandoc - pdflatex: MacTeX / TeX Live (
brew install --cask mactex-no-gui) - MathJax CDN: loaded in
index.htmlfor HTML math