2

I am using the todonotes package and I wanted to add a note inside a caption like:

\caption{This is the section heading\todo{We should rethink the section title.}}

However, this is throwing the “Not in outer par mode” error. I understand why, but I wonder if there is a way to do this.

Thanks.

3

As far as I know \todo does not work in a caption, but \todo[inline] will do, however, the remark text is not in the margin!

\documentclass{article}

\usepackage{todonotes}

\begin{document}

\begin{figure}
\caption{This is the section heading\todo[inline]{We should rethink the section title.}}
\end{figure}
\end{document}

enter image description here

  • I should have tried that first. Thanks. Not as good as having it at the margin, but it'll do for now. – ozsu Feb 24 '17 at 21:06
  • @ozsu: Well, or tex.stackexchange.com/users/586/torbj%c3%b8rn-t's solution with LuaLaTeX.... – user31729 Feb 24 '17 at 21:07
  • I now need to add a todo inside a section header -- can that be done? The method proposed by Christian Hupfer did not work. – ozsu Feb 25 '17 at 0:56
  • Actually, I thought that having this additional question here would be confusing, so I posted a separate question for this at tex.stackexchange.com/questions/355628/… – ozsu Feb 25 '17 at 1:10
  • The method does not work because you can't write the \todo code into the ToC, which would be the case for \section{foo \todo[inline]{some text}} – user31729 Feb 25 '17 at 16:27
2

This may or may not be useful, but the luatodonotes package works in captions. It requires the use of lualatex for compiling the document though.

\documentclass{article}
\usepackage{luatodonotes}
\begin{document}
\begin{figure}
\caption{This is the section heading\todo{We should rethink the section title.}}
\end{figure}
\end{document}

enter image description here

  • Thanks. I can't move to luatex for this project, unfortunately. – ozsu Feb 24 '17 at 21:06

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.