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.

In the following list, the colour of the bullet will be fixed:

\begin{itemize}
\item Good point 1
\item Good point 2
\item Poor statement 1 
\item Poor Statement 2
\end{itemize}

Is there anyway to modify the above environment to have different colours for the bullets depending on the entry? Something like

Green Bullet Good point 1
Green Bullet Good point 2
Red Bullet Poor statement 1
Red Bullet Poor statement 2
share|improve this question
    
Doing this in a printed document seems a bad idea to me but it could be useful for a computer presentation. Can you say a bit more about the context, provide a MWE, ...? –  Marc van Dongen Mar 7 '13 at 12:54
1  
One way to do this in beamer: beamer: change individual bullet color for pros and cons list. –  Alan Munn Mar 7 '13 at 13:02
    
I am looking at the performance of a client at a given standard, which consists of sub standards. Obviously the performance may be satisfactory or poor for different sub standards. I would like to change the colour of the bullet depending on what the performance is. –  Reza Mar 7 '13 at 13:04
    
Alan I am using report document class. –  Reza Mar 7 '13 at 13:05
add comment

2 Answers 2

up vote 7 down vote accepted

You can do this with the enumitem package quite easily:

\documentclass{article}
\usepackage{enumitem}
\usepackage{xcolor}
\newif\ifgooditem
\gooditemtrue
\newcommand\gooditem{\gooditemtrue\item}
\newcommand\baditem{\gooditemfalse\item}
\begin{document}
\begin{itemize}[label={\ifgooditem\color{green}\else\color{red}\fi\textbullet}]
\gooditem A good item
\baditem A bad item
\end{itemize}
\end{document}

enter image description here

share|improve this answer
add comment

with latex beamer, you can use this MWE

\documentclass[ignorenonframetext]{beamer}
\usepackage{graphicx}
\newcommand{\gooditem}[1]{\setbeamercolor{item}{fg=green}\item #1} 
\newcommand{\pooritem}[1]{\setbeamercolor{item}{fg=red}\item #1} 
\begin{document}
\begin{frame}
  \begin{itemize}
    \gooditem good
    \pooritem bad
  \end{itemize}
\end{frame}
\end{document}
share|improve this answer
1  
Thanks Micha. As I mentioned earlier I am using report document class. –  Reza Mar 7 '13 at 13:07
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.