{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

28
votes
3answers
8k views

Professional-looking tables with alternating row colors?

Both the Booktabs documentation and the Small Guide to Making Nice Tables provide some nice rules-of-thumb for making professional-looking tables (e.g., no double rules, no vertical rules, etc.) Q: ...
19
votes
1answer
456 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 ...
15
votes
2answers
12k views

Math inside tables and formatting

I'm trying to make a little summary of mathematic analysis, useful for my university, in LaTeX. I'm stuck in the problem of creating nice table, with alternate colouring containing equations with ...
14
votes
1answer
5k views

Cellcolor overwrites partial horizontal lines (\cline)

So I need to make a colored table with multirows, together with the use of partial horizontal lines. I used \cline which does not work: the \cellcolor-command overwrites the line. This question told ...
13
votes
2answers
2k views

coloring entire row of tabular*

I would like to have the first row of all my tables colored with a certain color (below yellow) but somehow below thing is not working as expected This: \documentclass[a4paper, 12pt]{report} ...
11
votes
2answers
584 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 ...
11
votes
2answers
3k views

Highlight table cells using thick, colored border

I'd like to highlight certain cells of my table. In particular, I'd like to set the border of these sells colored and thick. These cells should also have a background color. Here's a minimal example ...
11
votes
1answer
739 views

Very thin white line in colortbl

Whenever I use the colortbl package to format tables, a thin white space between the cells sometimes shows up on screen (not in print for as far as I can tell). For example in this table: Is there ...
10
votes
1answer
160 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} ...
9
votes
1answer
309 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: ...
9
votes
1answer
803 views

Alpha channel in colortbl

I'm using the colortbl package to color table cells. I've combined this w/ the xcolor package to define my own colors. However, it appears that xcolor does not support transparency. I saw the ...
8
votes
2answers
413 views

Interaction between \hdotsfor and colortbl: Bug/Feature?

When using package colortbl, the command \hdotsfor fails (partially), leaving too much white space before and after the dotted part. The mwe \documentclass{book} \usepackage{colortbl} ...
8
votes
2answers
3k views

Matrix change row or column background

I have a matrix shown below. I would like to have the whole row green rather than only the cells ... how can I do that? \begin{equation}\label{eq:appendrow} \newcommand\x{\times} ...
8
votes
2answers
2k views

colortbl: \rowcolor in tables with \begin{tabular}{@{}ccc@{}}

I'm trying to make a table with the following code: \begin{tabular}{@{}ccc@{}} \hline \rowcolor[gray]{.9} a & b & c \\ \hline \end{tabular} Unfortunately the \rowcolor command seems ...
7
votes
2answers
414 views

Making a table with special headings

What package can I use to make a table that looks like this one?
7
votes
2answers
164 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 ...
7
votes
2answers
456 views

colortbl rowcolor overtop of @{decl}

I have tables with many $\pm$ values that I was using the @{decl} command to have nice alignment. However, I wanted to add some row colors. Trying to use colortbl I found that the cell/row color was ...
7
votes
1answer
203 views

xcolor and everycr-Problem

I'm trying to insert some \noalign-code in every row of a tabular by using colortbl and \everycr or \CT@everycr. In most cases it works fine, but not if there is a \rowcolors-command (from xcolor) ...
6
votes
2answers
291 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 ...
6
votes
1answer
164 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 ...
6
votes
2answers
440 views

Strange behaviour of “underneath” accents and \rowcolor

The following example shows the problem using the \b command for the "bar-under" accent: it seems to interact in an unexpected way with \rowcolor. Uncommenting the appropriate \renewcommand line, the ...
6
votes
1answer
660 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 ...
6
votes
1answer
607 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 ...
5
votes
1answer
470 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 ...
5
votes
1answer
411 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. ...
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} ...
5
votes
2answers
287 views

colortbl and amsmath conflict

I have a problem with colortbl and amsmath. Is someone here aware of a conflict between these two packages? \documentclass[10pt]{article} \usepackage{amsmath} %\usepackage{colortbl} \begin{document} ...
5
votes
1answer
751 views

How do I eliminate the vertical realignment when using arrayrulecolor with cmidrule?

I'm using consecutive \cmidrule commands in conjunction with \arrayrulecolor to alternately hide and unhide horizontal rules in a table. However, when \arrayrulecolor is used with \cmidrule, some odd ...
5
votes
1answer
63 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 ...
5
votes
1answer
141 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 ...
5
votes
1answer
82 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} ...
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
586 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: ...
5
votes
1answer
218 views

Configure tex4ht for colortbl and tabulary

I'm trying to use colortbl together with tex4ht: \documentclass{article} \usepackage{tabulary,colortbl} \begin{document} \begin{tabulary}{\textwidth}{C} test\\ \end{tabulary} \end{document} When ...
5
votes
1answer
91 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 ...
4
votes
2answers
518 views

White spaces between color tabs and two other questions

!Partially solved! How to remove small white spaces between color blocks? (when you compile this tex there are small white spaces between the & \cellcolor{EM}\& & \cellcolor{EM}\\) I ...
4
votes
1answer
9k 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} ...
4
votes
2answers
271 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
2answers
313 views

Need help with cosmetic changes to longtable

I need some assistance with a longtable (code below). I have a few things that I've been trying to accomplish but have not been able to. 1) I want the grey background to cover the table in a similar ...
4
votes
1answer
35 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}} ...
4
votes
1answer
75 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
77 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@{\,}|} ...
4
votes
1answer
377 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 ...
4
votes
1answer
60 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
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 ...
4
votes
1answer
443 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 ...
4
votes
1answer
107 views

tex4ht and colortbl

The package colortbl steals my beloved horizontal rules in the longtable. When I run tex4ht. % run: htlatex main.tex \documentclass{article} \usepackage{longtable} %\usepackage{colortbl} ...
3
votes
2answers
250 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 ...
3
votes
2answers
333 views

Centering text in tables problems with colortabs

I am trying to produce a basic color table as shown below \documentclass{article} \usepackage{booktabs} \usepackage[dvipsnames*,svgnames]{xcolor} \usepackage{colortbl} \usepackage{array} ...
3
votes
2answers
49 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 ...