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

learn more… | top users | synonyms (1)

14
votes
2answers
415 views

Getting verbatim with soft grey background, as in tex.stackexchange

Given a verbatim as on below, \begin{verbatim} This is an awesome verbatim \end{verbatim} which is displayed with no background on the compiled pdf page : This is an awesome verbatim I would ...
14
votes
1answer
525 views

Color gradient filling along a path

I want to make the gradient color to follow the pipe curve below rather than to span from the left to the right. The following MWE shows the default behavior which is not what I'm looking for. ...
13
votes
2answers
802 views

How to create Multilevel Colored Boxes using tcolorbox/any other package?

tcolorbox Manual provides the following example: Can anybody please suggest me how to create exactly this type of box - The no. of rows to add must be flexible(It seems that tcolorbox has no option ...
13
votes
5answers
481 views

LaTeX Tables: Cell value color based on its sign / conditional cell color

I've a long LaTeX document with many tables. Now I want to show negative values in cell in red color. I wonder how to do globally. My MWE is below: \documentclass{article} \begin{document} ...
13
votes
2answers
1k views

coloring entire row of tabular*

I would like to have the first row of all my tables colored with a certain color (below yellow) but somehow below thing is not working as expected This: \documentclass[a4paper, 12pt]{report} ...
13
votes
3answers
14k 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
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. ...
13
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 ...
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
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
3answers
10k 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" ...
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
2k 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
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
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} ...
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
611 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
2k 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
669 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
482 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
4k 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
515 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
3answers
13k 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

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
2answers
8k 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
433 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
2answers
7k 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 ...
12
votes
2answers
116 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
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
1answer
162 views

Going through permutations of nouns and verbs

My daughter is learning to read; I am learning TeX. So I need your help on this: I have an array/a list of nouns (basically names of people and two mythical creatures called Fara and Fu: noun = ...
12
votes
1answer
196 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 ...
12
votes
2answers
167 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
379 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
400 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
654 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
532 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
273 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
198 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
477 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
740 views

How to highlight all words of the form [0-9][A-Za-z0-9]* immediately following an equal sign?

I am using the Latex Listings package to include code in a document. I need to implemented syntax highlighting similar to what you see in a standard IDE. I've been able to assign colors to comments, ...
11
votes
2answers
4k 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

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
1k views

pgfplots line colors

Is it possible to make pgfplots use a predefined color map while plotting multiple lines, I currently have 9 samples that I want to plot, but don't want to type different colors for each one. Right ...
11
votes
1answer
220 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 ...