Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to obtain coloured numbering in an enumerate list?

\begin{enumerate}
\item First
\item Second
\item Third
\end{enumerate}

I'd like the 1, 2, 3 to be in blue. I thought this should be simple, but could find nothing on this. I also tried with

\usepackage{enumitem}

and

\begin{enumerate}[label={\color{blue}}]

but this simply generated a list with no numbering.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted
\documentclass{article}
\usepackage{enumitem,xcolor}
\begin{document}

\begin{enumerate}[label=\color{blue}\theenumi]
 %  \begin{enumerate}[\color{blue} 1]% Alternative
\item First
\item Second
\item Third
\end{enumerate}

\end{document}
share|improve this answer
    
Thanks. This works fine – my problem was I was not including `xcolor'. –  scitexter Sep 10 '11 at 19:36
    
@Herbert: I belive that the alternative commented out requires the \usepackage [shortlabels]{enumitem}. –  Peter Grill Sep 10 '11 at 20:08
add comment

Here are two ways:

\documentclass{article}
\usepackage{xcolor}
\usepackage[inline,shortlabels]{enumitem}
\begin{document}
\begin{enumerate}[\begingroup\color{blue} 1)\endgroup]
     \item First
     \item Second
     \item Third
\end{enumerate}
\begin{enumerate}[label=\textcolor{blue}{\arabic*}]
    \item  number one item
    \item  number two item
    \item  number three item
 \end{enumerate}
 \end{document}

This question Change the color of numberings in inline itemization is also helpful, even though it refers to an inline list.

share|improve this answer
    
– this only worked for me if I dropped the `inline' element. –  scitexter Sep 10 '11 at 19:35
    
The [inline] package option only provides additional * environments that are inline lists. The above example only used the non-star elements so there should not be anything different. –  Peter Grill Sep 10 '11 at 20:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.