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

row separating line is omitting while coloring the row of a table [on hold]

My MWE is as follows: \begin{table} \renewcommand{\baselinestretch}{1} \begin{small} \begin{center} \caption{Comparision between systems}\label{tab:title} \begin{tabular}{|ccccc|} \hline {S} & ...
4
votes
2answers
72 views
+50

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
42 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
52 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
126 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
273 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
85 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
34 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
31 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
38 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
43 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
101 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 ...
5
votes
1answer
89 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
53 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
55 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 ...
3
votes
1answer
96 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} ...
1
vote
0answers
64 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
136 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
99 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
101 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
99 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
107 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
161 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 ...
5
votes
2answers
304 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
115 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 ...
13
votes
3answers
6k 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
151 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
359 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
127 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
45 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
97 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
76 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
340 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
140 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
265 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
198 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
531 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
125 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
689 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|} ...
3
votes
1answer
207 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
158 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
143 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
299 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
123 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
0answers
135 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
48 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
523 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
107 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
220 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 ...