3

Minimal example:

\documentclass[12pt,a4paper]{report}
\usepackage{todonotes}
\usepackage{siunitx}
\begin{document}
\todo{\today}
\end{document}

This gives the following error:

! Missing number, treated as zero.
<to be read again>
                   \
l.5 \todo{\today}

The same code works if you don't use the siunitx package, if you use \today outside \todo, or if you write today instead of \today.

Why? Is there any workaround?

1 Answer 1

3

I suspect the problem occurs because \today is not "robust" (in the LaTeX sense of the word). If you change

\todo{\today}

to

\todo{\protect\today}

you can use both packages just fine. Alternatively, load the etoolbox package and issue the instruction \robustify{\today} in the preamble.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .