Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [rowcolor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
53 views

Incorrect formatting of table with graphics inside using centering statements

I am trying to produce this beautiful table with ducks. I have two formatting issues that are connected: the most annoying one is that when zooming on the table the white \Xhline or the color bands ...
user avatar
  • 123
0 votes
1 answer
51 views

Can't colour the right rows table

I have made a table with a table generator. I want the two first rows to be white, the following row to be grey and white intermittently. This is the code I generated: Preamble: (long since this is a ...
user avatar
  • 1
1 vote
0 answers
25 views

below space not coming correctly using colortbl.sty and rowcolor

My codes are: \documentclass[executive,twoside, justified, symmetric, notoc,openany]{tufte-book} \usepackage{booktabs} \usepackage{longtable} \usepackage{colortbl} \usepackage{setspace} \usepackage{...
user avatar
2 votes
1 answer
106 views

\rowcolor makes the text disappear

I use rowcolors{...} to color a table, After that, some text from my column disappear slightly . Why is that, and what can I do to fix the error? \documentclass[12pt,a4paper]{article} \...
user avatar
  • 69
0 votes
3 answers
38 views

How to make a longtable with \extracolsep zebra striped

I found out from this question that one can make a longtable zebra striped by using \rowcolors{2}{white}{gray!25} So I tried it but noticed that it doesn't look good in my project - the stripe sticks ...
user avatar
0 votes
1 answer
23 views

How to get \clearpage and \rowcolor to work together in a longtable?

I have this multi-page longtable where I need to nudge a row over to the next page for layout purposes. Normally I'd just start the row with \clearpage (and this has worked elsewhere) but this time I ...
user avatar
  • 101
0 votes
1 answer
50 views

Rowcolor gaps in the intercolumn space [closed]

I have a table that uses alternating white and gray colored rows, but there is always a lack of color applied to the intercolumn space. I have tried what other threads suggested in using variations of ...
user avatar
1 vote
2 answers
35 views

multirow with color does not work properly

First, there is not any error message, but I have this problem in which I want to merge rows horizontally, but I do not know why the text appears like that: Code: \documentclass{article} \usepackage[...
user avatar
  • 231
2 votes
2 answers
170 views

How do I add vertical space of 10pt between the rows so that it is not as congested, while still maintaining the row colors?

\begin{document} \begin{table}[H] \centering \begin{tabular}{ccccccccc} \toprule String Tension & \multicolumn{8}{c}{Rebound Height / m $\pm$ 0.05 m}\\ kg/ $\pm$ 0.5 & ...
user avatar
3 votes
1 answer
294 views

How to reset alternating row colors using xcolor and longtable?

I am attempting to automate alternating row colors in a longtable environment. My rows alternate between gray and white, and the alternating persists across pagebreaks. My issue is that I would like ...
user avatar
  • 83
0 votes
0 answers
112 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
0 votes
3 answers
100 views

The taburowcolors doesn't change the row color

I need to highlight the special line on my table. For doing that, I use the next configuration: \documentclass[9pt]{scrreport} \usepackage{tabu,booktabs} \usepackage{booktabs} \usepackage{numprint,...
user avatar
1 vote
2 answers
74 views

How to do \nopagebreak in xltabular with \multicolumn and \rowcolor?

After reading tons of answers here, the docs and log output I have no idea to solve my \nopagebreak issue. Based on the How to insert a \pagebreak before a \multicolumn? answer I build this MWE: \...
user avatar
1 vote
2 answers
137 views

Tabularx alternate row colors not working

I'm unable to get alternate row colors to display for any of my tables inside sections. What am I missing? My MWE for a sample section: main.tex \documentclass{article} \usepackage[document]{ragged2e} ...
user avatar
  • 37
1 vote
1 answer
91 views

Problem with \rowcolor command in nicematrix package

I am having problems with the \rowcolor command in nicematrix package. Here is a MWE. \documentclass{article} \usepackage{nicematrix} \begin{document} We define the product \(AB\) by %Example 1 \...
user avatar
1 vote
1 answer
145 views

Alternating row color in all tabularx

I would like to colour every alternating row in every tabularx. I know that I may gain this for all normal tabulars by using the following code in the preamble: \usepackage[table]{xcolor} \definecolor{...
user avatar
  • 61
0 votes
1 answer
76 views

Is it possible to color the rows (with different colors in each row) in an xltabular environment?

I would like to color the text containing in the table row but with different colors in each row. How can I do this? Below, I show my minimum code. \documentclass[12pt, article]{memoir} % Packages \...
user avatar
  • 177
1 vote
2 answers
41 views

Rowcolor not working when tabular contents is in a separated file

I am having some issues in using rowcolor in some tables that have the contents in separated files. The following code works normally \documentclass{article} \usepackage{booktabs} \usepackage{color, ...
user avatar
  • 141
2 votes
1 answer
65 views

rule, colorbox, space

I have three questions about this table: The space between the \toprule and the description is greater than the space between the description and the \midrule. How Could I change this that both ...
user avatar
  • 471
3 votes
3 answers
158 views

\rowcolors command (xcolor, option [table]) and different table environments

Using xcolor.\rowcolors together with booktabs.\midrule I have encountered some weird behaviour. To make it plain: the point is not whether or why the tables look so utterly ugly ... In the MWE there ...
user avatar
  • 41
7 votes
2 answers
198 views

rowcolor too large when removing space on rows

I am a LaTeX beginner and facing an issue that I can't seem to find the answer for... I am creating a table (using booktabs but my issue also occurs when not using the package), and whenever I remove ...
user avatar
  • 71
0 votes
2 answers
109 views

how can shading rows in table

I wanted to do shading in a table according to its rows. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to shade ...
user avatar
  • 1
2 votes
2 answers
220 views

Reset rowcolors of table

I had some tables with alternating row coloring, using \rowcolors{1}{white}{gray} and tabular environment. After that, I wanted to reset my rowcolors to the default, so I did \rowcolors{1}{white}{...
user avatar
  • 193
2 votes
2 answers
115 views

How do I reduce the height of a colored row in a table?

I want to get this: I wrote this, when I put [-1.5ex] after \\, I can get reduced row height but the color of the row is still normal row height. How can I make the color's height reduce? Any ...
user avatar
  • 23
3 votes
1 answer
53 views

rowcolor uneffective in longtable with makecell

I'm trying to color the rows of a longtable with rowcolor as follow (in the MWE I have onyl included few rows of the very long table): \documentclass[a4paper]{article} \usepackage[fontsize=8pt]{...
user avatar
  • 63
2 votes
2 answers
46 views

Altering table row colors trought multirow

I can alternate the color of the rows in a table with \rowcolors. However, when I use \multirow it makes breaks the 'logical coherency': How it works: How should it works: MWE for the first output: \...
user avatar
  • 768
5 votes
2 answers
90 views

Tabularx, rowcolors, rotated multirow text in table

I'm having issues with my tables, specifically with alternating row colors. In my tables, I have a column in which I display the category of the row entry. E.g., for olympic weightlifting, I ...
user avatar
3 votes
3 answers
274 views

Three alternating row colours in a table with multirow

I have an horribly complex LaTeX table which I try to make a bit more readable. I would like to use three different row colours, starting at the batch size column. It is very difficult to do so, ...
user avatar
  • 350
1 vote
0 answers
51 views

`\rowcolor{}` does not color the row in a table [duplicate]

My goal is to color a row as lightgray, but instead of coloring a row it just prints green string in the row. What my be the reason for this and how can I fix it? I am using following example with ...
user avatar
  • 404
2 votes
1 answer
42 views

Alternating rowcoloring by xcolor not identical for all tables

I am trying to apply alternating colors to my document, by use of the xcolor package with the table option. As far as I am aware it is possible to define the alternating colors in the preamble, so ...
user avatar
  • 23
1 vote
3 answers
201 views

\rowcolor and @{} issue

In the next example we can see that \rowcolor does not take into account the declaration @{} in tabular preambles. Is this a normal behavior? Is there some elegant way to avoid that spurious filled ...
user avatar
  • 768
0 votes
2 answers
152 views

How make colored headrow in a table?

I have the following table \newcommand{\headrow}{\rowcolor{black!20}} \definecolor{Gray}{gray}{0.90} \begin{table}[ht]\rowcolors{1}{Gray}{white} \begin{center} \caption{Test Table} \begin{tabular}{l|...
user avatar
0 votes
1 answer
102 views

Color \multirow?

I want to draw a table using threepartable. I want the following structure: 1- the first line includes 2 rows:\multirow 2- the second line includes also two rows 3-the third line include 3 rows 4- ...
user avatar
1 vote
2 answers
77 views

mult-colored multirow tables (not using \multirow{-x})

I wonder if there's a different way to do the alternate colors in a multirow tables. Everywhere people use "\multirow{-x}" but i would like to know if there's a way of doing it without any ...
user avatar
  • 11
0 votes
0 answers
90 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,...
user avatar
  • 390
0 votes
1 answer
199 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
  • 910
0 votes
1 answer
58 views

Non-uniform row color for multi-columns + multi-rows (Partially colored rows withing merged columns and rows region)

Regarding the MWE shown below, I do not know the reason for non-uniform row color among merged columns and rows. Although I am using the command (\rowcolor{gray!25}), rows are partially colored in the ...
user avatar
  • 733
0 votes
2 answers
238 views

rows of alternating colors in longtable: filling whitespace depending on the row number

I'm using the longtable package along with booktabs-style rules and alternating row colors. The MWE \documentclass{article} \usepackage[a6paper]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{...
user avatar
  • 407
4 votes
2 answers
87 views

\rowcolor covers text in tables because of using @{\,} between columns

The table contains components of a recipe and i would like to mark replaced components with gray color. The reason for the coverage seems to be the manual reduction of the space between the columns ...
user avatar
2 votes
3 answers
160 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 ...
user avatar
0 votes
0 answers
20 views

Coloring cells correctly when using tabu, multicolumn, and multirow [duplicate]

I have made the following table header using tabu, however as you can see there is a white line separating the two merged cells of the \multirow. Does anyone have any advice on how to fix this? Code ...
user avatar
  • 1
0 votes
3 answers
220 views

Rowcolor overhang with makecell

When I trim the sides of tables using @{}, the \rowcolor hangs over the sides. I've fixed this with <{\kern-\tabcolsep} on the first and last column (according to this question). However, if \...
user avatar
  • 508
1 vote
1 answer
170 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 ...
user avatar
  • 508
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
1 vote
1 answer
192 views

Rowcolor, Multicolumn, and Tabu

Ok, I want to create an environment that prepares my table in such a way that I have consistent results. \documentclass[10pt]{article} \usepackage[table]{xcolor} \usepackage{graphics} \usepackage{...
user avatar
  • 126
0 votes
1 answer
124 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
3 votes
1 answer
129 views

color table rows with more than 2 colors, restarting every (n) rows

My first question here. MWE provided, short and detailed. I want to color the rows of a table, not just alternating 2 colors, but a series of multiple colors, or perhaps 6 shades of grey. *cough* ...
user avatar
0 votes
1 answer
91 views

\rowcolor doesn't fill complete cell

I use a template to create use cases in latex (Template information). This is how it normaly looks: The latex source to use it looks like this: \begin{usecase} \addtitle{test text to show the ...
user avatar
0 votes
1 answer
30 views

Coloring Entire Rows in a Multicolumn [duplicate]

\documentclass[a4paper, twocolumn, 12pt, notitlepage, nofootinbib]{revtex4-1} \usepackage[top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry} \usepackage[table]{xcolor} \usepackage{amsmath,amsfonts,...
user avatar
4 votes
5 answers
485 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{...
user avatar
  • 201