Questions tagged [rowcolor]

The tag has no usage guidance.

9
votes
1answer
931 views

Why is the start row of \rowcolors ignored in tabularx?

Seems like \rowcolors when used for a {tabluarx} doesn’t work properly: The specific number of the first row to be colored is ignored. This si not the case for a normal {tabluar}. In both tables the ...
8
votes
1answer
10k views

Undefined Control sequences \rowcolors

Getting errors with alternating rows saying undefined control sequences. Any help please! \documentclass{article} \usepackage{xcolor} \usepackage{booktabs} \usepackage{graphicx} \begin{document} \...
7
votes
2answers
6k views

\rowcolor for a \multirow

The \multirow text is covered by the background color. Does someone know why and can fix it? \begin{table}[h] \caption{caption} \label{tab} \centering \begin{tabular}{cccccc} ...
6
votes
3answers
660 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$ ...
6
votes
2answers
1k views

How to color a portion of a row in bmatrix

I am trying to color just a portion of rows of a bmatrix. How would I achieve this? Here is what I have so far: \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \[ \begin{...
6
votes
1answer
51 views

Numbers disappears with \rowcolor in siunitx table with tableformat=x.0

Following the siunitx documentation in regards to '7.13 Creating a column with numbers and units' and '7.14 Tables with heading rows' I have tried to make a table a table with currency as unit. The ...
5
votes
2answers
882 views

Tabularx option in tcolorbox: how to colored the first row?

I like to have the first row in table make with tcolorbox with tabularx option with different color as it is in the other rows. I try to use \rowcolor{<color>}, but i received error: Misplaced ...
5
votes
2answers
86 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 ...
5
votes
1answer
290 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 ...
5
votes
3answers
432 views

Table/Tabular Row Spacing

I'm trying to tex a table with alternating rows. It's working but there is something like a non-colored gap/spacing between the rows, so it looks very weird: Here is the code for the example above: %...
4
votes
2answers
1k views

How to set text color and font type of header row for all tables in LaTeX?

I have a document with plenty of tables and I would like to apply the same formatting of the header row for all of them, without making manual modifications for each tabular. I now use \...
4
votes
2answers
224 views

csvsimple vs. conditional row coloring

I've a CSV file what I want process with csvsimple. My desire is to color some rows based on a conditional (one specified column has bigger value). Here is an MWE: \documentclass[12pt]{article} \...
4
votes
1answer
915 views

\rowcolor overwrites column divider

I have a strange issue where my rowcolor command is overwriting the column separator in some PDF viewers. Acrobat (unfortunately) is the only one that has the rendering issue. The issue exists in ...
4
votes
2answers
920 views

Row colour gaps in tabularx with \aboverulesep and \{}

\documentclass[]{article} \usepackage[table,dvipsnames]{xcolor} \usepackage{multicol,booktabs,tabularx} % Table settings \renewcommand{\aboverulesep}{1pt} \renewcommand{\belowrulesep}{1pt} \begin{...
4
votes
2answers
2k views

Misplaced noalign after rowcolor in multicolumn

I want to use row coloring with \multicolumn. The MWE below works, but if I change to the commented, colored line, I receive a "misplaced \noalign". What do I wrong? \documentclass{article} \...
4
votes
2answers
783 views

Coloring longtabus (with rowcolors)

Another desperate I-google-together-my-document person here: In my thesis I want to create light grey tables with darker grey top lines, but I encounter 2 problems: If I use \rowcolor[RGB]{240,240,...
4
votes
1answer
56 views

Changing the font in every second line of the table

I've already found solutions here that work over \rowfont{} but not automatically adjust by even and odd number of lines. I think about a case function it would work well for the first lines and then ...
3
votes
4answers
191 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@...
3
votes
3answers
214 views

Getting black of a cell in a table

In the following code, I tried to create two rows for each cell in the first column. I want the rows be colored. However, the first rows of the colored cell get black. How can I solve this problem? \...
3
votes
1answer
763 views

Misplaced noalign when using rowcolor

I am trying to create a table with colored rows and colored hrules between the rows, but I am getting a "Misplaced \noalign. \rowcolor" error. The following example reproduces this problem: \...
3
votes
3answers
199 views

unset rowcolor in eqnarray

I have a document with a defined \rowcolors Now in a math environment, a cases element is rendered with this table background overlapping the brace: This can be fixed by adding \rowcolors{1}{}{} ...
3
votes
2answers
315 views

Best way to add space between columns with alternating colored rows

I did some search on the topic without success. Most of the time people want to remove spaces, or have problems with last column, etc. In my case I want the spaces to be there and between columns. I ...
3
votes
1answer
472 views

How to prevent \rowcolor from overriding row lines in PGFPlotsTable?

A relatively new to PGFPlotsTables but find it very useful for formatting large tables and pulling in external data in LaTeX. However, I'm running into the following issue. When I want to color the ...
3
votes
1answer
161 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 ...
3
votes
2answers
148 views

Duplicating MS-built Table Formatting in LaTeX

I have a table made in MS Office and I'd like to recreate it using LaTeX. I've attempted a number of solutions using Table+Tabular (using this as a template); this has worked until I try to implement ...
3
votes
1answer
427 views

LyX table: “Misplaced \noalign” error in colored multicolumn row

I found out how to color table cells/columns/rows thanks to the answers here and here. I followed the examples in the documentation. In the preamble, I put: \usepackage{colortbl} \definecolor{...
3
votes
1answer
903 views

Table \rowcolor \multicolumn color displacement

I have the following table: \documentclass[a4paper,12pt,twoside]{book} \usepackage[utf8x]{inputenc} \usepackage[table,xcdraw]{xcolor} \usepackage{tabularx, threeparttable} \usepackage{multirow} \...
3
votes
1answer
123 views

Coloring columns in blockarray

I'd like to color individual columns in a 3x3 matrix created using \blockarray. I wish to give one color to the first column, and a second color to the 2nd and 3rd column. I found the answers two this ...
3
votes
1answer
650 views

Adjust longtables to textwidth

I would like to adjust my longtables in a document to the textwidth. What would be the best way to go about this? The code I'm currently using is: \documentclass{article} \usepackage{lipsum} \...
2
votes
2answers
75 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 ...
2
votes
1answer
189 views

I need rows colored alternatively but in doubles

\documentclass[12pt]{article} \usepackage[ paperwidth=8.27in, paperheight=11.69in]{geometry} \usepackage{booktabs, siunitx} \usepackage[svgnames,table]{xcolor} \usepackage{longtable} \usepackage{...
2
votes
2answers
84 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{...
2
votes
1answer
325 views

Removing rowcolors after long table

I am trying to have a long table in which every other data entry row is in gray. This I get easily by implementing: \documentclass{article} \usepackage[table]{xcolor} \usepackage{colortbl} \...
2
votes
2answers
96 views

Rowcolor in tabular vs Forest node, unwanted behavior

I have problems when using tabular and forest in the same document. The row colors is also active on nodes in Forest trees. See MWE: \documentclass{standalone} \usepackage[dvipsnames,table]{xcolor} \...
2
votes
1answer
600 views

How to prevent \rowcolor from altering the thickness of cell borders?

\rowcolor seems to alter the thickness of cell borders. Example: \documentclass{scrbook} \usepackage[table]{xcolor} \definecolor{maroon}{cmyk}{0.20,0.00,0.00,0.00} \begin{document} \noindent\begin{...
2
votes
3answers
1k views

How to setup a longtable with booktabs and a colored (head) row

I'd like to make a longtable with the first (head) row colored in grey. Since booktabs inserts white space below the \toprule and above the \midrule, i need to insert a colored rule: \newcommand*{\...
2
votes
2answers
885 views

Color in multicolums, in memoir

I have this code: \begin{table}[H] \label{tab:brud} \centering \caption{Tabel over dominerende laster ved brudgrænsetilstanden.} \begin{tabularx}{1\textwidth} {XX>{\raggedright\arraybackslash}...
2
votes
1answer
72 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 ...
2
votes
1answer
160 views

rowcolor command from colortbl package leaves unwanted gaps in shading between columns

I would like to highlight the first two rows of my table with a custom shade of gray. For this, I thought of using the \rowcolor environment from the colortbl package. However, its usage seems to ...
2
votes
1answer
215 views

Change row color when item changes

Following the idea in this post: http://www.benjaminbiegel.com/a-latex-table-that-actually-looks-nice-2-106.html I was able to create this table: It changes the rowcolor for every row, and I need it ...
2
votes
1answer
434 views

\rowcolor does not paint \multicolumn cells

Consider the following MWE: \documentclass{article} \usepackage{colortbl} \usepackage{tabularx} \begin{document} \begin{table} \begin{tabularx}{\textwidth}{rX} Right Right Right & Text \\ Right ...
2
votes
1answer
39 views

Color background for title row in csvsimple

Assume a simple example centered on the csvsimple package. \documentclass{standalone} \usepackage{csvsimple} \usepackage{fp} \usepackage{xcolor} \begin{filecontents*}{input.csv} Foo,Bar,Baz,...
2
votes
2answers
78 views

xcolor's rowcolor blocking multi-line brackets

I am trying to make a table with different colors alternating per row, and I found that my document was compiling like this: I've had similar issues with matrices and other large braces, but not ...
2
votes
0answers
332 views

easytable package and \colorrow

I use the easytable package to make isometric tables. This package provide the TAB (with caps) environment to make tables. In the same time I use the xcolor package with table option to colorize ...
1
vote
2answers
1k views

Table: white spacing with rowcolor, multicolumn and multirow

I have the following table : It uses \rowcolor, \multicolumn, \multirow but it also has a wide white spacing between the cases. I need the title "Cobertura del transporte en el municipio de ...
1
vote
2answers
638 views

Adjust table widths, spacing and color

I have a question regarding tables in Latex. I tried to find a solution now for two hours, but couldn't fix all my problems in one code. So I found single solutions for everything, but couldn't bring ...
1
vote
2answers
83 views

Expanding longtable to fill page width with shaded rows

I'm working on a document that contains several long tables. For consistency, I'd like all of these tables to be the same width. I'm assuming that the easiest way to accomplish this is to simple ...
1
vote
1answer
38 views

Span rule disappear when using colors in table

Good day! Here my requirement is table columns in different color with respective span rule. When we using \cline{} it has disappeared and overridden by next row color. Please suggest me how to solve ...
1
vote
1answer
447 views

makegapedcells disables rowcolor

I have following table \documentclass[a4paper, 11pt, parskip]{scrreprt} \usepackage{graphicx} \usepackage{colortbl} \usepackage{xcolor} \usepackage{multirow} \usepackage{makecell}%To keep spacing of ...
1
vote
1answer
39 views

colortbl has different behavior when tabular contents are \input

I'm typesetting a complex table with the contents created by an external program. When I use \input I get unexpected behavior from \rowcolor. See the MWE below \documentclass{article} \usepackage{...