I want to put some comments about actual code into my document, and for that I thought I'd use \verb or \begin{verbatim}, but it turns out that the todonotes package does not like that:
\documentclass{minimal}
\usepackage{todonotes}
\begin{document}
\todo{\verb|Hello!|}
\end{document}
Which in turn gives the beautiful error:
! Argument of \reserved@a has an extra }.
<inserted text>
\par
l.7 \todo{\verb|Hello!|}
A similar problem applies to \begin{verbatim}.
So... how do I get verbatim text/code into my todo notes?
\todothat doesn't like\verb:\verbcannot go in the argument of any command. Do you need special characters such as backslash or braces in the "verbatim"? – egreg Jul 11 '12 at 15:58\ttfamilyinstead of\verb. – Jay Jul 11 '12 at 16:23