0

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

AndréC
  • 24,137
meteor
  • 1
  • 4
    Hi and welcome. Please, add the code for your first attempts. – AndréC Aug 06 '20 at 12:16
  • 2
    As others have mentions this is not a please do this for me service. We provide answers to concrete questions. You might want to have a look at tikz – daleif Aug 06 '20 at 12:27
  • 1
    The first three google results: https://tex.stackexchange.com/q/34088/82917, https://tex.stackexchange.com/q/66154/82917, https://tex.stackexchange.com/q/426973/82917 – campa Aug 06 '20 at 12:34
  • Thanks a lot. Sorry, I will keep what you say in mymind – meteor Aug 06 '20 at 12:49
  • I am not a native english speaker. I do not know how to express my problem in a better way. – meteor Aug 06 '20 at 12:51
  • \newtheorem{problem}{\large \textbf{\textcolor{blue}{Problem}}} This is my attempt. I use theorem to create a environment(?) But the outcome isn't what I want. – meteor Aug 06 '20 at 12:54
  • @meteor, maybe this is what you want: https://tex.stackexchange.com/q/325122/220875, have a look et the enumitem-package. There is a lot you can do with description lists. – phil-elkabat Aug 06 '20 at 13:31
  • @campa For my humble opinion it is a duplicate: https://tex.stackexchange.com/questions/127602/colored-box-around-enumerate-labels if we change in arabic numbers. – Sebastiano Aug 06 '20 at 14:10

1 Answers1

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

phil-elkabat
  • 2,055