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

learn more… | top users | synonyms (1)

13
votes
3answers
13k views

How to draw a colored framebox without filling the background?

I like to draw a \fbox{..} which is colored. The xcolor package gives \fcolorbox{<frame color>}{<background color>}{<text>} But this forces me to set a background color. I like ...
13
votes
3answers
4k views

How to colour multiple paragraphs?

I have a set of commands in my document's preamble that look like this: \newcommand{\nathaniel}[1]{\textcolor{blue}{[#1]}} \newcommand{\anotherAuthor}[1]{\textcolor{darkgreen}{[#1]}} They are to ...
13
votes
1answer
185 views

Spotcolor bleeds into the surrounding

This question led to a new package: xspotcolor I have a problem using spotcolor package. When using the package for redefining headers, titles, \emph etc. the color bleeds into the ...
13
votes
1answer
2k views

Background color gradient for entire document

Is anyone aware if it's possible to change an entire document's background to a fading color? In other words, can you take silver and slowly fade it to white from left to right and have this same ...
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 ...
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 & ...
13
votes
1answer
3k views

How to get a colored box as the header?

I want to produce this particular template in LaTeX. With no page numbering, and rectangles in colours in a a4paper.
13
votes
1answer
1k 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
338 views

\everymath and author color

Consider the following example: \documentclass[11pt]{paper} \usepackage[usenames]{color} \definecolor{foo}{rgb}{0.75,0.0,0.0} \everymath{\color{foo}} \title{something} \author{someone} ...
13
votes
1answer
2k views

Changing color of already printed text

For making a small quiz in class I am working on a presentation in beamer. I want to change the color of statements to red (wrong statement) or green (right statement) but only after my class ...
13
votes
1answer
8k views

How to change white background of an included PDF to transparent

I have an external 100 pages PDF document (not created by pdflatex) that I \includegraphics page-wise into a beamer presentation. The external PDF document employs white as page color, but I need the ...
13
votes
1answer
596 views

duotone PDF files with lualatex

How to provide duotone PDF files for publishers who require it? I have a document with images (graphicx \includegraphics), TikZ diagrams, compiled with lualatex. So, if I understand it right, there ...
13
votes
1answer
1k views

Problem with multicolumn color tables

edition might be grateful since i don´t know how to name this problem. English is not my native idioms. Also I don't know how to interpret this problem as well on so apologies in advance. I am ...
13
votes
1answer
628 views

How can I have text colored on screen and black on printing?

I have a document with colored hyperlinks, using the options of the hyperref package. I also have lots of tikz-figures that use various shades of gray and occasionally some colors. The way my ...
12
votes
2answers
449 views

Print zeroes in a sparse matrix in a lighter color

For a report I need to print some sparse matrices as full matrices, so that means that there are a lot of zeroes. If I print them in the same color as the meaningful entries, it doesn't look very ...
12
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 ...
12
votes
4answers
499 views

Colored box around sentences

I want to have a colored box around the text/sentences and its width will be fixed to be 80% of the page width. I tried \fcolorbox but it can't break lines. It is possible to do it with TikZ or is ...
12
votes
2answers
974 views

how to create PDF in grayscale mode or TikZ figure only?

how to create PDF in grayscale mode? convert PDF color in PDF grayscale. I need the PDF in grayscale color. Or in TikZ figure only.
12
votes
3answers
12k views

Change border color of \fbox [duplicate]

Possible Duplicate: Is there an \arrayrulecolor-like command to change the rule color of \fbox? I'm using an \fbox to have a border around a minipage. \fbox{ ...
12
votes
2answers
1k views

Coloring lines in an algorithm

I am using Beamer for creating a presentation and I am trying to highlight some lines in an algorithm. I am actually using algcompatible. I found a solution here and created a couple of new commands ...
12
votes
2answers
7k views

How to color the font of a single row in a table?

I have a table and I want to make the font color red for just one row (not the background). How do I do that? Here's my table: \begin{tabular}{ l | l l l l } & 1 & 2 & 3 & 4 ...
12
votes
2answers
384 views

How to improve color consistency of bitmap pictures from native format to target pdf file?

For the first time I am concerned about proper rendition of pictures for the draft of a document with artistic content. I use the basic macro below to embed the pictures. The pictures are in .jpg ...
12
votes
2answers
3k views

Conflict between color, graphicx and libertine

Compiling the following with pdflatex (TeXLive 2009/Debian on Ubuntu 10.04 "Lucid Lynx") \documentclass{article} \usepackage{ifpdf} \ifpdf \usepackage[T1]{fontenc} \usepackage{libertine} % ...
12
votes
3answers
9k views

How to specify transparent colors?

What options are there to specify transparent colors, say the background in the example below? I thought xcolor would be able to do this but I can not find any reference to "alpha" or "transparency" ...
12
votes
2answers
111 views

Color leak from multicols within a figure

The text at the bottom of page 2 is red, despite the fact that the color change in the code below originates from \color{red}\normalcolor within the multicols within the figure and should naively ...
12
votes
2answers
2k views

Optimising TikZ pictures for greyscale printing

I often use colours in my TikZ pictures. Are there simple ways to make versions of these that will come out looking good if I print them on a B&W printer? For example, say I have some filled ...
12
votes
2answers
1k views

Tables with colored cells and dashed lines

I would like to draw a table with some colored cells and dashed horizontal lines. Here is my first attempt using the colortbl package and the arydshln package: \documentclass[12pt]{article} ...
12
votes
1answer
4k views

Changing color in beamer header (Singapore)

I am not a TeX-pert and I basically spent half the day trying to figure out the following change to the Singapore theme of beamer. What I want is to give every sub part (section) a different color ...
12
votes
2answers
162 views

Is there a way to typeout to the console using ANSI colors?

I'm trying to colorize diagnostic outputs to the console in order to make my stuff more visible in the endless stream of messages that LaTeX spits out. Example However, all of my efforts like, for ...
12
votes
1answer
366 views

Highlighting chunks of text spiral

I use the code provided in this question to draw a text spiral and now I want to highlight each chunk separated with a comma in a different color. Is there a way to achieve that? ...
12
votes
1answer
370 views

Tikz patterns and cmyk color model

Consider the following example. \documentclass{standalone} \usepackage[cmyk]{xcolor} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \tracingall \draw [pattern = ...
11
votes
4answers
611 views

No text=none in TikZ?

In TikZ, there are draw=none and fill=none options to turn off stroking and filling operations. However, there doesn't appear to be a corresponding text=none option. If I try \tikz \node[text=none] ...
11
votes
4answers
467 views

How to construct a logic argument with colored hline with length under control?

How to construct a logic argument like this one? I can construct it like this: Latex of my argument: \documentclass[10pt]{article} \usepackage{newtxtext} \usepackage{newtxmath} ...
11
votes
2answers
2k views

Color merged and regular cells in a table individually

In a LaTeX table with merged cells, how can I color each cell with a different color? %% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know ...
11
votes
2answers
255 views

How to color delimiters

I have some special delimiters that I want to add to a glossary, those get hyperlinks and colors etc. However when i want to use those delimiters, using \left, \right and \middle becomes impossible. I ...
11
votes
2answers
1k views

Different colorcoded theorems

I'm using this code to frame my theorems: \documentclass[a4paper,12pt]{scrreprt} \usepackage[table]{xcolor} \usepackage{latexsym} \usepackage{amsmath} \usepackage[amsmath,thmmarks,framed]{ntheorem} ...
11
votes
3answers
188 views

Distinguish math symbols in the language and the meta-language

I'm writing some notes on logic and formal languages, and I would like to provide some visual cues to distinguish symbols in the formal language (e.g. predicate and logic symbols), from symbols in the ...
11
votes
1answer
451 views

What is the difference between \textcolor and \color?

I would like to define a new command to work as an alert command. If I want to alert some part of my text I would simply write \alert{}. But I want the result in red color. What is the best way to ...
11
votes
2answers
3k views

Use xcolor for colored tables in a beamer slide

How can I use a table with alternately colored rows like this in a beamer slide? There seems to be a conflict with beamer and xcolor. I am using LyX too, bonus marks for something that works well in ...
11
votes
2answers
8k views

Changing color of default enumeration

To my surprise, I've had trouble finding red themes, and used the beamer theme matrix to find CambridgeUS. I've changed the itemized bullets to match, but I can't seem to make the enumerations red. ...
11
votes
2answers
7k 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 ...
11
votes
1answer
201 views

Is color undefined

I want to check whether a color has been previously defined, consider the below code which doesn't execute. \documentclass{article} \usepackage{xcolor} ...
11
votes
1answer
1k views

how to change the color of the rule (vertical line) in twocolumn document?

I'd like to make the rule between the 2 columns very thin. I found that no matter how small of width I made it, the line was not thin enough for my liking (unless I make it zero, then it will ...
11
votes
2answers
6k views

Getting the color from a beamer theme?

How do I find out what color a beamer theme uses? In particular, what is the color that the Singapore theme uses? I'd like to grab this color so that I can color my tables with it and remain ...
11
votes
1answer
433 views

Using listings: “zebra effects” AND line numbers

I just made a code listing with a "zebra effect", just like here: Creating a zebra effect using listings But afterwards, the line numbers at the left side of the listing don't appear any more. This ...
11
votes
1answer
375 views

Changed all math text to red in beamer, now I can't make some math text black

When I try to make the checkmark black using the following code, it doesn't work; the checkmark shows up red. How do I make it black? \documentclass{beamer} \usepackage{amsmath, amsthm, amssymb, ...
11
votes
1answer
744 views

Error when using colour in \author

I am getting an error when I try to use \color{} in the the author field with beamer, even though the file compiles and I get the the words I want coloured in the author field. This is the error ...
11
votes
1answer
179 views

Extra space added after equation when it is coloured

For some reason space is added after my equation when I colour it. This does not happen if the colour is added to text. Is there a simple way to prevent this from happening, like a global setting (I ...
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 ...
11
votes
2answers
4k views

Multiple colour themes in one beamer presentation

I'm preparing a single seminar talk on three more-or-less unrelated results. In order to visually separate these results, I wanted to give each one a different (custom) colour theme for the ...