Skip to main content

Questions tagged [colortbl]

{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.

Filter by
Sorted by
Tagged with
44 votes
4 answers
26k 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: ...
lowndrul's user avatar
  • 5,373
40 votes
7 answers
37k 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} \newcommand\y{\...
SkyWalker's user avatar
  • 1,897
32 votes
4 answers
19k 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 ...
Didii's user avatar
  • 1,323
25 votes
3 answers
22k 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} \...
nacho4d's user avatar
  • 11.2k
19 votes
2 answers
20k 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 ...
ColOfAbRiX's user avatar
19 votes
1 answer
1k 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 ...
Danie Els's user avatar
  • 19.9k
17 votes
4 answers
13k 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 ...
Dave Martin's user avatar
17 votes
3 answers
5k 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 ...
lysbjerg's user avatar
  • 173
15 votes
2 answers
6k 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 in ...
rainer's user avatar
  • 2,077
15 votes
2 answers
2k 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 an ...
yori's user avatar
  • 5,723
13 votes
2 answers
8k views

What is the name of the color used in CambridgeUS?

What is the name of the reddish color used in LaTeX beamer CambridgeUS theme? I would like to use this color in my table using \cellcolor command in colortbl package.
user67275's user avatar
  • 714
13 votes
1 answer
135k 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} \usepackage{colortbl} ...
Aurelius's user avatar
  • 7,703
13 votes
3 answers
3k 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} \...
Ben's user avatar
  • 1,269
13 votes
1 answer
8k 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} ...
Brian's user avatar
  • 619
12 votes
1 answer
19k 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} \...
Neptilo's user avatar
  • 307
12 votes
2 answers
3k 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 ...
Peter's user avatar
  • 338
12 votes
2 answers
2k views

new array.sty and colortbl.sty incompatibility?

I just upgraded my texlive distribution and can no longer insert space in table rows using \\[x pt] syntax when colortbl is loaded. It seems that recent changes to array.sty might be the problem as ...
David Purton's user avatar
  • 26.5k
12 votes
3 answers
19k 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} ...
Esteban Zimanyi's user avatar
11 votes
3 answers
607 views

Layout of complex table

The MWE \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{tabularx} \usepackage{colortbl} \usepackage{multirow} \usepackage{ragged2e} \...
Matthias's user avatar
  • 1,976
11 votes
3 answers
604 views

Approximate excel spreadsheet

I am trying to approximate the following table below. After a lot of work I was able to produce the following table using the tabu package In the MWE I included the showframe option, just to see ...
N3buchadnezzar's user avatar
11 votes
1 answer
2k views

Tabu very recently stopped working with color/xcolor or with fancyvrb

Below is a MWE with a tabu table that compiled perfectly fine up until I updated packages today (Dec. 16, 2018) with TeX Live Utility. \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{...
Andrew Patrick Turner's user avatar
10 votes
4 answers
1k 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$ ...
Someone's user avatar
  • 329
10 votes
1 answer
942 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: \...
Jonas's user avatar
  • 641
9 votes
1 answer
518 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) ...
Ulrike Fischer's user avatar
9 votes
2 answers
3k 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: \documentclass[11pt,letterpaper]{...
Francisco's user avatar
  • 769
8 votes
2 answers
3k 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} \usepackage{...
Koji's user avatar
  • 1,486
8 votes
3 answers
289 views

Why does the "\left [" partially disappear when I color a row in a table? But [ does not disappear

The problem is shown in the picture below: the tall left-hand square brackets that should be produced by \left[ and \begin{bmatrix} vanish. The code is as follows \documentclass{article} \usepackage[...
Darkhomo Van's user avatar
8 votes
3 answers
989 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 ...
Rinchen's user avatar
  • 521
8 votes
2 answers
966 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 ...
vwegert's user avatar
  • 2,885
8 votes
2 answers
2k 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 ...
John Leonard's user avatar
  • 1,304
8 votes
1 answer
31k views

Specify starting row number for \rowcolors from colortbl package

In the following application of \rowcolors from the colortbl package, how can I specify the option to start the alternating color pattern from the 3rd row onwards? The first two rows in this case are ...
ptrcao's user avatar
  • 6,623
8 votes
2 answers
758 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 ...
Ktree's user avatar
  • 688
8 votes
3 answers
2k 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..) ...
megas's user avatar
  • 183
8 votes
1 answer
10k 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} \...
Hakan's user avatar
  • 546
7 votes
2 answers
587 views

Making a table with special headings

What package can I use to make a table that looks like this one?
prosseek's user avatar
  • 6,103
7 votes
2 answers
2k views

Does something like \rowcolors exist for groups of rows?

I need to find a package or else learn how to make a tex command definition that does something very similar to the \rowcolors command for tables, for creating a table with alternating background ...
Mark's user avatar
  • 255
7 votes
1 answer
536 views

Use siunitx to round numbers while using colortbl to color cells

I typically use the siunitx package to round numbers in tables and use the \cellcolor command of the colortbl package to change the background colors of certain cells. However, as the following ...
tvk's user avatar
  • 1,673
7 votes
1 answer
530 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}{...
Z.H.'s user avatar
  • 3,356
7 votes
1 answer
242 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} \usepackage[ansinew]{...
bertrand's user avatar
7 votes
3 answers
3k 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 ...
pauljohn32's user avatar
7 votes
3 answers
5k views

how to prevent cell color to cover table's borders? [closed]

When I change the background color of a cell in a table, the color covers the borders, however I want the horizontal lines to remain. I have a simple command \cellcolor[gray]{0.9} in my table. Can ...
Nargess's user avatar
  • 71
6 votes
2 answers
3k 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 ...
Alex's user avatar
  • 2,121
6 votes
1 answer
657 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 apply ...
Vincent's user avatar
  • 5,583
6 votes
2 answers
1k 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. \begin{longtable}{...
Tomáš Števček's user avatar
6 votes
2 answers
4k views

How to set text color and font type of header row for all tables in LaTeX?

I have a document with plenty of tables and I would like to apply the same formatting of the header row for all of them, without making manual modifications for each tabular. I now use \...
mezesmackosajt's user avatar
6 votes
2 answers
518 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 ...
Gonzalo Medina's user avatar
6 votes
2 answers
8k 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 ...
user4811's user avatar
  • 4,215
6 votes
2 answers
820 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} ...
hpesoj626's user avatar
  • 17.4k
6 votes
3 answers
442 views

Specifying a starting column with colortbl package and xcolor

I have a table that I have attempted to set up as follows (contrived example): % Preview source code %% LyX 2.3.2-2 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless ...
Mark's user avatar
  • 255
6 votes
1 answer
168 views

Table style customization

How to remove the extra color on the left and right of the rows? \documentclass[12pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[table]{xcolor} \usepackage{float} \usepackage{tabu} \...
Muhammad Abdulrasool's user avatar

1
2 3 4 5 6