4

Say I want all of the text on the second line "(a) Cat" to be in red (including the numbering and parentheses "(a)"). Everything else remains black. How do I do this?

enter image description here

\documentclass{article}
\begin{document}
\begin{enumerate}
\item One
\begin{enumerate}
\item Cat
\item Dog
\end{enumerate}
\item Two
\begin{enumerate}
\item Rat
\item Fox
\end{enumerate}
\end{enumerate}

\end{document}
7
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\begin{enumerate}
\item One
\begin{enumerate}\begingroup \color{red}
\item Cat\endgroup
\item Dog
\end{enumerate}
\item Two
\begin{enumerate}
\item Rat
\item Fox
\end{enumerate}
\end{enumerate}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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