Enumitem 返回错误。与[shortlabels]
和[inline]
选项相同。
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label={\textbf{\alph*})}]
\item Heisenberg
\item Ozark
\item Lucifer
\end{enumerate}
\end{document}
即使没有任何标签,如果导入 enumitem,也会显示错误。
错误:Undefined control sequence. \begin{enumerate}[label={\textbf{\alph*})}]
这是包依赖性的问题吗?
日志档案:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.6.29) (preloaded format=pdflatex 2020.7.11) 11 JUL 2020 15:10
entering extended mode
**./texstudio_yCzdWs.tex
(texstudio_yCzdWs.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-06-18>
(D:\Labs\LaTeX\MiKTeX\tex/latex/base\article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(D:\Labs\LaTeX\MiKTeX\tex/latex/base\size10.clo
File: size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count167
\c@section=\count168
\c@subsection=\count169
\c@subsubsection=\count170
\c@paragraph=\count171
\c@subparagraph=\count172
\c@figure=\count173
\c@table=\count174
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(D:\Labs\LaTeX\MiKTeX\tex/latex/enumitem\enumitem.sty
Package: enumitem 2019/06/20 v3.9 Customized lists
\enitkv@toks@=\toks15
\enit@outerparindent=\dimen135
\enit@toks=\toks16
\enit@inbox=\box45
\enit@count@id=\count175
\enitdp@description=\count176
)
(D:\Labs\LaTeX\MiKTeX\tex/latex/l3backend\l3backend-pdfmode.def
File: l3backend-pdfmode.def 2020-06-29 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count177
\l__pdf_internal_box=\box46
)
(texstudio_yCzdWs.aux)
\openout1 = `texstudio_yCzdWs.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
! Undefined control sequence.
\enit@preset ...let \enit@ref \relax \labelindent
\z@skip \ifnum \@listdepth...
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
\enit@shl
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Undefined control sequence.
\enit@calcleft ... \advance \dimen@ -\labelindent
\ifcase \enit@calc \enit@c...
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
\advance
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Illegal unit of measure (pt inserted).
<to be read again>
\advance
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
! Undefined control sequence.
\enit@calcleft ...calcwidth \advance \labelindent
\dimen@ \or \labelwidth \d...
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
\relax
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Illegal unit of measure (pt inserted).
<to be read again>
\relax
l.4 \begin{enumerate}[label={\textbf{\alph*})}]
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
[1
{C:/Users/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(texstudio_yCzdWs.aux) )
Here is how much of TeX's memory you used:
688 strings out of 480790
11697 string characters out of 2908470
244485 words of memory out of 3000000
16776 multiletter control sequences out of 15000+200000
532646 words of font info for 25 fonts, out of 3000000 for 9000
1141 hyphenation exceptions out of 8191
25i,4n,19p,158b,183s stack positions out of 5000i,500n,10000p,200000b,50000s
<D:/Labs/LaTeX/MiKTeX/fonts/type1/public/amsfonts/cm/cm
bx10.pfb><D:/Labs/LaTeX/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on texstudio_yCzdWs.pdf (1 page, 23384 bytes).
PDF statistics:
14 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案1
我修好了。我不得不重新安装该软件包。结果发现\newlength\labelindent
第 139 行被注释了。