{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
2answers
40 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
31 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
63 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
59 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 ...
4
votes
1answer
71 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
107 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
89 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
92 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
56 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
61 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
155 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
49 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
43 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 ...
1
vote
0answers
98 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
173 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
75 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
160 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
60 views

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

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
74 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
132 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
142 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
94 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 ...
1
vote
0answers
52 views

Missing lines when shading cells [duplicate]

I cannot figure out why lines are not being showed on the shaded columns. Can I get a little help finding what is wrong? EDIT: The MWE follows: \documentclass[12pt, a4paper]{article} ...
6
votes
1answer
622 views

How to uncover alternating row colors in beamer class?

In the howtos section of the beamer documentation (v3.30) I saw the code how to do alternating row colors when displaying tables as a remedy to errors caused by horizontal and vertical lines in ...
4
votes
1answer
347 views

Altering only header \hline colors with longtabu and colortbl

I'm trying to make a table with the following properties: If the table is very long, the header should be repeated on each new page. Each row should be separated by a line. The line immediately ...
2
votes
1answer
204 views

Combining \rowcolor and \cmidrule [duplicate]

I want to shade the heading of my table. It all worked fine until I started using \cmidrule. This is my output: Is there a way to shade the white space between the first and second row? The code ...
5
votes
1answer
455 views

Colored diagonal divided table cell

How can I fill a table cell with different colors? I have tried the diagbox package but it doesn't work as you can see. I am not so much interested in the diagonal line. I only want to separate the ...
1
vote
0answers
113 views

LaTeX template crashes when including package

I have downloaded a LaTeX template I need to use for a conference submission, which is found here. I presume that the template is well written and compatible with any extra package I want to use. ...
3
votes
1answer
726 views

\cellcolor command from colortbl package not working

I've been trying to colour single cells but it's not working. Here's a MWE: \documentclass{memoir} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \begin{document} \begin{tabular}{|l|c|} ...
11
votes
2answers
570 views

Table using booktabs and cellcolor looks ugly

When using \cellcolor in a booktabs table, I find that the output is not really appealing: I don't really care that the colored cell does not touch the lines above and below (cf. Coloring columns ...
7
votes
2answers
156 views

Hiding a column with colored cells

I want to use the column type described in this answer to hide certain columns in a table. The table occurs multiple times throughout the document, always with different columns hidden. Some of the ...
6
votes
2answers
282 views

color a column red in a table

When I try to color a column red, it seems that white lines begin to emerge. Additionally the \hline changes width depending on how you zoom into the document in pdf format. It look as if the color ...
4
votes
1answer
60 views

Problem with \doublerulesepcolor in colortbl

I would like a table where the background of the first line is gray and the background of the rest of the table is white. The problem is that the table has a double column line. I have tried ...
2
votes
1answer
107 views

How to add background color to a single row which contains multicolumns?

I want to add background color in the header part of my table which contains grouped columns: \multicolumn{8}{ p{6.0in} }{ \textbf{ PARTNER } } & \hfill\textbf{ TOTAL PAYABLES } \\ A simple ...
5
votes
1answer
80 views

delarray and colortbl issue

There seems to have a compatibility issue between the colortbl and delarray packages because when compiling the following code : \documentclass{article} \usepackage[T1]{fontenc} ...
3
votes
1answer
317 views

How to get horizontal black line when coloring cells?

I have the following table with an arrow showing the missing black horizontal black line: Here is the relevant code, I am wondering how do I get a black horizontal line where there is one missing? ...
3
votes
2answers
245 views

One verbatim column in pgfplotstable and a non-verbatim header

I wanted to create a pgfplotstable in which one column would be treated as verbatim. I first tried to straightforwardly use \verb but I almost expected this to fail spectacularly and it did. I found ...
9
votes
1answer
297 views

LaTeX's datatool package together with siunitx

I want to use the datatool package to read csv files and parse them to LaTeX tables. Furthermore I want to use siunitx to format the numbers from the csv file. Have a look at the following example: ...
6
votes
1answer
594 views

Disappearance of the table title/caption, when using colortbl

I'm formatting a manuscript according to the PNAS style, as prescribed in http://www.pnas.org/site/authors/LaTex.xhtml When I color my table using the package colortbl, the title/caption disappears ...
1
vote
1answer
521 views

Alternating column AND row colors with tabu? [closed]

There is a very convenient way to have alternating row colors in tabu using \taburowcolors{ .. }. But is there a way to do the same thing with columns plus alternating row colors ? What I want ...
4
votes
2answers
269 views

How can I avoid the gap between \cellcolor-colored cells created by \tabucline?

I'm trying to partially separate rows from one another using \tabucline. The line encompasses column 3-6. Since the line's width is neither part of the upper, nor the lower row, there is going to be ...
4
votes
1answer
8k views

Define and use new colors for \rowcolor (Colortbl)

How can I use the maroon that I have defined, instead of the gray? Or (better) how can I use directly the maroon from: \usepackage[dvipsnames]{xcolor} \documentclass{scrbook} ...
2
votes
1answer
138 views

Use \DTLifoddrow in preamble

I'm putting many tables in many files generated by csv files. I'm using datatools (opposed to say pgfplotstable) because it is much more forgiving in terms of the csv input format (e.g. it ignores ...
4
votes
1answer
430 views

Combining diagonal table cell lines with minimum row clearance

So, yeah, it just never ends I guess. I'm fully aware that the following table is not exactly going to win an award for its stunning beauty no matter what. But the most important problem is that in ...
5
votes
1answer
399 views

Space between \hline\hline in longtable using package colortbl

When I use a \usepackage{colortbl} a space between \hline\hline in \longtable dissapears. I haven't find any solution how to put the space back, so I hope you'll help me to find it. ...
1
vote
1answer
261 views

revtex4-1 and colortbl doesn't fill cells

The MWE below shows that the \cellcolor command doesn't properly fill a table cell in revtex4-1 where it would do so in a simple article. Can anyone help me get fills that extend to the boundaries of ...
5
votes
2answers
2k views

Colored tables and cline/hhline

How to write \clines (or \hhline) in colored tables so that the color of the cell does not hide the line? Here are two solutions but neither of them works fine. \documentclass[a4paper,11pt]{article} ...
5
votes
1answer
138 views

Problem with \rowcolor and monochrome option

I have a document that I wish to distribute both in color and monochrome. It contains tables and makes use of colored rows. Problem is, when I use the monochrome option for the xcolor package the ...
19
votes
1answer
450 views

Strange disappearing colored rules in beamer

I have received a booktabs bug report of \cmidrules that disappear when coloured rules are used inside beamer (together with colortbl). The problem can be illustrated with the following simple code ...
5
votes
1answer
562 views

White space between columns using \rowcolor{somecolor}

I have been using \rowcolor{color} command and I have noticed that there is always some white space between one cell and the next one in the row. Here is my code: ...