I'm getting an error with package listlbls: https://www.ctan.org/pkg/listlbls?lang=en. It prints a list of labels used in the document. Here's a MWE:


\section{A section}\label{sec:first}
Some text anf a reference \ref{ch:ghost}.
\section{Another Section}\label{sec:another}
Some more text and and another reference \ref{sec:first}.
By equation \ref{eq:triv}  section \ref{sec:another}.

When I use it together with the report class I get an error:

LaTeX Error:
Missing \begin{document}.
l.55 \ifdefined\chapter*

So it seems to be something to do with the chapter command as it works fine in the article class. Most puzzlingly one of the online compilers I tested it on returned and error and gave an output with a empty first page bar one * character! Any ideas? enter image description here

enter image description here

enter image description here


That looks like a bug in listlbls.sty. You can solve it by making a private copy of that file in your working directory and changing the line (line number 55)



| improve this answer | |
  • Thanks! I tried your fix and it worked, although I am still puzzled as to why that line was in the package originally, as it seems like it was testing for a report or book class anyway... – demodave Dec 1 '16 at 16:42

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.