Skip to content

Commit 52c4d72

Browse files
authored
Simplify a LaTeX macro (#13710)
1 parent 83146f1 commit 52c4d72

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sphinx/texinputs/sphinxlatextables.sty

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@
4747
% At 8.3.0, ALL table cell contents are wrapped into a varwidth environment.
4848
% This helps solve issues such as #3447, #8828, and helps use tabulary
4949
% in many more cases hence obtain better looking tables.
50-
\def\sphinxbeforeendvarwidth{\par\vskip-\baselineskip\vbox{\hbox{\strut}}}
50+
\def\sphinxbeforeendvarwidth{\par\vskip-\baselineskip\hbox{\strut}}
51+
% MEMO: Mark-up uses the above macro right before all \end{varwdith} so that
52+
% if the cell in a row extends lower than the others, its last line acquires
53+
% standard "depth". Else it may lack any depth if without descenders such as
54+
% "p" or "q" letters and the horizontal line or color panel will look strange.
55+
% It originates in PR #3435 from 2017 which solved *many* table issues for
56+
% merged cells (and injected the varwidth technique now at 8.3.0 applied to
57+
% all cells). The original used \vbox{\hbox{\strut}} but that \vbox appears
58+
% to do nothing, and it was decided after some testing (July 2025) to remove
59+
% it, the original rationale for it being now lost.
5160

5261
% These conditionals added at 8.3.0 for nested tables not to break row colors
5362
% (#13635). Nested tables are only partially supported by Sphinx LaTeX.

0 commit comments

Comments
 (0)