{color} is about using color in (La)TeX documents. Popular packages are color and xcolor.

learn more… | top users | synonyms (1)

205
votes
7answers
47k views

Remove ugly borders around clickable cross-references and hyperlinks

I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?
16
votes
3answers
5k views

\includegraphics PDF, color problem

I'm using pdflatex, and use \includegraphics to include content of figures from PDF. PDF are exported from InkScape. \begin{figure} [!h] \centering \includegraphics[height=3cm]{fig/SUSAN.pdf} ...
74
votes
1answer
5k views

PDF colour model and LaTeX

(Strictly speaking, this is a question about XeLaTeX and the xcolor package but I’m assuming that the issue is actually with the color model of PDF.) I’m having the problem that colours in my PDF ...
28
votes
2answers
10k views

How can I have colored and underlined links with hyperref?

I would like the internal hyperlinks generated by hyperref to be colored and underlined. Reading some of the package documentation, I know that these \hypersetup keys exist: colorlinks: when ...
26
votes
3answers
2k views

Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. 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 ...
38
votes
4answers
4k views

Does anybody know a good source of (free) ornaments, decorations, frames, backgrounds etc.?

I'd like to prepare a "fancy" typographical project, more interesting visually than a "boring" black-on-white text. I'm not very talented at drawing, though, so I'd like to ask about a place to find ...
12
votes
1answer
790 views

pdftooltip from pdfcomment package: Using LaTeX code in tooltip

I work as a Physics teacher and I am writing a "Problem-Solution-Book" with hyperlinks from problems to solutions and backreferencing -- all of it works pretty good. Now I wanted to introduce ...
13
votes
1answer
1k views

Listings package: How can I format all numbers?

I want to highlight all the numbers appearing in an input code of a certain program by, for example, coloring them. By numbers I mean integer, rational and floating point numbers. I am trying with the ...
47
votes
3answers
10k views

Block quote with big quotation marks

How can I create a block quote enviroment with big quotation marks similar to the Cquote Template of Wikipedia? Additionally it would be nice to place both quotation marks and quote in a colored box ...
27
votes
7answers
1k views

How to replace a large block of text by an empty block of the same size?

I know there exists the \phantom command, but does it work on large blocks of text (containing several paragraphs or even several pages)? What I want is to have some commands, call them \hide and ...
14
votes
3answers
1k views

Can I change the font and colour of a letter permanently?

For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, e ...
9
votes
1answer
1k views

How can I change the color of digits when using the listings package?

I'm using the listings package and was already able to modify the color of the keywords and almost all elements I was interested in. The only thing that remains is the color of the digits. I'd like to ...
11
votes
4answers
3k views

Inkscape → PDF → includegraphics → XeLaTeX → changed colors

I have an SVG file, which I have made/edited with Inkscape. I want to include this image in my thesis. The svg file is here: http://brussense.be/temp/theSVG.svg (because Inkscape uses a non-standard ...
6
votes
1answer
2k views

Rounded corner colored box around figure

I'm trying to get Rounded corner grey-colored box around figures. One solution would be to use \usepackage{float} \floatstyle{boxed} \restylefloat{figure} but this results in black box around a ...
4
votes
1answer
423 views

Adobe Reader and xcolor within a table breaks the line render

I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't ...
41
votes
1answer
2k views

Creating a zebra effect using listings

This question led to a new package: lstlinebgrd (lstaddons bundle) Friends, consider the following example using the listings package: \documentclass{article} \usepackage[T1]{fontenc} ...
13
votes
1answer
1k views

Colored symbols

First of all, I apologize if this is a repetitive question. I searched, but couldn't find it. I was wondering if I can change the color of symbols in latex. For example \ast always give me a black ...
14
votes
3answers
2k views

How to draw text-anchored tikz line below text instead of above?

I wish to mark several pairs of from/to anchor locations in text, and use tikz to draw lines between these. The anchors are not in absolute page locations; the text determines where the endpoints of ...
15
votes
2answers
2k views

Colored background in inline listings

I would like to make inline code more distinguishable from the text surrounding it, and I thought that using a background might work (like it is done on the stackexchange pages.) Since I use the ...
6
votes
2answers
327 views

Is it possible to change text color for all headings?

I want to change only the color (not font size, etc.) of all headings in my documents (\section, \subsection, \subsubsection, ...). I want to keep all other settings fixed. Is there a way to do ...
24
votes
2answers
1k views

Gradient color in one cell of a table

I'm trying to create a tabular and I'm facing the following small issue. I would like to make the background of one cell a gradient color. Is it easy to do that in LaTeX? And if so, how to do it?
28
votes
3answers
8k views

How to highlight an entire paragraph?

I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far. For ...
20
votes
2answers
931 views

How can I put a coloured outline around fraction lines?

I use the contour package to put thick white outlines around labels in graphs, so they remain readable above the grid lines without taking up too much space. Unfortunately, the package is not able to ...
16
votes
3answers
4k views

How to change the background color only for the current page?

How can I change the background color only for the current page? I found that I can change the color with \pagecolor{color} but that unfortunately changes the color for all pages after this command. ...
12
votes
2answers
898 views

How do I get different colors for math and for text?

I want to include something in my LaTeX article that will make all mathematical formulae appear in black, while all text (including everything inside \text{}s in the middle of mathematical formulae) ...
17
votes
2answers
15k views

Change the background color of a frame in Beamer

How can I change the background color of one frame in my Beamer document? I tried doing \begin{frame} \setbeamercolor{background canvas}{bg=violet} % frame contents here \end{frame} but it ...
27
votes
4answers
1k views

Coloring combining characters without changing color of a base character

Problem I am trying to find out is there a good way to paint combining characters without changing the color of the base character they are combined with. My actual problem case is to make some ...
15
votes
1answer
583 views

Tables: Colouring odd/even mixed up

I have a huge document (around 100 pages) and a lot of tables in it. I used \usepackage[table]{xcolor} \definecolor{lightblue}{rgb}{0.93,0.95,1.0} \rowcolors{1}{white}{lightblue} % odd = white, even ...
12
votes
1answer
4k views

Coloring columns in a table with colortbl and booktabs

I have created a rather complicated table with some columns that I want to color. For the table, I chose the booktabs and tabularx packages. For coloring the columns, I use colortbl. The problem that ...
8
votes
4answers
1k views

How can I set the background color of the rows and columns of a matrix node in Tikz?

I have a matrix where some cells have nodes while others don't, with rows and columns of varying size depending on the biggest nodes in them. In this matrix, I would like to have the background of ...
17
votes
1answer
924 views

Is it possible to use spot colors in TikZ graphics?

Using ConTeXt and Metapost, it is fairly easy to define spot colors and use them in an image: \starttext \definecolor[MyRed][c=0,m=1,y=1,k=0] \definespotcolor[RedSpot][MyRed][p=1,e=MyRed] ...
14
votes
2answers
1k views

Coloring digits with the listings package

I'm trying to typeset some python code, and I would like integer literals to be highlighted. I've come up, after about two hours of fighting with the documentation and various other questions here and ...
13
votes
4answers
3k views

Why can't I wrap \rowcolor in \only? (Beamer)

See the following minimal example: \documentclass[table]{beamer} \begin{document} \begin{frame}{Boo} \begin{table} \centering \small \begin{tabular}{rcc} \only<1>{\rowcolor{green}}Hey & ...
4
votes
2answers
238 views

Robust way to mark draft text?

When writing documents, I like to 'mark up' draft/partial text (e.g., short summaries of what will go in a section) so that I can clearly see what needs to be adjusted. I know that things like the ...
27
votes
1answer
20k views

How do I fill table cells with a background color?

I'd like to fill the cells of a table with a background color. How can this be done?
6
votes
3answers
5k views

Setting background colour for part of a page

I am designing a business card using the memoir class and hints given here and am trying out various background effects. Specifically, I would like to change the background for the last third of the ...
19
votes
5answers
863 views

typesetting different characters with different colors in a DNA sequence

I have created a macro which I used to format DNA sequences, as they should be in the monospaced font and uppercased: \newcommand{\DNA}[1]{\texttt{\uppercase{#1}}} Now I have a column with some ...
11
votes
2answers
6k views

Link formatting: colors, underlines in moderncv

Following the excellent advice in this site, I have started using moderncv for writing the new version of my CV. Unfortunately, after converting to PDF, my http links work (clicking on them leads to ...
18
votes
1answer
197 views

Why does a color meant for the first typeset line *only* (with package magaz) affect the *entire* document?

I am trying to make a nice layout that gives a different style to the first line in a section using the package magaz. All examples I have seen feature some variation of small caps {\scshape text} or ...
17
votes
2answers
4k views

Option clash with xcolor and TikZ

I want to draw some coloured circles, so I loaded tikz in my preamble. However, now xcolor is telling me that it has an "option clash". How should I fix this? \documentclass{article} ...
14
votes
2answers
4k views

How to highlight important parts (with a gray background)

In the below link http://www.math.uiowa.edu/~goodman/algebrabook.dir/bookmt.pdf the author highlights anything which is important using a greyish color background. For example, if you see ...
11
votes
1answer
2k views

\cancel draws under thing being canceled

I'm trying to use \cancel from the cancel package to strike out some colored text but it is apparent that the diagonal line is drawn first so it doesn't do a very good job of canceling. Minimal ...
10
votes
2answers
926 views

soul: broken highlighting with xcolor when using \selectcolormodel

I try to highlight text using the soul package. But I experience problems if I use it in combinations with the xcolor command selectcolormodel, only spaces are highlighted as shown in the MWE: ...
5
votes
1answer
337 views

Color changes cell height in tabular

The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}. \documentclass{article} ...
16
votes
2answers
992 views

How to get actual values of colour theme colours in beamer?

How would I go about finding the actual colour (like the RGB/HSV/etc) of a particular element in a given beamer colour theme (e.g., block title bg in orchid)? I would like to use these colours in ...
10
votes
1answer
335 views

Shaded Multicols

Does anyone know how to shade the background and put a border around a multicol environment, where page breaks are needed. There is a couple of posts around, most notably, multicols within colorbox, ...
10
votes
2answers
2k views

Color entire table

How do I get an entire table to get a background color. I dont mean the indivual cells but the entire table to get a gray shade. Something like this:
7
votes
1answer
1k views

Coloured math in beamer

I have a question: Is there any way to have math (everything between $s) in different colour than text (for example, green) in beamer?
4
votes
4answers
3k views

How do I globally set the text color in XeLaTeX

With pdfLaTeX I typically used the following code to globally set the text color for all text in the document: \documentclass{scrreprt} \usepackage{xcolor} \begin{document} \color{red} \section{A ...
6
votes
1answer
1k views

Fading a path in TikZ

I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like \draw[color=black!\x] plot coordinates{ coord1 ... coord100}; i.e. the shade of the ...