0

Enumitem returning an error. Same with [shortlabels] and [inline] options.

\documentclass{article}
    \usepackage{enumitem}
    \begin{document}
    \begin{enumerate}[label={\textbf{\alph*})}]
        \item Heisenberg
        \item Ozark
        \item Lucifer
    \end{enumerate}
\end{document}

Even without any label, if enumitem is imported, it's showing an error.

Error: Undefined control sequence. \begin{enumerate}[label={\textbf{\alph*})}]

Is it an issue of package dependency?

Log File:

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)
7
  • 3
    Welcome to TeX.SX! For me, the example code you provided compiles prefectly fine.
    – leandriis
    Jul 11 '20 at 9:50
  • 1
    Show the log-file of the compilation of your example. Jul 11 '20 at 9:53
  • Maybe try with the options [label=\arabic*, font=\bfseries]
    – Bernard
    Jul 11 '20 at 10:04
  • huch. What do you have around line 140 in enumitem.sty? Jul 11 '20 at 10:07
  • The error isn't cited correctly. The main information is at the end of the first line (not cited by you): \labelindent. So the undefined control sequence is \labelindent. Normal log file says that \labelindent is defined between \enit@kv@toks and \enit@outerparindent as \skip49. But your log file does not iclude this message. So, really, the \labelindent isn't defined. It is very curious because the loaded file enumitem.sty defines it at line 139.
    – wipet
    Jul 11 '20 at 10:17
0

I fixed it. I had to reinstall the package. Turns out the \newlength\labelindent at line 139 got commented.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.