O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coloring your document

We could enhance our texts further by colors. We didn't deal with it yet, because most people use LaTeX for writing serious books and articles, or letters where too much color may harm the appearance. But why not try something fancy? For instance, diagrams and tables in presentations are often colorful.

We just need to load the color package:

\usepackage{color}

From now on, we have to use a command to set the text color:

  • \color{name} is a declaration that switches to the color name. Just try \color{blue}.
  • \textcolor{name}{text} is the corresponding command form, coloring just text. That's like {\color{name}}, not new for you.

The package offers the command \definecolor . Use this to mix your own colors. You may read it in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required