34 votes

What is the name of the color used in CambridgeUS?

From CTAN you can find the source of CambridgeUS beamer theme, where there is: \usecolortheme{beaver} In the same site of the source you can find the beamer color theme beaver, where there is: \...
CarLaTeX's user avatar
  • 63.2k
14 votes
Accepted

Approximate excel spreadsheet

NB! Do not use tabu. It is an outdated and depreciated package. Using cals Here is a possible solution using cals. In this second version, I have updated the code with lighter rules (0.4pt). The ...
Sveinung's user avatar
  • 20.4k
13 votes
Accepted

Tabu very recently stopped working with color/xcolor or with fancyvrb

UPDATE 2019-01-14 An equivalent patch has been applied in tabu 2.9 which has been submitted to ctan. This is due to fixing a color leak in p-columns in array which is used underneath tabu, longtable ...
Frank Mittelbach's user avatar
10 votes
Accepted

Use siunitx to round numbers while using colortbl to color cells

You need to 'hide' the cell colour part from siunitx: & {\cellcolor{yellow!50}} -.0399377* & (The package can pick up simple \color commands but not at present \cellcolor ones.)
Joseph Wright's user avatar
  • 260k
9 votes
Accepted

Does something like \rowcolors exist for groups of rows?

I have taken a look at the code for \rowcolors and adapted it to allow groups greater one. The new command \groupedRowColors takes four mandatory and one optional argument: The first mandatory ...
jakun's user avatar
  • 5,991
9 votes
Accepted

colortbl changes array behaviour

the colortbl doc does warn against using infinite stretch in colortbl, so you need to squash it more strongly: \documentclass{article} %all the %% are needed... \newcommand{\deriv}[2] {%% %\...
David Carlisle's user avatar
8 votes

Matrix change row or column background

Within {pNiceMatrix} of nicematrix, you have a command \Block which may be used for highlighting a part of the matrix. \documentclass{article} \usepackage{nicematrix} \begin{document} $\begin{...
F. Pantigny's user avatar
  • 40.7k
8 votes

Layout of complex table

\documentclass{article} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage[table]{xcolor} \definecolor{ColHead}{gray}{0.6} \definecolor{ColDiag}{gray}{0.7} \definecolor{ColBelow}{gray}{0.9} \...
Zarko's user avatar
  • 297k
8 votes
Accepted

Horizontal tabular borders and `\arrayrulecolor` in beamer

See this nice answer for a solution. The problem is that beamer redefines the macro \reset@color which is used to change the color for rules when using hhline together with colortbl. It is redefined, ...
Jasper Habicht's user avatar
7 votes

LaTeX doesn't recognize \columncolor from the colortbl package when when it's in a command

As the error message correctly shows, \columncolor is not defined by the colortbl package. It is just used as a placeholder in a modified array preamble parser so that the colour specification can be ...
David Carlisle's user avatar
7 votes
Accepted

Convert DVI into PDF properly

There are two separate issues with tabular rules and colortbl colored backgrounds. \cline doesn't work. This is explicitly documented in the colortbl manual. \cline is implemented such that it takes ...
David Carlisle's user avatar
7 votes

Layout of complex table

Here is a tikz solution (that is most likely still in need of some improvement): \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit,matrix} \usepackage{amsmath} \usepackage{multirow} \...
leandriis's user avatar
  • 62.6k
7 votes
Accepted

Why does the "\left [" partially disappear when I color a row in a table? But [ does not disappear

matrix has a negative space which is causing the background to over-print, but you don't really want to redraw the background on nested tables anyway, so this disables it \documentclass{article} \...
David Carlisle's user avatar
6 votes

Cellcolor overwrites partial horizontal lines (\cline)

It’s easy peasy with tblr environment of the new LaTeX3 package tabularray: multirow, cline and cellcolor work well together as expected. You can even replace \cline{2}'s with \hlines in the following ...
L.J.R.'s user avatar
  • 11k
6 votes
Accepted

Why does \rowcolors cut matrix delimiter?

Here's what happens: bmatrix typesets the left delimiter, then the body of the matrix, with a backspace in between; now, the body is an array, so it inherits the current background color which each ...
egreg's user avatar
  • 1.1m
6 votes
Accepted

Table style customization

Is this what you want? To get rid of the white space around the rules, you have to reset the value of both \aboverulesep and \belowrulesep to zero. The default values are \belowrulesep=.65ex and \...
AboAmmar's user avatar
  • 46.4k
6 votes

What is the name of the color used in CambridgeUS?

You can determine a color in a tex document (or, for that matter, a pdf or any kind of document) more generally, and use it in your own document by doing the following: Have a "color picker" On a ...
Clément's user avatar
  • 5,601
6 votes

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

For this to look right we have to make sure the \cline doesn't get overprinted by the following cell's or row's colour. To achieve this we have to call \noalign{\vskip\arrayrulewidth} after the \cline....
Skillmon's user avatar
  • 60.7k
5 votes

Matrix change row or column background

I wanted to answer this post: how to obtain vertical and horizontal gray bars in a matrix? but it was closed as a duplicate of the one I'm answering now. However, since here there's no a solution ...
CarLaTeX's user avatar
  • 63.2k
5 votes
Accepted

How to change the color background of a single cell in the last row

You can add the formatting to the column description via: postproc cell content/.append code={\ifnum\numexpr\pgfplotstablerow+1=\pgfplotstablerows % \pgfkeys{/pgfplots/table/@cell content/.add={\...
Andrew Swann's user avatar
  • 95.9k
5 votes
Accepted

How is it possible to provide a shining color?

How about using \shade instead of \filldraw? TikZ has a shadings library to make rflection like effects. It's not perfect as @cfr mentioned in the comments: there's a tool for everything. Several ...
Guilherme Zanotelli's user avatar
5 votes
Accepted

Rows after multicolumn rows appear wider in longtable, how can I solve it?

The cause of your problem is feature of colortbl package, see explanation in section 1 and 2 in the package documentation. The simplest solution is not to use @{} in definition of longtable columns:...
Zarko's user avatar
  • 297k
5 votes

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

This is something where ConTeXt really shines. Observe how the actual table content contains zero visual markup \setupTABLE [row][first] [background=color, backgroundcolor=darkgreen, color=...
Henri Menke's user avatar
5 votes

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

I propose to define new column types, L , C, R, which incorporate the font and text colour changes only if we're in first row, since the [table] option of xcolor defines a \rownum counter: \...
Bernard's user avatar
  • 272k
5 votes

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

How about this layout, with hhline? \documentclass{article} \usepackage{multirow} \usepackage[table, svgnames]{xcolor} \definecolor{mycolor}{rgb}{1,0.5,0} \usepackage{hhline} \begin{document} { \...
Bernard's user avatar
  • 272k
5 votes
Accepted

Problem with highlighting a row in a table

The text only looks relatively high in the coloured panel as you have tall characters like C and d and the digits and no characters with descenders other than a small part of the () However you can ...
David Carlisle's user avatar
5 votes
Accepted

{NiceTabular} word wrap issue

With two custom column types you can allow automatic linebreaks inside of the table cell. I have also altered the column width calculation in order to make sure the table fits into the textwidth: \...
leandriis's user avatar
  • 62.6k

Only top scored, non community-wiki answers of a minimum length are eligible