🔧 Disable "colorrows" latex table style to fix PDF docs build#1154
Merged
Conversation
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.
This was referenced Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the failing
build-doc-formats/ latex ("Make PDF") CI job, which has been broken on all branches since the unpinnedghcr.io/xu-cheng/texlive-full:latestimage 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@everycrand\everycrbecome the same register. Sphinx'scolorrowstable style executes\global\CT@everycr{\the\everycr}per table, which is now self-referential, so the PDF build dies withTeX 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"](droppingcolorrowsfrom the default["booktabs", "colorrows"]). Without thecolorrowspackage 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
sphinx-build -nW --keep-going -b latex); the only warnings are offline-environment intersphinx noise, none from this change.\PassOptionsToPackage{booktabs}{sphinx}+\PassOptionsToPackage{colorrows}{sphinx}to thebooktabsline only;colorrowsno longer appears anywhere in the.tex.\CT@everycrassignment sites insphinxlatextables.styare only wired in by the colorrows table class, which the writer no longer emits.A complementary hardening (pinning
texlive_versionvia 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