Questions tagged [cellcolor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
63 views

How to clear cellcolor for a specific cell in NiceTabular?

Assume I have a table like this: \begin{NiceTabular}{p{3.8cm}p{3.8cm}} \CodeBefore \rowcolors{2}{white}{gray!30} \Body A & B \\ C & D \\ \end{NiceTabular} \rowcolors gives the row ...
user avatar
  • 1,991
0 votes
0 answers
36 views

LaTeX table cell coloring based on values in the cell (3 color scale formatting)

I wanted to imitate the functionality in excel of 3-Scale grading formatting, which changes the background of a table cell based on its value. I wanted each cell to have a percentage value, and each ...
user avatar
  • 1
2 votes
1 answer
58 views

How to fill color in table cells with two lines

I am trying to make a table where cells have colored backgrounds. I am using \colorcell{}, and it works fine with one line of numbers. However, I would need two lines in each cell. To make two lines, ...
user avatar
  • 1,036
0 votes
2 answers
97 views

How to define table cell color depending on cell text value imported from the CSV file

I am trying to color table cell depending on the text value imported from the CSV file. The CSV file has three possible text values that are "High", "Intermediate" and "Low&...
user avatar
  • 38
1 vote
1 answer
39 views

space above and below the text within a cell in a table

In the following simple table: \documentclass{scrbook} \setcounter{secnumdepth}{0} \usepackage[table,x11names]{xcolor} \usepackage{graphicx} \usepackage{geometry} \usepackage[T1]{fontenc} %\...
user avatar
0 votes
0 answers
155 views

Undefined control sequence using \rowcolor, \cellcolor and \multicolumn (packages already installed)

I am using https://www.tablesgenerator.com in order to create my table. The code is: % Please add the following required packages to your document preamble: % \usepackage{multirow} % \usepackage[table,...
user avatar
  • 119
1 vote
2 answers
70 views

Cannot get \cellcolor to work on a table

i've used the following table generator site to create the below table but feel like it's a bit more complicated than it's need to be, and I cannot get the color cell working. https://www....
user avatar
2 votes
1 answer
64 views

Latex to html : keep white space between colored cells in booktabs tables

I use a colored Table to illustrate a concept called 5-fold cross-validation. (Code is below). In latex, it looks as follows: When I convert this to html using tex4ebook cv_table.tex I get this: ...
user avatar
4 votes
2 answers
450 views

Is there a LaTeX package available for robust rendering of tables in pdf?

Four years ago, David Carlisle sketched in this answer a way to mitigate problems with the pdf rendering of lines in cloloured tables. My question: Is there now an available LaTeX package implementing ...
user avatar
2 votes
2 answers
869 views

cellcolor in array LaTeX

The gray shading in the cells leaves no white space on the left. Can somebody help me to solve that problem? \documentclass[border=5pt]{standalone} \usepackage{amsmath} \usepackage[table]{xcolor} \...
user avatar
1 vote
0 answers
24 views

pgfplotstable: color from cellentry ##1 [duplicate]

If I have a column with entries like 0,0,red,0,green,0,0,0,brown,0,0,0,..., why does this not work: postproc cell content/.code={ \ifnum##1=0 \else @cell content={cellcolor{##1}{##1}} \fi}, ...
user avatar
  • 6,323
3 votes
2 answers
100 views

A small aesthetic problem in tables: conflict between \ cellcolor and \ cline commands

As you can see in the example below, the partial horizontal lines, for which I have used "\cline", are overwritten by the gray shading with "\cellcolor". I have seen several ...
user avatar
2 votes
1 answer
561 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 ...
user avatar
1 vote
1 answer
93 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{...
user avatar
0 votes
1 answer
219 views

How to prevent overflow of row/cell colors in booktabs? [duplicate]

Based on this answer you know how to easily create rows with background colors. This also works for booktabs. Edit: This is how it looks by default with \begin{tabular}{lccc}: But we want to change ...
user avatar
  • 920
6 votes
2 answers
244 views

Issue combining makecell and cellcolor

I have seen similar question to this one already but none of the answers I have found seem to solve my problem. I'm trying to color the cells of the first column of my table, but I cannot find a ...
user avatar
  • 63
0 votes
1 answer
81 views

Procedure to produce a Latex source modifable Latex file from initially a MS Word table

Sorry to post again from the same subject I posted a few days ago. I have had an answer but impossible to reproduce the generation of a Latex source from a docx MS Word document. So, I attempt here on ...
user avatar
2 votes
2 answers
110 views

How do I sum CSV-values in to cells?

I am both new here on stackexchange and fairly new to TeX. I have tried searching for similar questions but found none. I am working on a document where I need to pppulate a table from a csv file. The ...
user avatar
  • 77
2 votes
2 answers
562 views

I can't change \hhline color with \arrayrulecolor{}

I have created a table with tabular and cellcolor, and you know what hapends: the cell color overlap the border. I have found that this is often solved with hhline. In order to change the color in ...
user avatar
  • 21
1 vote
0 answers
274 views

How to paste a cell from one table into a merged cell in another table in latex?

I am creating a pdf document in R markdown (.Rmd file)- using latex and R. The R data frame consists of mainly two columns- string column 'Ind' and numeric value 'value'. I need to create 2 types of ...
user avatar
1 vote
0 answers
30 views

Change cellcolor automatically according to the number in cell – "dimension too large"

I would like to change cell color based on the values. I found code from another post Change cellcolor automaticly acording to the number in cell Here is the code that works: \documentclass{article} \...
user avatar
1 vote
1 answer
133 views

Balancing two column table

I am trying to recreate the following table using LaTeX Here is what I have so far My biggest problem is with balancing the two columns height wise (same height) as is done in the picture I am ...
user avatar
9 votes
2 answers
370 views

Make cells from table be displayed with a different value than they are presented in the source code

The context While studying logic, I found myself creating truth tables with different numbers of propositional variables. Sometimes I need to create a truth table for propositions that contains 6 ...
user avatar
  • 415
2 votes
2 answers
86 views

Coloring cells in a table redux: Vertical and horizontal bars hidden in most views/zooms

When using \cellcolor or \rowcolor to shade a cell (or row of cells) in a table, the vertical and horizontal separators become randomly obscured or hidden when viewing the PDF. This is true for ...
user avatar
0 votes
1 answer
126 views

Table with multicolumn highlighted row

I'm trying to make the following table: I can create the structure easily. However I have a problem in the row colour: \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}...
user avatar
  • 3
2 votes
1 answer
43 views

Adjusting a reproduced table

I am trying to reproduce the following table in latex: For this, I am using the following code: \documentclass[12pt,oneside, brazil]{article} \usepackage[utf8]{inputenc} \...
user avatar
2 votes
3 answers
734 views

How to color multicolumn cells in tabularx-tables

I tried to use the answer to the question asked here: How To Color A Single Multicolumn Cell But if I use more rows with different multicolumn spacing, some of the colored multicolum-cells still have ...
user avatar
  • 23
1 vote
1 answer
58 views

Color of table cells

I am having trouble coloring table cells. In the MWE below the color leaves white space at the right. Thinking that this may be due to internal length calculations I explicitly set the lenghts of ...
user avatar
  • 181
0 votes
1 answer
124 views

Tables - cellcolor does not work with tabu any more

I wrote a document with colored cells using \cellcolor with tabu. Unfortunately, it does not work any more. Here is an MWE: \documentclass{scrartcl} \usepackage{tabu} \usepackage[table]{xcolor} %\...
user avatar
  • 2,680
2 votes
3 answers
141 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 ...
user avatar
0 votes
1 answer
362 views

color row in a table using cellcolor

I'm trying to color the title line of the table by using the following code: \documentclass[a4paper, 10pt]{article} %% Packages %% \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} \...
user avatar
  • 403
1 vote
4 answers
255 views

How to use cellcolor and double backslash

This is my code which fails on the last row in the tabular. Why? \documentclass{article} \usepackage[ngerman]{babel} \usepackage{colortbl} \begin{document} \begin{tabular}{l} a \\ b \...
user avatar
  • 36k
1 vote
1 answer
95 views

Customizing Table CellColor Heat Map part 2

I am revisiting a previous question for which we have already a solution: Customizing Table CellColor Heat Map Is it possible to have two different color definitions for two different color themes ...
user avatar
  • 101
2 votes
2 answers
125 views

How to combine cellcolor and rotated text in a table correctly?

I try to create a table that has a width corresponding to 1.2\linewidth, colored cells and rotated text in columns 4 to 9. I have problems with coloring the cells containing the rotated text and to ...
user avatar
1 vote
1 answer
795 views

Tables - cellcolor does not fill the cell

I need to create a summary table for a talk. The idea is to have cells with different colours. However, I do not manage to make the colours fill for one cell. Here is a small example of my problem. ...
user avatar
  • 13
3 votes
2 answers
86 views

How to color a cell of table completely?

I want to color the top row of my table. However, when I used the \rowcolor command, there are white spaces appearing in the second and third columns (cell is not filling completely with the color). ...
user avatar
1 vote
2 answers
2k views

Activity Schedule Table [closed]

I would like help getting ahead and being able to make this activity schedule table. I'm used to making tables simpler but so colorful I don't know. So please, I would appreciate your help. Thank you ...
user avatar
2 votes
2 answers
922 views

rowcolor removes the vertical lines of the table

After compiling (using pdflatex) the following \documentclass[12pt]{amsart} \usepackage{amsmath,amsthm,amssymb,amsxtra,amsopn} \usepackage{xcolor} \usepackage{colortbl} \usepackage{etoolbox} \begin{...
user avatar
3 votes
1 answer
79 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} ...
user avatar
  • 1,979
1 vote
0 answers
87 views

How to hatch multicolumn cells instead of colour [duplicate]

In the following table I want the \multicolumn cells hatched in the same way, but I cannot get it to work. For all the cells I now have grey, I would want them hatched with diagonal lines. \...
user avatar
  • 35
2 votes
2 answers
842 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 ...
user avatar
  • 23
4 votes
3 answers
460 views

issue with hhline and cellcolor in table

I am trying to setup a table with \hhline and \cellcolor. After I got it so far, that I don't see \hhlines in the colored cells I am now missing the black \hhlines which should separate the cells. ...
user avatar
  • 93
2 votes
2 answers
70 views

Again tabular. What is the best way to color a cell or a table? What is the problem?

Hi again (I´m sorry by English mistakes). I've learned a lot here. This week I learned several ways to create a table joining cells, and also how to put colors in it. However for some reason, two ...
user avatar
  • 1,363
2 votes
3 answers
2k 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 ...
user avatar
1 vote
1 answer
5k views

Cellcolor - undefined control sequence

What is wrong with this please? I have error ! Undefined control sequence. Fit& 1& 2& 3& 4& 5& 6& 7& 8& 9& \cellcolor Thank you \documentclass[12pt,a4paper]{...
user avatar
6 votes
3 answers
297 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 ...
user avatar
  • 255
2 votes
2 answers
667 views

Cellcolor creates too wide coloured field in table without internal cell margins

Summary: can I get a table with narrow columns (about 5 mm), a normally sized capital letter in some cells and some of the cells coloured (filled by a pattern would also work)? Full question: I'm ...
user avatar
  • 75
2 votes
1 answer
126 views

Error while using cellcolor

\begin{block}{|ccc|} is not working while using cellcolor \documentclass[10pt,dvipsnames,svgnames]{beamer} \setbeamertemplate{navigation symbols}{} \usepackage{amsmath,mathtools} \usepackage{colortbl}...
user avatar
  • 7,546
3 votes
1 answer
307 views

Tables with multirows, coloured cells and horizontal dashed lines.

I am making a table with some coloured rows, dashed lines and multi rows. There is a set of issues I am running into, and none of them seem to solve my entire problem (only partially). Below I would ...
user avatar
  • 33
2 votes
1 answer
241 views

Cell color covers math expression

In the following colored table there is a color issue at the 2nd row. As you can see the curly bracket is partly covered by the row color. I tried to enclose the cell in a minipage, hoping that it ...
user avatar
  • 1,389