From 983586bc0cb22c32c57d2c2e184817d709f23e59 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Sat, 12 Aug 2023 23:16:56 -0700 Subject: [PATCH] use \hiderowcolors to address possible colortbl bug --- assets/tex/pg.sty | 3 ++- macros/ui/niceTables.pl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/tex/pg.sty b/assets/tex/pg.sty index 8fcdf988df..80ae201058 100644 --- a/assets/tex/pg.sty +++ b/assets/tex/pg.sty @@ -4,7 +4,8 @@ % packages that are needed for some PG macro to function for tex output or that % support math mode tex macros that could reasonably appear in a PG problem \usepackage{amsmath, amsfonts, amssymb} % math macros -\usepackage{booktabs, tabularx, colortbl, caption, xcolor} % niceTables.pl +\usepackage{booktabs, tabularx, colortbl, caption} % niceTables.pl +\usepackage[table]{xcolor} % niceTables.pl \usepackage{multicol} % DragNDrop.pm \usepackage[version=4]{mhchem} % chemistry macros diff --git a/macros/ui/niceTables.pl b/macros/ui/niceTables.pl index 23bbcb570d..928eb22e10 100644 --- a/macros/ui/niceTables.pl +++ b/macros/ui/niceTables.pl @@ -758,6 +758,10 @@ sub Rows { if $x->{bottom}; } + # if this row had a row color, disable that now or else with nested tables + # the row color will extend into subsequent rows (this seems like a colortbl bug) + $row = suffix($row, '\hiderowcolors', ' ') if $rowcolor; + push(@rows, $row); } elsif ($main::displayMode eq 'PTX') { my $ptxbottom = '';