{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

0
votes
0answers
17 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
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}} ...
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 ...
2
votes
1answer
36 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
76 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
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
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@{\,}|} ...
2
votes
2answers
109 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 ...
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} ...
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 ...
3
votes
1answer
803 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|} ...
3
votes
1answer
96 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
63 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
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 ...
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} ...
2
votes
0answers
51 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} ...
1
vote
0answers
101 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
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 ...
2
votes
0answers
189 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
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 ...
0
votes
0answers
63 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?
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} ...
2
votes
1answer
154 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
146 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
53 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
661 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
378 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
219 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
473 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
118 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. ...
11
votes
2answers
585 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
165 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
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 ...
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
110 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 ...
3
votes
1answer
330 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? ...
1
vote
1answer
266 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
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} ...
2
votes
1answer
143 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 ...
3
votes
2answers
252 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 ...
1
vote
1answer
546 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 ...
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: ...
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} ...
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 ...
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 ...
4
votes
2answers
272 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 ...