fix(parametric-survival): use \vzero instead of \v0 so the PDF compiles - #1159
Conversation
The `Quarto Publish` job on `main` failed rendering
`chapters/parametric-survival-models.qmd` to PDF with
Use of \v doesn't match its definition.
l.1610 ...tackrel{\text{def}}{=}{\lambda}(t \mid \v0
Root cause is in the `latex-macros` submodule. `macros.qmd` defines
line 68: \def\v0{\vec{0}}
line 356: \renewcommand{\v}[1]{\vecf{#1}}
line 375: \def\v1{\vec{1}}
TeX has no multi-token macro names, so `\def\v1{...}` defines `\v`
with a *delimited* parameter whose delimiter is the literal `1`.
Being last, it wins, so `\v0` (and `\v{...}`) no longer match `\v`'s
definition. `\v1` keeps working only because it happens to be the
surviving definition.
`\vzero` (macros.qmd line 69) is an ordinary macro and is unaffected,
so switch the five `\v0` uses in this chapter to it. Reproduced the
exact LuaLaTeX error with the three definitions above plus `\v0`, and
confirmed exit 0 after the change.
The underlying macros defect is filed upstream as
d-morrison/macros#86; this unblocks the publish workflow without
waiting on a submodule bump.
Refs #1155
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
|
Claimed by a Claude Code CLI session — driving this PR to a clean review and green CI. Posted by Claude Code (AI agent) --- not written by a human. |
|
Warning Claude review skipped --- the API returned 429 part-way through the review. The credential is configured and was accepted; the account hit a quota or rate limit mid-run (gha#520). Wait for the reset, then re-trigger the review by pushing a new commit or re-running the workflow. API message: You've hit your session limit · resets 8:20pm (UTC) |
Self-review (fallback)The Performed by a separate read-only What was checked
Not checkedA full local VerdictNo findings. Ready for merge, subject to CI. Posted by Claude Code (AI agent) --- not written by a human. |
|
👀 Picked up by workflow run #34392992858. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
2026-09-09 20:54 UTC |
|
Both AI reviewers are quota-blocked on this head, so neither has read the diff:
The fallback self-review above stands in the meantime, per CI is otherwise fully green and the PR is Posted by Claude Code (AI agent) --- not written by a human. |
|
👀 Picked up by workflow run #34395198069. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
Fixes the
Quarto Publishfailure onmain(run 34375808884),
which died rendering
chapters/parametric-survival-models.qmdto PDF:Root cause
The defect is in the
latex-macrossubmodule, not in this repo.macros.qmdhas:\def\v0{\vec{0}}\renewcommand{\v}[1]{\vecf{#1}}\def\v1{\vec{1}}TeX has no multi-token control sequences, so
\def\v0{...}and\def\v1{...}do notdefine macros named
\v0and\v1— they define\vwith a delimited parameterwhose delimiter is the literal digit. Line 375 comes last, so the surviving definition
of
\vonly matches a following literal1.That is why
\v1still works (three other files use it, unaffected) while\v0—introduced by #1134 — does not.
\v{x}, the documented one-argument form from line 356, is broken for the same reason;no file in this repo uses it.
The change
\vzero(macros.qmdline 69,\def\vzero{\vec{0}}) is an ordinary control word,expands to exactly the same
\vec{0}, and is already the spelling used elsewhere in thebook. The five
\v0uses in this chapter switch to it, so the rendered math is unchanged.Verification
definitions above plus
\v0—! Use of \v doesn't match its definition., exit 1.\vzerocompiles clean, exit 0.quarto pandocovermacros.qmd+ this chapter now leaves no unexpanded\vin theemitted LaTeX (previously
\v0survived into the.tex, which is what LuaLaTeX choked on).quarto render ... --to pdfwas not possible in this worktree:renvisnot restored here (
there is no package called 'latex2exp'). CI covers it.Upstream
The macros defect is filed as
d-morrison/macros#86, with the
reproduction and a proposed fix (drop lines 68 and 375, keep the
\renewcommand, add\vone). This PR does not wait on that or on a submodule bump.Refs #1155
🤖 Generated with Claude Code