Skip to content

Commit

Permalink
Merge pull request #908 from Alex-Jordan/niceTables-color
Browse files Browse the repository at this point in the history
use \hiderowcolors to address possible colortbl bug
  • Loading branch information
drgrice1 authored Aug 20, 2023
2 parents 4245b61 + 983586b commit 350657e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/tex/pg.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions macros/ui/niceTables.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit 350657e

Please sign in to comment.