2

Is there a way to change the color of only one item in a list? For example:

\usepackage{xcolor}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}[label=\alph*)]
\item Answer a
\item Answer b
\item Answer c
\item Answer d
\end{enumerate}
\end{document}

I only want to change the color of the third item to indicate it is the correct answer. I have tried introducing [label=\color{red}\alph*)] but it changes all the items. Thank you

2
  • 1
    Do you wish to color just the text, e.g., "Answer b", or both the text and the associated (alpha-syle) number? Please advise.
    – Mico
    Commented Jul 9, 2020 at 15:32
  • 1
    Only the associated number, preferably not the text
    – user787670
    Commented Jul 9, 2020 at 15:34

1 Answer 1

2

How to change the color of an enumerate number in Beamer?

color an item in an enumerated list

enter image description here

\documentclass{article}

\usepackage{xcolor}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}[label=\alph*)]
\item Answer a
\item Answer b
{\color{red}\item Answer c}
\item Answer d
\end{enumerate}

\begin{enumerate}
    \item First item
    \item Second item
    \color{red}
    \item \normalcolor Third item
    \item Last item
\end{enumerate}
\end{document}
1
  • Thank you so much, it works perfectly!
    – user787670
    Commented Jul 9, 2020 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .