Skip to content

Commit 4c2b7c7

Browse files
committed
use \hiderowcolors to address possible colortbl bug
1 parent 1d6449c commit 4c2b7c7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

assets/tex/pg.sty

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
% packages that are needed for some PG macro to function for tex output or that
55
% support math mode tex macros that could reasonably appear in a PG problem
66
\usepackage{amsmath, amsfonts, amssymb} % math macros
7-
\usepackage{booktabs, tabularx, colortbl, caption, xcolor} % niceTables.pl
7+
\usepackage{booktabs, tabularx, colortbl, caption} % niceTables.pl
8+
\usepackage[table]{xcolor} % niceTables.pl
89
\usepackage{multicol} % DragNDrop.pm
910
\usepackage[version=4]{mhchem} % chemistry macros
1011

macros/ui/niceTables.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,10 @@ sub Rows {
758758
if $x->{bottom};
759759
}
760760

761+
# if this row had a row color, disable that now or else with nested tables
762+
# the row color will extend into subsequent rows (this seems like a colortbl bug)
763+
$row = suffix($row, '\hiderowcolors', ' ') if $rowcolor;
764+
761765
push(@rows, $row);
762766
} elsif ($main::displayMode eq 'PTX') {
763767
my $ptxbottom = '';

0 commit comments

Comments
 (0)