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.

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
2  
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
1  
@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

2 Answers 2

up vote 19 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):

\documentclass{beamer}

\usepackage{xkeyval}
\usepackage{todonotes}
\presetkeys{todonotes}{inline}{}

\begin{document}
\begin{frame}
    \todo{Notes are inline by default now.}
\end{frame}
\end{document} 
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 at 23:55

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

\usepackage{todonotes}
\let\todox\todo
\renewcommand\todo[1]{\todox[inline]{#1}}

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
1  
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

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.