5

The following (not quite) MWE

\documentclass{acmart}
\usepackage{todonotes}
\begin{document}
\title{ACM Class and the todonotes package}
\author{Author}
\maketitle
\todo{A todo.}
\listoftodos
\end{document}

yields the following error:

! Missing \endcsname inserted.
<to be read again> 
                   \@@par 
l.9 \end
        {document}

while the following code

\documentclass{acmart}
\usepackage{todonotes}
\begin{document}
\title{ACM Class and the todonotes package}
\author{Author}
\maketitle
\todo{A todo.}
\listoftodos\\
\end{document}

compiles nicely (using TeX Live 2017).

With the article class I don't have to add a line break \\ or, more generally, a {} after \listoftodos as a workaround. It seems there is an incompatibility? Can this be seen as a bug in either the acmart class or the todonotes package? Thank you!

3

enter image description here

acmart somewhat bravely redefines the internal \@starttoc command to take two arguments rather than one, the second one being some kind of subheading in the list. You can put that text (or just {}) after \listof...

\documentclass{acmart}
\usepackage{todonotes}
\begin{document}
\title{ACM Class and the todonotes package}
\author{Author}
\maketitle
\todo{A todo.}


\listoftodos{list of todos}

\end{document}
6
  • Reminds me of amsart – egreg Jan 14 '19 at 22:14
  • @egreg so it is, the code is almost identical. – David Carlisle Jan 14 '19 at 22:15
  • @davidcarlisle and egreg It turns out that listoftodos is not working at all (and without error!) in my second MWE. – Mario Jan 16 '19 at 10:57
  • @Mario I don't have llncs and that edit seems to be a completely different question and should be asked as a new question, unless llncs uses the same definition of \@starttoc in which case your llncs example should be \listoftodos{} not \\listoftodos. – David Carlisle Jan 16 '19 at 11:02
  • 1
    @Mario oh that egreg bloke and the answer worked? amazing:-) – David Carlisle Jan 16 '19 at 16:37

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.