Skip to content

🔧 Disable "colorrows" latex table style to fix PDF docs build#1154

Merged
chrisjsewell merged 1 commit into
masterfrom
claude/myst-parser-triage-u28jxh
Jul 12, 2026
Merged

🔧 Disable "colorrows" latex table style to fix PDF docs build#1154
chrisjsewell merged 1 commit into
masterfrom
claude/myst-parser-triage-u28jxh

Conversation

@chrisjsewell

Copy link
Copy Markdown
Member

Fixes the failing build-doc-formats / latex ("Make PDF") CI job, which has been broken on all branches since the unpinned ghcr.io/xu-cheng/texlive-full:latest image picked up TeX Live 2026 (first observed failure after 2026-06-29). The failure is pre-existing and unrelated to any recent PR.

Root cause

TeX Live 2026 ships colortbl rebuilt on the array 2026/02/24 hooks, under which \CT@everycr and \everycr become the same register. Sphinx's colorrows table style executes \global\CT@everycr{\the\everycr} per table, which is now self-referential, so the PDF build dies with TeX capacity exceeded, sorry [input stack size=10000] at the first table.

This is upstream sphinx-doc/sphinx#14465, fixed and milestoned for Sphinx 9.1.1 — but the latest release is 9.1.0, so CI cannot pick up the fix yet.

Fix

One line in docs/conf.py: latex_table_style = ["booktabs"] (dropping colorrows from the default ["booktabs", "colorrows"]). Without the colorrows package option, the affected row-colour macros are never activated. Cosmetic effect only: PDF tables lose alternating row shading. The line is commented so it can be reverted once CI runs a Sphinx release containing the upstream fix.

Verification

  • Built the docs with the exact CI command (sphinx-build -nW --keep-going -b latex); the only warnings are offline-environment intersphinx noise, none from this change.
  • Generated preamble changes from \PassOptionsToPackage{booktabs}{sphinx} + \PassOptionsToPackage{colorrows}{sphinx} to the booktabs line only; colorrows no longer appears anywhere in the .tex.
  • All three self-referential \CT@everycr assignment sites in sphinxlatextables.sty are only wired in by the colorrows table class, which the writer no longer emits.
  • Same workaround reported effective by the upstream issue reporter.

A complementary hardening (pinning texlive_version via xu-cheng/latex-action v3, cf. #803) would prevent future image drift, but is left out to keep this a minimal unbreak.


Generated by Claude Code

TeX Live 2026 updated colortbl/array such that Sphinx's colorrows
implementation becomes self-referential (\CT@everycr{\the\everycr}),
crashing the PDF build with "TeX capacity exceeded" at the first table
(sphinx-doc/sphinx#14465). The upstream fix
is milestoned for Sphinx 9.1.1, which is not yet released, and the CI
job uses an unpinned texlive image, so the build broke without any
change on our side.

Restricting latex_table_style to booktabs stops the writer emitting the
colorrows package option, so the affected macros are never activated.
This can be reverted once CI runs a Sphinx release containing the fix.
@chrisjsewell chrisjsewell marked this pull request as ready for review July 12, 2026 14:07
@chrisjsewell chrisjsewell merged commit 7fd7d61 into master Jul 12, 2026
22 checks passed
@chrisjsewell chrisjsewell deleted the claude/myst-parser-triage-u28jxh branch July 12, 2026 14:07
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.

1 participant