When using \colorbox{color}{text} to put background color for the text in a table, the text with background color seems to take more space and makes the respective cell higher and wider. Is there a way to use \colorbox{color}{text} in a table cell without affecting the dimension of the cell?
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
||||
|
|
|
You need to set the value of
You don't need the outer braces if it is the whole cell, however then I would use the macros of the You can also use the
which draws a tight frame as well. It has also an extended syntax which allows to set the rule thickness, inner separation and outer margin:
The margin can be negative and if it is -(thickness+inner sep) the original size is kept, e.g.:
(The |
|||||
|