{colortbl} is a package which implements a flexible mechanism for giving coloured ‘panels’ behind specified columns in a table. It requires the array and color packages.

learn more… | top users | synonyms

3
votes
1answer
42 views

row color and a toggle

I'd like to create a new command that I would repeat in front of each row, and which would colorize the row if a toggle is true, and would leave it uncolored if the toggle is false. I would change the ...
2
votes
3answers
50 views

A table with fixed width columns, coloured both background and text

I am trying to create a table which has all three traits, mentioned in the title, at once. I tried tabular with individual \color for each column, tabu with \rowfont, and custom column definitions ...
5
votes
3answers
122 views

Table xcolor @{,} \rowcolor broken text

i am using a formatted table like this: \documentclass[a4paper,10pt]{report} \usepackage[table]{xcolor} \begin{document} \begin{tabular}{|c|r@{,}l|c|c|c|c|} \hline $B_N$ ...
3
votes
2answers
84 views

colortbl bug? Disappearing “,” in colored row

I encounter a strange problem with colortbl. This is my LaTeX input: \documentclass{article} \usepackage{color, colortbl} \begin{document} %--- \definecolor{Gray}{gray}{0.8} \begin{tabular}{r@{, ...
1
vote
1answer
34 views

Color in a multirow cell with extra vertical space

I am using colortbl and booktabs to make the following table with tcolorbox \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[many]{tcolorbox} \usepackage{booktabs} ...
3
votes
2answers
31 views

Color of a tabular cell determined by cell content [duplicate]

I am using the colortbl package to color the cells of a table. I want to be able to color a cell depending on the value in the cell. In my specific case, I'd like to enter a number between 30 & 90 ...
4
votes
1answer
37 views

Padding Issue when Coloring Cells of the Latex Table individually

I created the following latex table in booktabs style and colored each cell with a different colour. But in the end, I saw some padding which is not coloured because of the different size of the ...
1
vote
0answers
42 views

rowcolor removes vertical lines

Why does the code line setting the color for the first row of this table, remove three of the vertical lines of that row? \usepackage{colortbl} \newcommand{\grayrow}{\rowcolor[gray]{.90}} ...
5
votes
1answer
97 views

How to color only one cell in a multicolumn table?

I have the following table in LaTeX. \documentclass{beamer} \usepackage{multirow} \usepackage{xcolor,colortbl} \begin{document} \begin{frame} \frametitle{Time} \begin{table}[] {\tiny \centering ...
5
votes
1answer
85 views

\hfill inside a tabular environment doesn't flush right

When I put an \hfill in a tabular row colored using the colortbl package, the coloring does not extend to what I would expect the end of the row to be. For example, the code: \documentclass{article} ...
3
votes
1answer
53 views

Can overhang be set for a single cell in a table in colortbl?

I can set colors for individual cells using cellcolor in the colortbl package, and set the overhang for a whole row, but using the 'obvious' solution to set the overhang for a single cell doesn't seem ...
3
votes
2answers
55 views

Split row distance between two colored table rows

I would like to add some space between the lines the improve the readability of my booktabs table. I already colored every second line therefore but I cannot achieve equal rows and the centered text ...
3
votes
1answer
94 views

Booktabs and colortbl not filling height of row

I have a simple booktabs table very similar to the following MWE: \documentclass[12pt]{article} % set the font of the document \usepackage{fontspec} % set line spacing \usepackage{setspace} ...
2
votes
0answers
36 views

Conflict between colortbl and \hrulefill

I define a new environment \CCG that takes two arguments (i.e. above and below texts) and an optional suffix. I use \hrulefill to make sure that horizontal line fills the space before a suffix. This ...
1
vote
0answers
64 views

Cell borders in table disappear in different zoom levels [duplicate]

I'm using Miktex 2.9 and TexnicCenter 2.02 and I would like to have a gray column in my table. I found some examples on the internet. They work, but if I use them, some of the cell borders (only in ...
1
vote
1answer
133 views

transparent table cells in latex beamer

I tried almost every way I'm aware of to get some cells in the following table transparent. (e.g. transparent package) I have to use a specific background-image in this talk. ...
1
vote
0answers
98 views

Customizing the tabular environment — \rowcolor without \\ causes problem in the next tabular — bug in colortbl?

I boiled down the problem to much more simple MWE. See the update below. I tried to customize the tabular environment to make it easy to use a coherent style throughout my thesis. I wanted for the ...
4
votes
2answers
101 views

Compilable custom environment when in the body text becomes uncompilable when defined as a new environment

I attempted to make a table which has gray backgound cells except for the first column and the first row colored blue. The following code successfully generates the desired output (although I do not ...
3
votes
1answer
97 views

Add an \hline to every \\ using colortbl and/or [table]{xcolor}

I'm creating my own tabular environment to speed up my work and to enable others to quickly use my styles and templates. One of the things I do is force an \hline on every row. I accomplish this ...
5
votes
2answers
107 views

Colouring columns of a table which uses booktabs

I'd like to highlight a couple of columns in a table I have. I'm using booktabs in order to access better horizontal rules, however this also has the side effect of introducing extra (uncoloured) ...
2
votes
2answers
159 views

How to color column heads determined width makecell

In my answer to question How do I repeat the first table row on every page using longtable inside of tcolorbox? I suggest to (between others) to use makecell package to define head of table and ...
5
votes
2answers
301 views

Table Row Color Covers Text

I am trying to create a table with alternating row colors using the xcolor package with the [table] option. The following example demonstrates that the row coloring (uncommenting the \rowcolors..) ...
7
votes
1answer
271 views

deluxetable error (Illegal pream-token (\string): 'c' used \startdata) when using \rowcolor and \specialcell

I'm having an issue with deluxetable and am given the following errors: Package array Error: Illegal pream-token (\string): 'c' used \startdata Package array Error: Illegal pream-token (\string): ...
7
votes
1answer
115 views

Wrong color with hsb color series in xelatex

I tried to use hsb color series provided by xcolor package in the following code: \documentclass{standalone} \usepackage[table]{xcolor} \begin{document} % example one ...
4
votes
1answer
150 views

How to alternate row color and specify column color simultaneously in LyX

I'm trying to set column 0 of my table to gray as well alternate its row colors, for example: I've managed to get the alternative row colors working by inserting the ERT before the table: ...
0
votes
1answer
354 views

Table cell color overlaps left cell border of first column which is multicolumn [duplicate]

I've tried to follow many posts about this general issue but have not yet understood the problem or how to fix it. In this example, the color overlaps the left border, or the left border does not ...
0
votes
0answers
45 views

Package colortbl problem: wrong width of the colored row with ''@{}'' in column spec list

The MWE: \documentclass{article} \usepackage{xcolor} \usepackage{colortbl} \begin{document} \setlength{\tabcolsep}{0pt} \begin{tabular}{|c|c|@{}p{0pt}@{}} \hline \rowcolor{cyan!70!black} Dummy ...
4
votes
1answer
97 views

colortbl changes the width of a multicolumn-ed \dotfill and the page size

The following MWE works as expected: the \dotfill "line" spans the entire tabular. \documentclass{article} % \usepackage{colortbl} \begin{document} \begin{tabular}{p{.45\linewidth}p{.45\linewidth}} ...
3
votes
2answers
127 views

Problem with align inside tabular environment when using xcolor

I'm trying to build a table with multiple numbered equations inside, hence I used the align environment. On the other hand, I need to color some cells, so I included the xcolor package with the table ...
2
votes
1answer
75 views

Problem to store tabulars in boxes in the preamble when colortbl is loaded

In the following example the second \sbox gives errors when colortbl is loaded. ! Undefined control sequence. <template> ...@setup \CT@row@color \CT@cell@color ...
4
votes
1answer
333 views

\rowcolor and custom column separators

When I use \rowcolor, custom separators between columns are not affected: \documentclass{article} \usepackage{xcolor} \usepackage{colortbl} \begin{document} \begin{tabular}{p{1cm}!{-}p{1cm}} ...
4
votes
1answer
140 views

\upbracefill filling entire tabular cell and package colortbl

In my documents, I have found that when I call \upbracefill in a tabular cell, the resulting brace IS NOT taking the entire width of the cell. After creating the smallest example I could that ...
5
votes
1answer
263 views

table cell shading overlaps to nearby cells

I have a latex table as follows \documentclass[12pt]{report} \usepackage{colortbl} \begin{document} \begin{table} \centering \begin{tabular}{|@{\,}c@{\,}|@{\,}c@{\,}|@{\,}c@{\,}|@{\,}c@{\,}|} ...
2
votes
2answers
197 views

Color overshoots when using \cellcolor without intercolumn space

When creating highly regular tables, I'm quite fond of the custom C column type shown below that accepts a width and centers the content, without having me worry about intercolumn space messing ...
5
votes
1answer
125 views

Broken layout of colored tables with new version of colortbl package

we're having trouble with the new version of the colortbl package which breaks our layout of colored tables. With the new version of the colortbl package (2012/02/13 v1.0a) the layout is utterly ...
3
votes
1answer
205 views

\rowcolor not shading properly

I am using this template for making tables. I tried to add \rowcolor[gray]{.8} between \toprules and \midrules but the the effect is bad in the sense that it highlight on 3/4 of the row leaving the ...
1
vote
2answers
158 views

Table column partially colored and how to vertically center text inside table

I have this MWE: \documentclass[a4paper,12pt]{article} \usepackage{color} \usepackage{colortbl} \usepackage{longtable} \usepackage{tabularx} \usepackage[table]{xcolor} \usepackage{multirow} ...
5
votes
1answer
143 views

Overhang parameter of rowcolor changes overhang of each cell, not just the row

I want to highlight a few rows in a table, and used \rowcolor as per the first table. Well, this results in the row coloring being wider than I desire, so I thought the simple fix would be to adjust ...
10
votes
1answer
299 views

Use \cellcolor in \tabulary

The \cellcolor command from package colortbl doesn't seem to have any effect in a tabulary environment, though it works in tabular. Here is a minimal example: \documentclass[a4paper]{article} ...
2
votes
0answers
122 views

colortbl and mdwtab

There is an incompatibility between the packages colortbl and mdwtab. The following document fails with LuaLaTex and the error ! Extra }, or forgotten \endgroup. \documentclass{article} ...
2
votes
2answers
48 views

When using colortbl, column is still white. What am I doing wrong?

It is probably apparent I'm trying to color the last column green, but for me, it shows up as white still. Also, if I understand correctly '>' is just used by tabularx for demarcating formatting ...
2
votes
0answers
135 views

Coloring rows in table [closed]

I have a problem with coloring table. I would like to color one row, but when I use \rowcolor, then vertical lines among colums disappear (or they become thinner). Is there any possibility of solving ...
2
votes
0answers
522 views

colortbl row column color overwrite hline on screen [closed]

I have the following code to generate table with color highlights on certain rows and columns, also vertical bars and hline are used to partition the table, the table prints ok on paper, however on ...
5
votes
1answer
107 views

\rowcolor in \NewDocumentCommand

It seems to be impossible to wrap \rowcolor in a macro defined with \NewDocumentCommand, while everything is fine with \newcommand. Is ist possible to fixe this? \documentclass{article} ...
6
votes
1answer
219 views

Listing with two columns in a single fancy frame

I am playing a little with lstlistings and I wonder whether such a thing would be achievable for all my listings: How to achieve this kind of things? Note : I am searching for a solution I can ...
0
votes
0answers
69 views

Is there a way to fix the rendering of tables with colored cells? [duplicate]

This is my first LaTeX project. I need to make a table that has various cells colored. It seems as though somewhere in the process of creating the PDF for my document or rendering my document, ...
1
vote
1answer
121 views

Creating a Color Key?

How can I create a colour key in LaTeX to show what the colours of this table mean?
2
votes
1answer
450 views

How to add font commands to a pgfplotstable header cell?

I'm trying to change the cell color and text color of the header of a pgfplotstable. Changing the cell color is not that much of a problem because I can just prefix the row with \rowcolor: ...
3
votes
1answer
750 views

Displaying the horizontal and vertical lines of a table after coloring rows

How can I re-show each line in the following table after coloring the row? \documentclass[english,a4paper,12pt]{report} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage[latin9]{inputenc} ...
2
votes
1answer
132 views

A problem with revtex4 and colortbl

I never ran into the following problem before, where every time I tried to use matrices, LaTeX generated an error; !undefined control sequence. I was very puzzled as to how does this error come ...