Consider the code
\documentclass{article}
\usepackage{todonotes}
\begin{document}
%\todo{
\begin{tabular}{l}X\end{tabular}
%}
\end{document}
I want the contents of the table (above: X), to be inside \todo, whether inlined or not. This feature would be useful, e.g., for putting matrices into todo boxes, of course, with arrays in math mode. However, pdflatex complains when I remove the comment symbols %. What to do?
\todois a “moving” one;\beginand\endneed to be prefixed by\protect. – egreg May 07 '17 at 22:19