[Tex/LaTex] newenvironment enumerate

#enumerateenumitemlists

I'd like to get a list with the label $\mathscr{G}_1$, where G_1 is the first item in the list.

If I use

\newenvironment{enumeratescr}{\begin{enumerate}
                    [labelindent=\parindent, leftmargin=*,
                    label=$\mathscr{G}_1:$, noitemsep]}
                    {\end{enumerate}}

then all the items in the list start with G_1. How do I fix this?

Best Answer

\usepackage{enumitem}
\newenvironment{enumeratescr}
  {\begin{enumerate}[labelindent=\parindent,
                     leftmargin=*,
                     label=$\mathscr{G}_{\arabic*}$:,
                     noitemsep
                    ]}
  {\end{enumerate}}

The current item number can be accessed with \arabic* (or other number representation commands).

The colon should go outside the formula, as it's not part of it. Take the habit of writing \mathcal{X} or \mathbf{A} and not \mathcal X.

(And, please, don't use non standard commands in a code snippet unless you provide also their definition or the packages necessary for them: nobody can know what \mathscr is supposed to do, as it's not a standard command.)