From 92a7b6a7d1a1937f2cb6750d22f234b28615b527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B=2E?= <2589111+jfbu@users.noreply.github.com> Date: Tue, 10 Jun 2025 00:40:38 +0200 Subject: [PATCH] LaTeX: protect the #13635 fix against a particular configuration --- sphinx/texinputs/sphinxlatextables.sty | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sphinx/texinputs/sphinxlatextables.sty b/sphinx/texinputs/sphinxlatextables.sty index dda2711f2e3..08efac559c0 100644 --- a/sphinx/texinputs/sphinxlatextables.sty +++ b/sphinx/texinputs/sphinxlatextables.sty @@ -943,7 +943,12 @@ % redefined by the cells of the nested table. So this is the alternative % macro which is executed on exit of nested table. \def\spx@nestedtable@resetcolortbl{% - \spx@gpop@rownum + \ifx\spx@rownum@stack\@empty\else +% The stack can be empty if this is executed on exit of a nested table, +% and the parent table has received the "nocolorrows" class, but globally +% colorrows are activated (default). So we protected against that case. + \spx@gpop@rownum + \fi \sphinxSwitchCaseRowColor\rownum } \def\spx@table@reset@CT@everycr{%