Problema com "\newlist" do pacote "enumitem"

Problema com "\newlist" do pacote "enumitem"

Não sei por que esse código gera umerro.

! Erro de enumitem do pacote: rótulo indefinido.

\documentclass{article}
\usepackage{enumitem}
\newlist{mylist}{enumerate}{1}
\begin{document}
\begin{mylist}
\item a
\end{mylist}
\end{document}

O que estou fazendo de errado?

Responder1

Como Bernard mencionou, se a lista for nova, você precisa definir pelo menos o rótulo porque, neste caso, você está criando uma nova lista do zero. Se você deseja apenas alterar os atributos das listas padrão, você pode especificar enumerate, por exemplo.

\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate,1]{leftmargin=0pt}%  if you just want to change some aspect of the default enumerate environment
\newlist{mylist}{enumerate}{1}%         if you want to create a new list from scratch
\setlist[mylist,1]{label=\roman*)}%     in that case, at least label must be specified using \setlist
\begin{document}
  This is some text. This is some more text. This is yet further text. This is also text. So, it seems, is this. The text continues on.
  \begin{enumerate}
    \item first level has zero left margin
    \begin{enumerate}
      \item second level is untouched
    \end{enumerate}
  \end{enumerate}
  This is an interlude consisting of some more text.
  \begin{mylist}
    \item a
  \end{mylist}
\end{document}

enumerações

informação relacionada