| 1 |
From: =?utf-8?b?IkplYW4tRnJhbsOnb2lzIEIuIg==?= |
| 2 |
<[email protected]> |
| 3 |
Date: Tue, 9 Jun 2026 15:54:57 +0200 |
| 4 |
Subject: LaTeX: fix PDF build crash with June 2026 LaTeX release (related to |
| 5 |
tables with 'colorrows') (#14484) |
| 6 |
|
| 7 |
(cherry picked from commit 748a569f474f6295a95914d8729b6dd1aa02126b) |
| 8 |
--- |
| 9 |
sphinx/texinputs/sphinxlatextables.sty | 32 +++++++++++++++++++++++++++----- |
| 10 |
1 file changed, 27 insertions(+), 5 deletions(-) |
| 11 |
|
| 12 |
diff --git a/sphinx/texinputs/sphinxlatextables.sty b/sphinx/texinputs/sphinxlatextables.sty |
| 13 |
index 61ff67f..b612b8b 100644 |
| 14 |
--- a/sphinx/texinputs/sphinxlatextables.sty |
| 15 |
+++ b/sphinx/texinputs/sphinxlatextables.sty |
| 16 |
@@ -1,7 +1,7 @@ |
| 17 |
%% TABLES (WITH SUPPORT FOR MERGED CELLS OF GENERAL CONTENTS) |
| 18 |
% |
| 19 |
% change this info string if making any custom modification |
| 20 |
-\ProvidesPackage{sphinxlatextables}[2025/12/30 v9.1.0 tables]% |
| 21 |
+\ProvidesPackage{sphinxlatextables}[2026/06/09 v9.1.1 tables]% |
| 22 |
|
| 23 |
% Provides support for this output mark-up from Sphinx latex writer |
| 24 |
% and table templates: |
| 25 |
@@ -72,16 +72,34 @@ |
| 26 |
% its availability anymore) |
| 27 |
% |
| 28 |
% Executes \RequirePackage for: |
| 29 |
+ % |
| 30 |
+ % Release v1.0l 2026-05-01 of colortbl.sty modified its way of |
| 31 |
+ % hacking into \everycr, as it got broken by array.sty v2.7b dated |
| 32 |
+ % 2026/02/24 (which requires the June 2026 LaTeX format). |
| 33 |
+ % https://github.com/davidcarlisle/dpctex/pull/66 |
| 34 |
+ % |
| 35 |
+ % This change broke Sphinx, cf sphinx-doc/sphinx#14465. |
| 36 |
+ % |
| 37 |
+ % We need some time to cleanly resolve the new situation, and opted to |
| 38 |
+ % "pin to the previous array": this causes colortbl to act as expected |
| 39 |
+ % by us here. We then need to also "pin longtable" to an earlier |
| 40 |
+ % version due to https://github.com/davidcarlisle/dpctex/issues/69. |
| 41 |
+ % Only one roll-back of longtable is available and we use it. |
| 42 |
% |
| 43 |
-% - tabulary |
| 44 |
+% - tabulary, which loads array |
| 45 |
% - longtable |
| 46 |
% - varwidth |
| 47 |
% - colortbl |
| 48 |
% - booktabs if 'booktabs' in latex_table_style |
| 49 |
-% |
| 50 |
+ |
| 51 |
+% N.B.: array must *not* have been loaded prior to this location, but this is |
| 52 |
+% not guaranteed if templates/latex/latex.tex.jinja gets altered. |
| 53 |
+\IfFileExists{array-2024-06-01.sty} |
| 54 |
+ {\RequirePackage{array}[=v2.6]} |
| 55 |
+ {\RequirePackage{array}} |
| 56 |
+ |
| 57 |
% Extends tabulary and longtable via patches and custom macros to support |
| 58 |
% merged cells possibly containing code-blocks in complex tables |
| 59 |
- |
| 60 |
\RequirePackage{tabulary} |
| 61 |
% tabulary has a bug with its re-definition of \multicolumn in its first pass |
| 62 |
% which is not \long. But now Sphinx does not use LaTeX's \multicolumn but its |
| 63 |
@@ -100,7 +118,11 @@ |
| 64 |
% using here T (for Tabulary) feels less of a problem than the X could be |
| 65 |
\newcolumntype{T}{J}% |
| 66 |
% For tables allowing pagebreaks |
| 67 |
-\RequirePackage{longtable} |
| 68 |
+% About why pinning longtable version to an older one, see discussion at top |
| 69 |
+% of this file about issue #14465. This is perhaps a provisory work-around. |
| 70 |
+\IfFileExists{longtable-2020-01-07.sty} |
| 71 |
+ {\RequirePackage{longtable}[=v4.13]} |
| 72 |
+ {\RequirePackage{longtable}} |
| 73 |
% User interface to set-up whitespace before and after tables: |
| 74 |
\newcommand*\sphinxtablepre {0pt}% |
| 75 |
\newcommand*\sphinxtablepost{\medskipamount}% |