TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a presentation using beamer and I would like to denote bits that need to be done later using the todonotes package. But there appears to be some conflict between the two packages. I get errors of the form

! LaTeX Error: Float(s) lost.

I'm guessing this is because the slides don't have a margin in which to place the todo bubbles. What's the best way to get around this? I'm looking for something easier than manually adding the inline option to every use of \todo.

share|improve this question
Beamer doesn't support floats, which don't make sense in a presentation. Marginpars are floats, so as long you can't stop todonotes to use them you wont come far. – Martin Scharrer Feb 28 '11 at 18:46
@Martin: ok, thanks, so I guess the question boils down to finding the best way to automatically add the inline option to every instance of \todo. – David Z Feb 28 '11 at 19:07
up vote 24 down vote accepted

You can change the presets of the package so that it creates inline todonotes by default. In order to do this, just add the line \presetkeys{todonotes}{inline}{} after you have loaded todonotes (you may also need to add xkeyval to make the \presetkeys macro available):



    \todo{Notes are inline by default now.}
share|improve this answer
This causes weird errors while the other solution is fine. Can't be bothered to find out the exact problem, just wanted to add this as a caveat for future googlers. – fifaltra Jan 29 '14 at 23:55

Now I feel silly, because almost immediately after posting the question I had an idea:


This redefines \todo as \todo[inline], at the expense of not allowing any other options to be given to \todo, which works fine for me. Though I still welcome more flexible solutions if they are out there.

share|improve this answer
This should allow additional options (as long \todo accepts empty options, i.e. a trailing ,): \renewcommand\todo[2][]{\todox[inline,#1]{#2}} – Martin Scharrer Feb 28 '11 at 19:15
You can define your command to be \renewcommand\todo[2][]{\todox[inline,#1]{#2}}. That way, you can pass more options. – fabikw Feb 28 '11 at 20:08
I'm trying to do something similar @fabikw. The only difference is that I want to create an optional name. The code I tried was: \let\todox\todo \renewcommand\todo[2][]{ \todox[inline,color={red!100!green!33},size=\footnotesize]{\textbf{Comment [#1]:}~#2}% } In the argument 1, it shall be possible to write an optional name. But this will not build. I had to cancel it, because it was getting nowhere. Any ideas? – Andreas Løvgaard Feb 3 '15 at 16:52

Your Answer


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.