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.
91
questions
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 ...
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{\...
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: ...
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 ...
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 ...
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} ...
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 ...
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{...
8
votes
2
answers
759
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 ...
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 ...
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 ...
6
votes
2
answers
1k
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 ...
4
votes
2
answers
1k
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 ...
4
votes
2
answers
3k
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 ...
2
votes
3
answers
3k
views
Solution for disappearing table/cell borders with \rowcolor in the PDF viewer depending on zoom?
We are currently trying to convert some documents (with our corporate design) from InDesign to LaTeX. These documents are supposed to be available on the Homepage as PDF and also print out nicely.
The ...
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}
\...
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 ...
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 ...
4
votes
2
answers
2k
views
remove thin white line in dark-colored cells
I have seen a similar problem, but none of what I have found thus far helps me... I have a pretty complicated table (I have adapted from another source, so I cannot really change the structure), and I ...
3
votes
2
answers
1k
views
line problem when use color table
after I add color to table, it has some problem for dispalying, here is the sample code:
\documentclass{article}
\usepackage{xcolor,colortbl}
\definecolor{Gray}{gray}{0.85}
\begin{document}
test a ...
2
votes
2
answers
1k
views
hhline and cell color problems revisited
So, I've read a lot of issues with cell coloring and cell border. I tried to fix them as follows:
I use hhline to print horizontal cell borders.
If I am in the middle of a multirow cell, I print ...
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 ...
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}
...
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) ...
3
votes
1
answer
2k
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?
\...
2
votes
0
answers
2k
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 ...
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 ...
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}
\...
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 ...
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$ ...
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]{...
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..) ...
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}
\...
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 ...
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}{...
5
votes
2
answers
1k
views
Combining diagonal table cell lines with minimum row clearance
So, yeah, it just never ends I guess. I'm fully aware that the following table is not exactly going to win an award for its stunning beauty no matter what. But the most important problem is that in ...
5
votes
3
answers
438
views
Centering text in tables problems with colortabs
I am trying to produce a basic color table as shown below
\documentclass{article}
\usepackage{booktabs}
\usepackage[dvipsnames*,svgnames]{xcolor}
\usepackage{colortbl}
\usepackage{array}
\begin{...
5
votes
2
answers
1k
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
\...
4
votes
2
answers
657
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 ...
4
votes
1
answer
3k
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 ...
3
votes
1
answer
700
views
color not applied properly in a row when \extraccolsep\fill is used in the tabular* environment
In my article, I am trying to apply a color for a row in the table, when I am using \extracolsep\fill to fit the table to the text width, the rowcolor is splitted wherever the extra space added by a \...
2
votes
3
answers
943
views
Color and style conflicts in table
So, I have a very simple table I'm trying to get working. The idea is to have the first, second, and last column/row separators be thick and colored a shade of green, while the first column and first ...
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 ...
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.
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}
\...
11
votes
3
answers
605
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 ...
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{...
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 ...
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 ...
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}
...