3

Finishing my twosided article, I want to generate the LOF and LOT.

The following error occurs over and over for a lot of figures (the first being: "Undefined control sequence" and the second being: "Missing number treated as zero":

! Undefined control sequence.
\l@figure #1#2->\ifnum \c@lofdepth 
                                   >\z@ \vskip \cftbeforefigskip {\leftskip ...
l.10 ...DPJIP2009}\relax }}{11}{figure.caption.14}

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> 
                   >
l.10 ...DPJIP2009}\relax }}{11}{figure.caption.14}

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.)

I use PDFLATEX via texstudio (MAC OSX) and \documentclass[11pt,a4paper,twoside,openany]{book}. I also just updated all packages, no difference (did not reboot computer).

I hope someone can help.

  • Please show the exact full error message, the undefined control sequence message for example shows which command was undefined. – David Carlisle Jun 12 '13 at 15:30
  • I updated the error code. I hope this is what you ask for. – Joost Jun 12 '13 at 15:37
  • Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. – cmhughes Jun 12 '13 at 15:47
4

The standard classes have a tocdepth counter but do not a lofdepth counter (the internal name of which would be \c@lofdepth) so most likely you at one point used a package for extended list of figures handling and that package is no longer loaded leaving the temporary files in an inconsistent state.

Delete the .lof .toc .lot and .aux files and re-latex and things should get back in sync.

  • 1
    Your answer helped me to fix it. In the preamble I had: \usepackage[titles,figures]{tocloft}. I do not know why 'figures' was in there (as a starter you sometimes just copy codes). Deleting it solved the problem. – Joost Jun 12 '13 at 16:18

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.