{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
0answers
30 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} ...
2
votes
1answer
35 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
22 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
34 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
11 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
54 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 ...
11
votes
1answer
897 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 ...
14
votes
4answers
7k 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} ...
4
votes
1answer
73 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 ...
6
votes
2answers
178 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} ...
3
votes
1answer
59 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
55 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
95 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. ...
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 ...
3
votes
1answer
66 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
71 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
180 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$ ...
7
votes
1answer
327 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): ...
3
votes
2answers
92 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
45 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
41 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
51 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
102 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
124 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
234 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
59 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
64 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 ...
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
226 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
128 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
108 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
118 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
123 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
245 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
396 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
131 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
183 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
471 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 ...
3
votes
2answers
151 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 ...
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
113 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}} ...
2
votes
1answer
88 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
394 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
163 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
313 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
224 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
565 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
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 ...
4
votes
2answers
721 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
2k 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|} ...