Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug - cell and colour #2

Open
Sveinung58 opened this issue Jul 4, 2019 · 2 comments
Open

bug - cell and colour #2

Sveinung58 opened this issue Jul 4, 2019 · 2 comments
Assignees

Comments

@Sveinung58
Copy link

Sveinung58 commented Jul 4, 2019

If you inside a calstable cell (\cell{}) issue a colour-command for foreground colour
(\cell{\color{green}Testing} the colour will leak outside the cell, colourising not only the rest of the tabular and its rules (borders), but also the rest of the document. According to Stackexchange user, Ulrike Fischer, (see her comments to this answer at Stackexchange) the reason is that cals does not use "colour-safe" boxing commands.

I believe this may be a similar issue as described in David Carlisle's answers in these two answers:

  1. Why does a color meant for the first typeset line only (with package magaz) affect the entire document?
  2. [\setbox vs. \sbox and \savebox - What are the differences I need to know about?] (https://tex.stackexchange.com/a/46483/9632)
@olpa
Copy link
Owner

olpa commented Jul 7, 2019

Thanks, I'll re-check the issue. I expected that colour-safe boxes add whatis-boxes, and it is fatal for cals, which re-builds the internal structure of boxes. I hope I'm wrong.

@olpa olpa self-assigned this Jul 7, 2019
@Sveinung58
Copy link
Author

Sveinung58 commented Jul 8, 2019

Thank you for your feed back.

Work-arounds are using \cell{\textcolor{<colour>}{Cell text}} or extra grouping inside the cell, \cell{{\color{<colour>}Cell text}}.

However, fiddling around with color{<colour>} different places inside, discloses some surprising effect on foreground text and rules.

Maybe a solution is to implement a cals@fgcolor{}-command, similar to the cals@bgcolor{}-command.

"Poor mans" arraycolor for cals is issuing a color{<colour>} outside the calstable, and use a textcolor{<textcolour>}{Cell text} in each cell. Using \cals@AtBeginCell colourise the inside table rules in addition to the text.

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

No branches or pull requests

2 participants