Problem
PR CI renders only the website profile. .github/workflows/preview.yml's render job
calls Morrison-Lab/gha/.github/workflows/preview.yml@v2, which its own header comment
documents as fixing render-profile website. The PDF, docx, and revealjs renders happen
only in publish.yml, on main:
quarto render --to pdf
quarto render --to docx --no-clean
quarto render --to revealjs --no-clean
So a change that renders fine as HTML/MathJax but breaks LaTeX passes every PR check and
only turns red after it has merged, on the publish run — where it also blocks the site
deploy for everything else that has landed since.
Evidence
#1134 introduced \v0 in
chapters/parametric-survival-models.qmd. Every check on that PR was green. It merged, and
the next publish run died in LuaLaTeX:
Use of \v doesn't match its definition.
l.1610 ...tackrel{\text{def}}{=}{\lambda}(t \mid \v0
(run 34375808884,
tracked as #1155, worked around in
#1159, root cause upstream in
d-morrison/macros#86.)
MathJax and LaTeX disagree about macro semantics often enough for this to recur —
\providecommand is a MathJax no-op that macros-table.qmd already has to rewrite, and
delimited-parameter \defs of the kind that caused this failure are a LaTeX-only concept.
The HTML profile cannot see either class of defect.
Possible directions
Not obviously one right answer, so listing the trade-offs rather than prescribing:
- Render the changed chapters to PDF on PRs. Highest fidelity, and the narrowest form
(only chapters whose files the PR touched) may be affordable. Costs a TeX install and
LuaLaTeX time in the preview job.
- A LaTeX-only smoke check. Run
quarto pandoc over latex-macros/macros.qmd plus the
changed .qmd files with -t latex, then compile the emitted math with lualatex. Much
cheaper than a full render, and it catches exactly this class (unexpanded or
mis-expanding macros). Would not catch layout or float problems.
- A lint for known-broken macro spellings. Cheapest, and only ever catches defects
somebody has already been bitten by.
Option 2 reproduced this specific failure locally in seconds, so it looks like the best
cost/coverage point, but option 1 is the only one that actually tests what publish.yml
runs.
Problem
PR CI renders only the
websiteprofile..github/workflows/preview.yml'srenderjobcalls
Morrison-Lab/gha/.github/workflows/preview.yml@v2, which its own header commentdocuments as fixing
render-profile website. The PDF,docx, andrevealjsrenders happenonly in
publish.yml, onmain:So a change that renders fine as HTML/MathJax but breaks LaTeX passes every PR check and
only turns red after it has merged, on the publish run — where it also blocks the site
deploy for everything else that has landed since.
Evidence
#1134 introduced
\v0inchapters/parametric-survival-models.qmd. Every check on that PR was green. It merged, andthe next publish run died in LuaLaTeX:
(run 34375808884,
tracked as #1155, worked around in
#1159, root cause upstream in
d-morrison/macros#86.)
MathJax and LaTeX disagree about macro semantics often enough for this to recur —
\providecommandis a MathJax no-op thatmacros-table.qmdalready has to rewrite, anddelimited-parameter
\defs of the kind that caused this failure are a LaTeX-only concept.The HTML profile cannot see either class of defect.
Possible directions
Not obviously one right answer, so listing the trade-offs rather than prescribing:
(only chapters whose files the PR touched) may be affordable. Costs a TeX install and
LuaLaTeX time in the preview job.
quarto pandocoverlatex-macros/macros.qmdplus thechanged
.qmdfiles with-t latex, then compile the emitted math withlualatex. Muchcheaper than a full render, and it catches exactly this class (unexpanded or
mis-expanding macros). Would not catch layout or float problems.
somebody has already been bitten by.
Option 2 reproduced this specific failure locally in seconds, so it looks like the best
cost/coverage point, but option 1 is the only one that actually tests what
publish.ymlruns.