I have been following this simple and clean commands to create a quick reference.

  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,


but it says undefined control sequence as following

! Undefined control sequence.
<argument> \@listctr 

l.949 \bibitem{lamport94}


I am not sure if this counts as successful compilation, but after clicking enter serveral times in TextWork, It finally brought me to something like this enter image description here

If you could zoom in the map, you will find the reference doesn't behave as expected. 'thebibliography' somehow slipped into the text

  • I'm afraid I get no error messages when I run your code. What happens if you remove the .aux file and recompile? – Mico Dec 14 '13 at 8:43
  • I am afraid it's always as this even though after removal .aux file – Daniel Dec 14 '13 at 8:45
  • 2
    I augmented your code fragment into an MWE (minimum working example) by adding the instruction \documentclass{article} (and by fixing a typo). As it now stands, the MWE compiles fine on my system; does it compile correctly on yours too? Does your document have additional aspects not mentioned in the MWE that might be causing the error message? – Mico Dec 14 '13 at 8:48
  • 2
    @Daniel Please work on your example: the report class defines standard list structures, so it is not a 'normal' issue. You will need to make a copy of your report and cut it down until you find the minimum needed to reproduce the problem. Without a MWE we won't be able to help, I'm afraid. – Joseph Wright Dec 14 '13 at 9:12
  • 4
    This question appears to be off-topic because it is not helpful for other users. – Marco Daniel Dec 14 '13 at 9:18

The fact that the first line in the bibliography (the Lamport reference) currently starts with beginthebibliography9 is due to the following code:


You need to delete the middle line, i.e., the one that says

  • Sorry in some not shown part of the tex file(It's really a big file). I have included "\usepackage{apacite}" in the preamble. This seemed to be causing the error when I tried your suggestion to find a MWE. Removing it solve everything. Do you know why it could cause a problem? – Daniel Dec 14 '13 at 9:22
  • @Daniel - Loading the apacite package would make sense if you used BibTeX and the apacite bibliography style. The apacite package is quite large and sophisticated, and I wouldn't be surprised if it modified the syntax of the \bibitem macro. Since it looks like you're building the bibliography "by hand", I'd say there's no need to load the apacite package. – Mico Dec 14 '13 at 9:27
  • suuuuuuuuuuuuuuuuuure:) – Daniel Dec 14 '13 at 15:18

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