Skip to content

fix(parametric-survival): use \vzero instead of \v0 so the PDF compiles - #1159

Merged
d-morrison merged 1 commit into
mainfrom
claude/github-actions-workflow-fix-399b0a
Sep 9, 2026
Merged

d-morrison merged 1 commit into
mainfrom
claude/github-actions-workflow-fix-399b0a

Conversation

@d-morrison

Copy link
Copy Markdown
Owner

Fixes the Quarto Publish failure on main
(run 34375808884),
which died rendering chapters/parametric-survival-models.qmd to PDF:

ERROR:
compilation failed- error
Use of \v doesn't match its definition.
l.1610 ...tackrel{\text{def}}{=}{\lambda}(t \mid \v0

Root cause

The defect is in the latex-macros submodule, not in this repo. macros.qmd has:

line definition
68 \def\v0{\vec{0}}
356 \renewcommand{\v}[1]{\vecf{#1}}
375 \def\v1{\vec{1}}

TeX has no multi-token control sequences, so \def\v0{...} and \def\v1{...} do not
define macros named \v0 and \v1 — they define \v with a delimited parameter
whose delimiter is the literal digit. Line 375 comes last, so the surviving definition
of \v only matches a following literal 1.

That is why \v1 still 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.qmd line 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 the
book. The five \v0 uses in this chapter switch to it, so the rendered math is unchanged.

Verification

  • Reproduced the exact CI error in a minimal LuaLaTeX document carrying the three
    definitions above plus \v0! Use of \v doesn't match its definition., exit 1.
  • The same document with \vzero compiles clean, exit 0.
  • quarto pandoc over macros.qmd + this chapter now leaves no unexpanded \v in the
    emitted LaTeX (previously \v0 survived into the .tex, which is what LuaLaTeX choked on).
  • A full local quarto render ... --to pdf was not possible in this worktree: renv is
    not 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

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>
@d-morrison

Copy link
Copy Markdown
Owner Author

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.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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)

View run

@d-morrison

Copy link
Copy Markdown
Owner Author

Self-review (fallback)

The @claude review workflow was skipped on this head: the API returned 429 mid-run
(You've hit your session limit · resets 8:20pm (UTC),
gha#520). Posting a self-review at the
same standard rather than stalling, per self-review-fallback. This will be superseded by
the bot's own verdict if the review is re-triggered after the quota reset.

Performed by a separate read-only adversarial-reviewer subagent against
git diff origin/main...HEAD at commit f258bb172c7586ffe867b70626baade12f1ce2c9, briefed
with the repo's CLAUDE.md and the latex-macros submodule but not with the rationale for
the change.

What was checked

  • Macro correctness. \vzero is \def\vzero{\vec{0}} (macros.qmd:69), byte-identical
    in body to the \def\v0{\vec{0}} it replaces, and is a plain control word that nothing
    later in macros.qmd redefines. \vec is \renewcommand'd to \tilde{#1}, so both
    spellings expand to \tilde{0}.
  • Rendered semantics. Unchanged in every profile. macros.qmd reaches this chapter
    through chapters/shared-config.qmd, which is not profile-gated, so the substitution is
    inert for website/MathJax, book PDF, and handout PDF alike.
  • Root cause, reproduced rather than asserted. A minimal document carrying
    \def\v0{...}, \renewcommand{\v}[1]{...}, \def\v1{...} and a \v0 invocation fails
    under LuaLaTeX with ! Use of \v doesn't match its definition., exit 1 — the exact CI
    error. The same document with \vzero exits 0.
  • Completeness. grep -rn '\\v0' --include='*.qmd' . finds no remaining use outside the
    submodule's own definition line. \v{...}, broken by the same mechanism, has zero uses in
    this repo. \v1 is used in three other files and is unaffected, because \def\v1 is the
    surviving definition.
  • Commit-message claims. Line numbers 68 / 356 / 375 verified against macros.qmd; the
    quoted LuaLaTeX error verified verbatim against the failing run's log; the referenced
    d-morrison/macros#86 and d-morrison/rme#1155 both exist and are open; Refs #1155 is
    correctly non-closing, since this works around the defect rather than fixing it.
  • Conventions. No prose or structural changes, so no semantic-line-break, \eqdef, or
    macro-family conventions are implicated. No non-ASCII punctuation introduced.

Not checked

A full local quarto render chapters/parametric-survival-models.qmd --to pdf was not
possible in this worktree — renv is not restored here, so the first R chunk dies on
there is no package called 'latex2exp'. This is a pre-existing environment gap, unrelated
to the diff. CI's own render is the check that matters, and it is the check this PR exists
to turn green.

Verdict

No findings. Ready for merge, subject to CI.

Posted by Claude Code (AI agent) --- not written by a human.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

👀 Picked up by workflow run #34392992858. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-09-09 20:54 UTC

@d-morrison
d-morrison requested a lite review from Copilot September 9, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison
d-morrison requested a lite review from Copilot September 9, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison

Copy link
Copy Markdown
Owner Author

Both AI reviewers are quota-blocked on this head, so neither has read the diff:

  • @claude — the review workflow returned 429 mid-run (You've hit your session limit · resets 8:20pm (UTC), gha#520).
  • Copilot — requested explicitly (twice, both requests accepted); it replied Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The fallback self-review above stands in the meantime, per self-review-fallback. A watch is armed to re-trigger the @claude review after the quota window elapses and report its verdict here.

CI is otherwise fully green and the PR is MERGEABLE / CLEAN.

Posted by Claude Code (AI agent) --- not written by a human.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

👀 Picked up by workflow run #34395198069. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that.

@d-morrison
d-morrison requested a lite review from Copilot September 9, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison
d-morrison requested a lite review from Copilot September 9, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison
d-morrison requested a lite review from Copilot September 9, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison
d-morrison merged commit 374aa64 into main Sep 9, 2026
16 checks passed
@d-morrison
d-morrison deleted the claude/github-actions-workflow-fix-399b0a branch September 9, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants