"enumitem" 패키지의 "\newlist" 문제

"enumitem" 패키지의 "\newlist" 문제

이 코드가 왜 생성되는지 모르겠습니다.오류.

! 패키지 열거 항목 오류: 정의되지 않은 레이블입니다.

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

열거

관련 정보