Проблема с "\newlist" пакета "enumitem"

Проблема с "\newlist" пакета "enumitem"

Я не знаю, почему этот код генерируетошибка.

! Ошибка пакета enumitem: неопределенная метка.

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

Что я делаю не так?

решение1

Как упомянул Бернард, если список новый, вам нужно задать как минимум метку, потому что в этом случае вы создаете новый список с нуля. Если вы просто хотите изменить атрибуты списков по умолчанию, вы можете вместо этого указать 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}

перечисления

Связанный контент