1

Is there any way to highlight (say put background yellow) on the label of itemized list such as (1. 2. 3 ... or A. B. C. ), not the item body itself, to make them stand out?

lockstep
  • 250,273
python152
  • 321
  • Please give us a small, compilable document we can use which demonstrates your set up. Right now, we don't know what class you are using, what kinds of itemised/enumerated lists you are using, how they are nested, etc. That makes any solution a guessing game which probably won't work with your set up anyway. – cfr Aug 13 '15 at 21:14

1 Answers1

4

You can define a command to color box containing the item label which can be applied to some item, here we use the enumitem package.

\documentclass{article}
\usepackage{xcolor}
\usepackage{enumitem}

\newcommand{\hilight}[1]{\setlength{\fboxsep}{1pt}\colorbox{yellow}{#1}}

\newcommand{\hlitem}{\stepcounter{enumi}\item[\hilight{\theenumi}]}

\begin{document}

\begin{enumerate}[label=\arabic*.]
\item   text
\hlitem text
\item   text
\end{enumerate}

\bigskip

\begin{enumerate}[label=\Alph*.]
\item   text
\hlitem text
\item   text
\end{enumerate}

\end{document}

enter image description here

Salim Bou
  • 17,021
  • 2
  • 31
  • 76