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
0answers
24 views

Fix background cellcolor to match the borders

How can I fix the booktabs borders to match the cell color or vice versa? \documentclass{article} \usepackage[normalem]{ulem} \usepackage[svgnames,table,xcdraw]{xcolor} \usepackage{booktabs} \...
2
votes
1answer
36 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 ...
0
votes
2answers
52 views

Creating a Table fitting the line width and without thin white vertical lines between color filled cells

Can some help me making the table coded in this Thread https://tex.stackexchange.com/a/301036/229635 fit the line width? As a MWE I copied the code from the Thread I attached as a link. Thanks a lot, ...
0
votes
0answers
29 views

Is it possible to use the colortbl package to change the font color?

It was suggested in a comment to this question that I should use the \rowcolor command in the colortbl package to change the font color of rows in a table. To my novice LaTeX eyes, it seems like the ...
1
vote
1answer
39 views

How to put tablet formats in correct way

I tried to make one table in LaTeX however my code doesn't work, do have any idea to solve this? \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage{colortbl} \usepackage{arydshln} \begin{...
4
votes
4answers
201 views

Coloring whole row in table/tabular

I would like to color the entirety of the row "Trail 1" and "Trail 3", other than those words themselves (ie just the numbers, but the coloring runs from the \midrule to the next). ...
2
votes
1answer
24 views

Tabularx and colortbl conflict inside a savebox

My overall goal is to build a table inside a savebox so I can easily fill the page with multiple copies. Someone recommended using tabularx, which worked well until I also tried to use the colortbl ...
1
vote
1answer
71 views

How to manage color lines in tables?

I've created a table using the website: https://www.tablesgenerator.com/, but I've a problem with some lines. How can I delete white lines in the first column of the following table (the ones ...
0
votes
2answers
71 views

Highlighted column and row not working. How to resolve it?

I need to highlight some columns and rows in the table. But the following code is not working. So kindly help me to resolve the issue. I am using miktex with winedt. Thank you. \documentclass[CEJMed,...
0
votes
1answer
75 views

How could I know the result color when I mix the color numbers? [closed]

In these codes, how can i select a special color from them? \definecolor{mypink1}{rgb}{0.858, 0.188, 0.478} \definecolor{mypink3}{cmyk}{0, 0.7808, 0.4429, 0.1412} \definecolor{Mycolor2}{HTML}{00F9DE}
1
vote
1answer
57 views

pgfplotstable: How to use the read out row- (column-) value for styles

I want to color a row (column) from a cell with special content, e.g. 'x'. I tried to use every nth row={\rememberrow}{before row=\rowcolor{orange}}, % WORKS NOT! in the solution. \xdef\remembercol{...
5
votes
3answers
129 views

Adding arrayrulecolor command removes top rule

The code below results in the image below. \documentclass{beamer} \usetheme{Montpellier} \usecolortheme[named=gray]{structure} \usepackage{colortbl} \usepackage{array} \newcommand{\gr}[1]{\textcolor{...
0
votes
0answers
35 views

Colored vertical lines different on each row

I'd like to have a empty cell with a colored background line-dependant, meaning that on each line I can specify a different color for that space. Here is a screenshot of the best I can do. The idea ...
1
vote
2answers
48 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 ...
4
votes
2answers
90 views

Coloring a line of a table

I try to color only the first line of the table below, using the code: \documentclass{article} \usepackage{makecell} \usepackage{hhline} \usepackage{xcolor} \usepackage{colortbl} \usepackage{tabularx} ...
3
votes
1answer
158 views

{NiceTabular} word wrap issue

I'm using NiceTabular from the NiceMatrix package and I'm having trouble with wrapping text within a cell. I've found that I've gotten the best results from background color using this package because ...
1
vote
1answer
50 views

Vertical alignment of colored multirow

I want to center the multirow cells vertically, but because I need to color them aswell, I can't use \multirowcell from the makecell package as it is not compatible. Therefore, I used the shortstack ...
0
votes
2answers
76 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 ...
1
vote
1answer
51 views

Rowcolors in a longtable with three parts

I have a longtable inside a ThreePartTable environment and I want to have alternating row colors across page breaks. I want to have no color on the first row, since the header is also colored. The ...
1
vote
2answers
92 views

How to remove blank spaces around table rules

I am trying to produce a colored table but the separation lines and the border lines are creating blank spaces that ruins the aesthetics of the table. I wish to remove them. Here is the code I'm ...
0
votes
1answer
28 views

Center text vertically in a table with multiple lines

I tried to improve the following table as can be seen in the screenshot below, the output is mostly what I want. Is there any reason the text is not centered vertically when it spans over multiple ...
1
vote
4answers
67 views

Problem with colortbl and makecell

Here is an simple example. \documentclass{article} \usepackage[table]{xcolor} \usepackage{colortbl} \usepackage{multirow, makecell} \begin{document} \begin{tabular}{c} longer text\\ \cellcolor{...
0
votes
1answer
66 views

Fill mutirow cell when the horizontal lines are drawn with \hhline

When I fill the multirow cell whose horizontal lines inside the cell are drawn with \hhline{~}, there will be blanks, I try to fix it by >{\arrayrulecolor{gray}\doublerulesepcolor{gray}}=, but the ...
0
votes
0answers
22 views

Blank when filling a table cell

I use ehhline to draw horizontal lines of different colors and widths. When there is more than one width of horizontal lines in a row, the filled cell above the line whose width is not the max will ...
0
votes
0answers
32 views

using self-defined colors with the colortbl package

If I want to use predefined colors to color rows with the colortbl package, it doesn't work: \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{array} \usepackage{colortbl} \...
1
vote
2answers
115 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 ...
0
votes
2answers
37 views

Extra gap between the columns in colored tables

Tables again. I want to color several rows in the table and use colortbl package. Everything works fine. Now I want to add extra gap between the first and the second column to make the table more ...
0
votes
2answers
83 views

Misplaced \noalign when working with tabular and tabularx and \hline

I am constantly getting the error "Misplaced \noalign" at the end of my tabularx. I already read a lot about it online for example that you need to put \\ before \hline. I did this but i am still ...
0
votes
1answer
45 views

Get current value of \arrayrulecolor for a colortbl

I want to define a special tabular environment and allow the user to specify the colors of the text and the rules independently of their values for a regular tabular environment. For the text color, ...
4
votes
3answers
233 views

Problem with highlighting a row in a table

I can highlight a row in a table (see below), but it's not centered on the text. Is there a way to fix this? Code: \documentclass[11pt]{article} \usepackage{color, colortbl,booktabs} \definecolor{...
2
votes
3answers
63 views

Cellcolor covers alignment character in tabular

I'm aligning a range of numbers on an en-dash between two columns in a tabular. I'd like to add color to alternating groups of rows, but using \cellcolor covers up the en-dash. Note: this tabular is ...
0
votes
1answer
39 views

Two cells in one cellcolor argument

This is a follow-up to my previous question How to use cellcolor and double backslash - is there any way to do \documentclass{article} \usepackage{colortbl} \begin{document} \begin{tabular}{l} \...
1
vote
1answer
35 views

\columncolor in foreground if use \multirow

It seems that if I use >{\columncolor{green!30}}c and have \multirow content in that column, the color ends up in the foreground. The only difference in these two tables is that the second one has &...
1
vote
1answer
38 views

Remove horizontal rule in multicolumn table with colored background

I try to remove a horizontal rule in multirow / cellcolor setting: \documentclass{article} \usepackage{hhline,array,multirow,xcolor,colortbl} \begin{document} \parindent0pt \begin{tabular}{@{}|p{1cm}...
0
votes
1answer
68 views

Vertical line tabularx too long

I've seen this answer, and I've tried to reproduce it. My goal is to have all the table borders red and some of them thick. But the 2 first vertical lines span beyond the last horizontal rule, and I ...
0
votes
0answers
305 views

tlmgr install : package translator not present in repository

To reduce the size of docker image I have to install the following latex packages in docker image via tlmgr. It worked fine till now, but the build has started failing recently with the error ...
1
vote
0answers
96 views

@startpbox error still around

I have the latest version of colortbl.sty (12-18-2018) and the most current version of MikTex. The following code generates the error message: "Use of @startpbox doesn't match its definition." I am ...
3
votes
2answers
88 views

Cell not completely colored

As some other people over here, I have some troubles having the cells of my table colored properly. I read many threads about this on the forum, but all problems I could find were related to the ...
0
votes
1answer
113 views

Rowcolor for tabu

Rowcolor need to update from top row to bottom row, in tabu package row colors updating bottom to top row, how to apply color changes as default in top to bottom row color as alternative. Note: ...
3
votes
1answer
68 views

Programming table cell colour based on contents

I built this table based on an earlier Q&A: As you can see there's a problem with the header. How can I disable the highlighting for headers only? Here's the code: \documentclass{article} ...
1
vote
2answers
129 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} ...
1
vote
0answers
42 views

Remove space between table cell [duplicate]

I want to add background color to my table, but do not want any borders \documentclass[12pt, landscape]{article} \usepackage{colortbl} \begin{document} \begin{table}[h] \begin{tabular}{cl} \...
2
votes
2answers
105 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 ...
0
votes
1answer
35 views

\columncolor inconsistency

I'm using column color to visually highlight the first column of a regression table. First row the parameter, second row in "tiny" font the confidence intervals. I'd like the whole column to be ...
4
votes
3answers
214 views

How to resolve this clash between multirow/multicolumn and cellcoloring?

I am trying to put together a little table, but I fail to have the lines between cells displayed correctly: \documentclass{article} \usepackage{multirow} \usepackage{xcolor} \usepackage{colortbl} \...
11
votes
3answers
518 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} \...
1
vote
0answers
341 views

Using cellcolor with tabu

I have made the following table: \usepackage{tabu} \usepackage{xcolor,colortbl} \begin{center} {\tabulinesep=1.2mm \begin{tabu} to 0.9\linewidth { |[2pt] *{3}{X[1 c]|}[2pt] } \tabucline[...
2
votes
2answers
337 views

Dissapearing of table/cell borders with coloured cells in the PDF viewer depending on the zoom

I have a problem with the coloured tables that I want to include in my master thesis, so it is a very important issue for me. I generate the tables with tablesgenerator.com, and in the LaTeX viewer ...
3
votes
4answers
371 views

\noalign caused by multirow and colors

I am trying to create the following table However, I keep getting the following error message ! Misplaced \noalign. \rowcolor ->\noalign {\ifnum 0=`}\fi \global \let \CT@do@...
2
votes
2answers
279 views

Fill between \toprule and \midrule

I've already tried one approach for this and had issues (Clear rowcolor at midrule) and now I've started having more. So instead of trying to fix that approach I thought it could be worth seeing what ...

1
2 3 4 5