「enumitem」パッケージの「\newlist」に問題があります

「enumitem」パッケージの「\newlist」に問題があります

このコードがなぜエラー

! パッケージ enumitem エラー: ラベルが未定義です。

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

何が間違っているのでしょうか?

答え1

Bernard が述べたように、リストが新しいものであれば、最初から新しいリストを作成するため、少なくともラベルを設定する必要があります。デフォルトのリストの属性を変更するだけであれば、代わりに、enumerateたとえば を指定できます。

\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}

列挙

関連情報