Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to create notes via the package todonotes in a displayed math environment? Here is a minimal example where it fails:

\documentclass{minimal}

\usepackage{todonotes}

\begin{document}
\[
\todo{think about it twice}foo = bar
\]
\end{document}

Anyone an idea?

share|improve this question
    
todo notes are floats. I'd say it's probably not possible... –  Jubobs Mar 11 '13 at 13:14

1 Answer 1

The todo note needs to be added to material in the vertical list that (La)TeX is building. You can use \vadjust to add such material when in other contexts. So the following produces the desired result:

Sample output

\documentclass{article}

\usepackage{todonotes}

\begin{document}

\[
\vadjust{\todo{think about it twice}} x^2 = y^2 + z^2
\]

\end{document}

Note that this will not work with eqnarray nor the ams math environments, whose internals are rather different.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.