Questions tagged [rowcolor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
31 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}{...
0
votes
1answer
50 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 ...
3
votes
1answer
37 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]{...
2
votes
2answers
30 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: \...
5
votes
2answers
50 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 ...
3
votes
3answers
79 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, ...
1
vote
0answers
46 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 ...
2
votes
1answer
34 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 ...
1
vote
3answers
95 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 ...
0
votes
2answers
79 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|...
0
votes
1answer
58 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- ...
1
vote
2answers
40 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 ...
0
votes
2answers
74 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
0answers
12 views

Using rowcolor with csvsimple and longtable always prompts no align error

I am trying to create a longtable based on a csv file in which the rows are colored using \rowcolor. The problem is that the combination of the longtable head with \endrule and the \rowcolor seems to ...
0
votes
1answer
28 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 ...
0
votes
1answer
42 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 ...
0
votes
1answer
93 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]{...
4
votes
2answers
50 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 ...
1
vote
2answers
56 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 ...
0
votes
0answers
18 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 ...
0
votes
3answers
102 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 \...
1
vote
1answer
60 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
52 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 ...
0
votes
0answers
50 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{...
0
votes
1answer
59 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}}...
2
votes
1answer
35 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* ...
0
votes
1answer
46 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 ...
0
votes
1answer
25 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,...
4
votes
3answers
244 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{...
3
votes
1answer
128 views

TabularX - with rowcolor - Unwanted gap between columns

I have a problem with the rowcolor of the tabularx. I have a column with dimensions where I want all the 'x' chars centered. I thought of two solutions. One with the c@{ x } definition in the table ...
1
vote
1answer
74 views

\color makes my text not aligned in table header

I'm trying to make my entire header row colored with \rowfont but when I do the top ruler is is to far above the contents of the row. I've narrowed the problem down to \color like in the MWE below, ...
2
votes
3answers
805 views

How can I to do this?, but with lines join

I used Excel2Latex % Table generated by Excel2LaTeX from sheet 'Sheet1' \begin{table}[htbp] \centering \caption{Add caption} \begin{tabular}{|r|r|r|r|r|} \cmidrule{1-1} \rowcolor[rgb]{1,1,...
6
votes
4answers
657 views

How to get rid of vertical white lines in a table?

When coloring rows of my table with a dark color, I get these white vertical lines where borders would normally be. How can I get rid of them? \documentclass[11pt, a4paper]{scrbook} \usepackage[left=...
1
vote
0answers
46 views

\rowcolor and nested loops with datatool package

I can't explain why using \rowcolor into a nested datatool loop gives this strange behavior: The code: \documentclass{article} \usepackage[table]{xcolor} \usepackage{datatool} \begin{filecontents*...
0
votes
1answer
65 views

Incomplete row table colors

Quick question regarding colouring rows in a latex table: I simply want to colour the first row in the following table light gray as in the image. Unfortunately the colour does not seem to fill the ...
2
votes
2answers
106 views

How do I avoid and entry being shifted when using \multirow and \rowcolor at the same time?

I have been looking around for and answer a while now and figured out how to make the entry in the \multirowvisible. But now the entry is being shifted for some reason. Can you please help me? Down ...
1
vote
1answer
203 views

In newenvironment, rowcolor fails with “\rowcolor -> \noalign”

I have tried (and researched) many ways in getting this to work correctly, but have ultimately failed. I am attempting to have different commands call new rows with each command giving a different ...
2
votes
1answer
144 views

>{\kern-\tabcolsep} does not work in p-columns

If you colourise a row in a table, @{} does not remove the colour from the side bearings, as demonstrated in below figure. To remove the colour, you may direct a kern into the table column using >{...
0
votes
0answers
472 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{...
2
votes
2answers
108 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
62 views

Specific-length vertical padding in table (with text wrapping, alternating row colors, and specified widths)

I'm trying to create fixed-width (i.e. spanning the whole \textwidth) tables, with alternating row colors and arbitrary alignments (horizontal and vertical), that have evenly-spaced specific-length (i....
3
votes
4answers
392 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
305 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 ...
4
votes
2answers
533 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
1answer
56 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{...
1
vote
2answers
91 views

Multicolumn cells with text wrapping and rowcolour with tabular

What seems to be so simple has turned so fiddly. All I want to do is have a basic table 3 rows by 10 columns. Row one should be highlighted lightgray and row 3 a lighter gray (defined as ...
0
votes
1answer
270 views

Color rows with \rowcolor and datatool \DTLforeach loop

I try to obtain alternate colored rows (just like the table is shown in the figure) using the datatool package and the \rowcolor command. I am following the datatool user manual example for striped ...
1
vote
2answers
114 views

How to treat with dcolumn tabular format and colored values?

I found here this trick for formated text coloring for use with dcolumn package. However, it seems roughly redefine the \DC@endright statement and gives two wrong behaviours with values which have ...
2
votes
3answers
995 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
vote
1answer
270 views

Coloring a table row: color goes outside of table?

I just finished up my table, but noticed that the coloring goes a bit too much "outside" of the table, to the left? Is there any fix for this? \begin{table}[] \centering \begin{tabular}{@{}llllll@{}} ...