Skip to content

PDF/LaTeX render only runs post-merge, so a PR can break publish.yml with every check green #1152

Description

@d-morrison

Important

This issue was originally filed on a false premise, twice over. Both
versions are retracted; what follows is the corrected, much narrower ask.
The retraction history is in the comments below.

What was wrong

The first version claimed \sb is a silent no-op because LaTeX defines
\let\sb=_, and asked for a 110-site sweep. That is false: macros.qmd is
included as document content, and Pandoc's latex_macros extension expands
\providecommand macros in the reader, so LaTeX never receives \sb.
Verified with quarto render --to latex, which emits
\mathopen{}\left[(1-\pi) + \pi\right]\mathclose{}; pdflatex then exits 0.
Upstream macros#85 is
closed as not planned.

The second version claimed "no check anywhere compiles this book's math
through LaTeX". Also false. .github/workflows/publish.yml:110 runs
quarto render --to pdf under tinytex: true on every push to main, and
its report-failure job opens an issue when that fails. It has been green
continuously, including on 873b4a09 --- the tip that carries all 110 \sb
uses. That green history was standing evidence against the original claim
before it was ever written.

The actual, remaining gap

The PDF build runs post-merge only. publish.yml triggers on
push: branches: main, so a PR that breaks the LaTeX output is not caught
until after it lands, at which point the failure arrives as an auto-filed
issue rather than as a red check on the PR that caused it.

The PR preview workflow renders HTML. MathJax and LaTeX accept different
things, so a PR can be green on every check and still break publish.yml on
merge.

Suggested work

Add a PDF (or LaTeX-only) render to the PR checks, or a scheduled pre-merge
job, so the failure lands on the PR rather than on main.

Two constraints worth respecting:

  • Render through Quarto, never around it. Any check that extracts
    $$...$$ blocks and feeds them to pdflatex directly tests an artifact
    this book never builds, because it skips the Pandoc macro expansion above.
    That shortcut is exactly what manufactured the retracted claim.
  • Cost. A full --to pdf needs renv and tinytex and is slow. If that is
    too heavy for every PR, --to latex on the changed chapter plus a
    pdflatex pass on the emitted .tex is much cheaper and still exercises
    the real expansion path.

Found while driving #1138.

Filed by Claude Code (AI agent).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions