Skip to content

Conversation

@Alex-Jordan
Copy link
Contributor

If you have nested niceTables (say a DataTable within a LayoutTable) there seems to be a bug with the colortbl package's \rowcolor command, and if you use it in the inner table, you end up coloring more than just the one row. You can see this with:

DOCUMENT();
loadMacros(qw(PGstandard.pl PGML.pl niceTables.pl));
BEGIN_PGML
[@LayoutTable([[
    DataTable([
        [['', rowcolor => 'lightgray'], 'A', 'B'],
        [1, 2, 3],
    ])
]])@]*
END_PGML
ENDDOCUMENT();

which should only make the first row gray, but what I think is a bug is making both rows gray.

This commit addresses that by applying \hiderowcolors at the end of any row that set a row color. Note that you can give the second row a color, and that still works; this is not permanently taking away row colors.

Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw the bug and this fixes it.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This fixes the problem which can be seen with the MWE on the develop branch.

@Alex-Jordan Alex-Jordan mentioned this pull request Aug 18, 2023
@drgrice1
Copy link
Member

I will merge this since the hotfix of this was merged. This is the last one that was supposed to be merged.

@drgrice1 drgrice1 merged commit 350657e into openwebwork:develop Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants