{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
49 views

Macro expansion with colortbl and tabular

I would like to alternate row colors in a tabular environment. I found colortbl useful. To simplify writing, I built the following macros to alternate row colors (see MWE below). However, I cannot ...
3
votes
0answers
34 views

tex4ht does not show top and bottom rules of table when loading colortbl package

This MWE \documentclass[12pt]{book}% \usepackage{amsmath} \usepackage{longtable} \usepackage{colortbl} \begin{document} \begin{longtable}[t]{|c|c|}\hline x & y \\\hline \end{longtable} \end{...
2
votes
1answer
51 views

How to change the color background of a single cell in the last row

Using pgfplotstable, I want to color singular cells in the last row of an automatically created table based on csv-input. Since the length of the table differs, I need to color the last cell ...
0
votes
0answers
23 views

rowcolor in an imbricated table

When I use the \rowcolor command in an imbricated table, all the rows of the inside table are colored: \documentclass{article} \usepackage[frenchb]{babel} \usepackage{colortbl} \begin{document} \...
1
vote
1answer
35 views

How to colour a cell and keep the contents in maths-mode?

I am trying to colour certain table cells in some siunitx S columns. The cell colour change with xcolor/colortbl works, but it seems to also change the cell contents to text-mode, which has ...
0
votes
0answers
12 views

colortbl/tabu and @-expressions lead to overwritten cell

I want to typeset numbers with an @-expression in a table with many columns. This leads to the left column of the pair being overwritten, because the colortbl package overwrites it with a \tabcolsep ...
2
votes
1answer
79 views

Eliminating little white vertical lines in tabular* caused by colortbl/colorcell

In a larger project, we have trouble producing tables that look "just right" because use of colorcell leaves little vertical lines between colored cell areas. I've made a minimal table that ...
4
votes
1answer
95 views

pgfplotstable: how to change the color/font/background of a single cell?

Let's look at this MWE, where I am trying to change the formatting/background of a cell in the table. I think I have just copied the example in the manual, but I have the nasty effect that the content ...
3
votes
1answer
62 views

Why does \rowcolors cut matrix delimiter?

I want to typeset a tabular with alterning row colors, containing matrices. Somehow, when adding \rowcolors{1}{}{black!5} the left bracket of some matrices is just omited. What am I doing wrong and ...
1
vote
1answer
66 views

Defining left/right overhang with \cellcolor

I want to highlight one row and one column in a table. The column is no problem. However, the colour panels of the outermost left and right cell in the row overhang the table's borders if I use @{} in ...
2
votes
1answer
98 views

Creating a heatmap using calculations and tabular environment

I know there exists pgf, and many people uses this to create heatmaps. I however am not allowed to use this package. I therefore want to create a command that enables me to color the different cells. ...
3
votes
1answer
71 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
78 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
185 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
94 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
49 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} \usepackage{...
3
votes
2answers
43 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
57 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 cell'...
1
vote
0answers
131 views

rowcolor removes vertical lines [closed]

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}} \begin{...
5
votes
1answer
132 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 \...
7
votes
1answer
279 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
60 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
65 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 ...
6
votes
2answers
210 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} \...
4
votes
2answers
136 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
65 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
256 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. \documentclass[hyperref=...
1
vote
0answers
133 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
112 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
127 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
126 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
276 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 ...
6
votes
2answers
412 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
343 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): 'c'...
7
votes
1answer
135 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 \definecolorseries{test}{hsb}{...
4
votes
1answer
200 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
506 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
49 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
115 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
157 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
89 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
410 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
173 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
330 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
233 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
141 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
271 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
231 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
197 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
357 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} \...