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
0 votes
0 answers
13 views

MikTeX: Discrepancies in files between two installed instances of the same version

Two years ago, I installed a MikTeX 21.6 2 distribution. I'm trying to keep a baseline of my working environment and it is the reason why I don't want to upgrade a running system if there is no ...
0 votes
2 answers
85 views

Clash of xcolor and colortbl over a longtable

The longtable below produces the following error: ! Undefined control sequence. \adl@@cr ...tempdima \xdef \adl@rowsL {\adl@rowsL (\adl@colsL /\...
2 votes
1 answer
56 views

Define first row color prior to tabular begin

I've got many tables throughout my document that I would like to be colored like this, with the first row in a dark grey, then the even rows in white and the odd rows in a light grey: Currently I'm ...
2 votes
2 answers
44 views

cline thinner when use with multirow and colortbl

When I use the \cline with the colortbl and multirow the cline will thinner than the other like red arrow cell (\cline{2-5}). How to make it thick like the others line. \documentclass{article} \...
3 votes
3 answers
321 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@{, ...
5 votes
1 answer
310 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} \usepackage[...
0 votes
2 answers
6k views

Cell color not working

For some reason, I can't render colored cell with \cellcolor anymore. MWE below. It worked in TL 2018, but I can't get it to work in TL 2019. \documentclass{article} \usepackage[table]{xcolor} \...
4 votes
2 answers
288 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
3 answers
600 views

Cancel \rowcolors for a specific cell

In some tables, the cell in the top-left corner is meant to be left empty. To do this in tables that use \rowcolors, I do \cellcolor{white}. However, I'm now using some old tables of this kind in a ...
1 vote
2 answers
203 views

How to color a range of cells in a row in a table?

In the below code I have tried to redefine the \cellcolor command to achieve the effect of coloring a range of consecutive cells in a row by creating a command called \colorrow. It didn't work out. I ...
0 votes
1 answer
81 views

How can I make this table look nicer?

I am new to LaTeX and am trying to make a nice table. However, the best I can get is this: Does anybody have any improvements i can make? MWE: \begin{table}[h!] \begin{tabular}{|l|l|l|} \hline \...
1 vote
2 answers
478 views

Globally styling vertical and horizontal rules in both tabular and longtable

I would like to change all the horizontal rules in all tables to be blue and all the vertical ones to be red by applying a .sty file. I cannot change the actual LaTeX markup of the tables themselves ...
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 ...
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 ...
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
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
333 views

How to color crossed out cell?

I crossed out the letter K using the answer given here... cross out arbitrary cells Then I colored the row using \cellcolor, but the cell, which is crossed out is only half filled... What do I need to ...
2 votes
2 answers
604 views

How To Color A Single Multicolumn Cell

I am trying to color individual cells inside of a table containing multicolumn cells, however Using \colorcell, or \columncolor results in cells which have white padding on the right hand side. I ...
5 votes
3 answers
2k views

Clear rowcolor at midrule

I'm trying to make my tables look nicer by default. What I'm looking to do is fill every row between a toprule and a midrow. The next row after a toprow can be easily filled by appending \rowcolor{...
1 vote
2 answers
388 views

Understanding \hhline and \colorcell in Colortbl package

I can not get the border of this minimal example to look correct, the \colorcell command is overwriting the lines: \documentclass[11pt]{article} \usepackage{xcolor} \usepackage[margin=.9in]{geometry} ...
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 ...
4 votes
2 answers
922 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: \rowcolors{...
3 votes
3 answers
735 views

How to color a column starting from a specific row

I want to color a column, but only starting from the row that starts with C1. I have this example output. I want to remove the yellow color from the row before C1. This is how it looks: This is the ...
6 votes
2 answers
894 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 ...
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$ ...
4 votes
2 answers
1k 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}} ...
2 votes
2 answers
60 views

xcolor `table' options clears part of the hhline command output

When I use table option for xcolor package or use colortbl package, it clears part of the hhline (red border in below picture)! How can I fix this problem? When I remove table option, the output is ...
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 ...
2 votes
3 answers
388 views

color overhang with rowcolors in a table

I load xcolor with option table, to get alternating row colors However, I can't remove the color padding before the text of the first column (when using @{}. In xcolor documentation, I see options for ...
5 votes
2 answers
964 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@{\,}|} \...
1 vote
4 answers
46 views

Iterate on set and use \rowcolor

I would like to generate the table contents with pure latex. My draft is as follows: \documentclass{article} \usepackage{expl3} \usepackage{colortbl} \definecolor{lightgray}{gray}{0.9} \ExplSyntaxOn \...
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 ...
0 votes
0 answers
38 views

Why am I getting Black Cells in when using longtables?

I have the following code: \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{longtable, booktabs, colortbl} \title{test} \author{xyz} \date{May 2023} \begin{...
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[...
0 votes
3 answers
152 views

Splitting a table cell between right and left alignment with colored rows

I'm trying to make a table that's essentially a feature matrix. Entries are grouped, and each group is a set of completions to a sentence. Because of space constraints, I'm trying to keep the start of ...
1 vote
1 answer
198 views

colortbl & dcolumn: Package array Error: Illegal pream-token (\tabpre): `c' used

While using the packages colortbl, dcolumn for the scenario described in MWE, I am getting the below error message: MWE: \documentclass{article} \usepackage{colortbl} \usepackage{dcolumn} \...
1 vote
3 answers
139 views

rowcolor doesn't fill width with multicolumn + makecell for tabular

I'm creating a table. I need a cell that (1) spans 3 columns and (2) has multiple lines inside it; I will specify where the line breakings occur. Also, I want the row that contains that cell to be ...
2 votes
1 answer
153 views

Horizontal tabular borders and `\arrayrulecolor` in beamer

When I tried implementing this answer in a previous question, I discovered a problem involving horizontal tabular borders and \arrayrulecolor. \documentclass{beamer} \usepackage{booktabs} %\cmidrule \...
2 votes
3 answers
325 views

Table Cell colors have white gaps between them

I'm trying to set up a table for some results I got for some experiments. I was trying to recreate this table in my latex document (not exactly, but the general look of it). I'm 99% on the way there, ...
1 vote
1 answer
105 views

cellcolor leaves a blank space at the right of a multicolumn

Code: \documentclass[11pt]{article} \usepackage{xcolor} \usepackage{array} \usepackage{colortbl} \usepackage{multirow} \usepackage{makecell} \renewcommand\arraystretch{1.5} \begin{document} \begin{...
4 votes
3 answers
199 views

Problem with rowcolors and @{} in tabular environment

I would like to insert the \pm symbol between a pair of numbers on each line of a table. I would like to alternately color the rows. I tried to use the rowcolors package but this overwrites the ...
3 votes
2 answers
786 views

Problem coloring an entire table due to \raisebox

I'm trying to make an ENTIRE table gray (see picture but I can't get it to work with \raisebox. Here's my code: \documentclass[a4paper,11pt]{article} \usepackage{color,amsmath,amsfonts,amssymb} \...
1 vote
1 answer
72 views

Provide value-dependent color to \cellcolor command

I would like to create a table-based heatmap. The answer https://tex.stackexchange.com/a/175035/70170 looks like what I need, but instead of three fixed colors, I'd like to call \cellcolor{} with a ...
3 votes
1 answer
87 views

Conflict between minted, colortbl and multicolumn (insertion of code in array cells)

I am doing a table, where some cells contain code. I also want to color some cells. It is perfectly allowed to use minted inline code inside table cells. However, I can't use minted code in a ...
3 votes
2 answers
130 views

Paint columns of multirows latex

I'm trying to coloring a table with multirows. I want to "Formação Candeias" cell to be gray, "Rifte" cell to be pink and "Pré-rifte" cell to be blue. Below I'll show my ...
3 votes
1 answer
1k views

Persistent error ‘Undefined control sequence. \cellcolor’ with 'colortbl' LaTeX package

I've had a persistent error that appears with the following MWE (generated using TablesGenerator.comand tested with Texpad). The error ‘Undefined control sequence. \cellcolor’ does not appear to be ...
1 vote
3 answers
177 views

colortbl: why does a double vertical line interrupt the background color?

Feeding \documentclass{standalone} \usepackage{colortbl} \begin{document} \(\begin{array}{l|l|l||l|l|l} \rowcolor[gray]{.9} 11 & 12 & 13 & 14 & 15 & 16\\ 21 & 22 &...
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 ...
2 votes
3 answers
115 views

Can't format the table correctly (\hline and colored cells)

I've created this table using a table converter website online and then tweaking it until I got what I wanted. I am using overleaf to compile everything. \begin{table}[h!] \caption{Composition of the ...
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 ...

1
2 3 4 5 6