# LaTeX, Can't color text

To be honest i don't know what the problem is, i just can't seem to get any of my text colored.

I made an example file to show you some demonstation of the problem:

     \documentclass[a4paper,11pt,dvips]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{color}
\usepackage{xcolor}

\begin{document}

\emph{some black text, {\color{red}followed
by a red fragment}, going black again.}
\begin{itemize}
\color{blue}
\item Firts item
\item Second item
\end{itemize}

\noindent
{\color{red}}
\textcolor{red}{easily}
\end{document}


This gives the following output:

            some black text, followed by a red fragment, going black again.
Firts item
Second item
easily


As you can see, nothing has changed. Im running it with Quick Build in TexMaker(Have no ide if that makes a difference). And im not getting any errors.

Any help or advice would be much appreciated.

• Welcome to TeX.SE. I think the \documentclass option dvips is the culprit. Also you don't need the color package as you are including the xcolor package. – Peter Grill Sep 26 '14 at 18:19
• @PeterGrill Didn't even notice that. Thanks! – Simen1991 Sep 26 '14 at 18:23

It's dvipsnames

\documentclass[a4paper,11pt,dvipsnames]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{color}
\usepackage{xcolor}

\begin{document}

\emph{some black text, {\color{red}followed
by a red fragment}, going black again.}
\begin{itemize}
\color{blue}
\item Firts item
\item Second item
\end{itemize}

\noindent
{\color{red}}
\textcolor{red}{easily}
\end{document}


• colors red and blue are basic colors and do not need the option dvipsnames – user2478 Sep 26 '14 at 18:21
• @herbert I know, I assumed red was only for the MWE while the OP is actually using a color which needs dvipsnames but spelled it wrongly. I know it's a lot to assume but, you know, it's free :) – Nico Boni Sep 26 '14 at 18:22
• @dcmst Thank's! Didn't even notice having it there. To much copy-paste.. Will mark it as a correct answer when i get the chance. – Simen1991 Sep 26 '14 at 18:25
• for an unknown color you'll get an error. – user2478 Sep 26 '14 at 18:25
• @Herbert I actually read that part of the question only now :o) – Nico Boni Sep 26 '14 at 18:31

Your QuickBuild uses pdflatex for the compilation of the text. But the option dvips means that you are using latex->dvips->ps2pdf. It is the wrong driver for pdflatex. Simply delete that option and everything will be fine.

If you can use pdflatex, the following simple modification does the work.

%\documentclass[a4paper,11pt,dvips]{article}
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{color}
\usepackage{xcolor}

\begin{document}

\emph{some black text, {\color{red}followed
by a red fragment}, going black again.}
\begin{itemize}
\color{blue}
\item Firts item
\item Second item
\end{itemize}

\noindent
{\color{red}}
\textcolor{red}{easily}
\end{document}
`