0

How to write it? This problem bug me for a long time. Until now, I still don't know...
enter image description here

8

1 Answer 1

2

This might be a very first start with lots of room for improvement. At least now you can play with different settings for widths and colors.

Here's the code:

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

\renewcommand{\descriptionlabel}[1]{%
    \hspace{\labelsep}%
    \colorbox{yellow}{\textbf{#1}}%
    \par
}

\newlist{mydescription}{description}{1}

\setlist[mydescription]{
  topsep=2ex,
  partopsep=2ex,
  itemsep=1ex,
  font=\bfseries\color{blue},
  labelwidth=3em,
  labelsep*=2em,
  leftmargin =!,
}

\begin{document}

\begin{mydescription}
  \item[G1.] The first item
  \item[G2.] The second item

  A longish explanation every true mathematician would deem completely unnecessary …
  \item[G3.] The third item etc …
\end{mydescription}

\end{document}

Here's the output:

Colored Description Labels

You must log in to answer this question.

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