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 need to use the multicol package and I want to have todo items in the margin. I found the todonotes package which looked very promising:

\documentclass[12pt]{article}
\usepackage{todonotes}
\usepackage{multicol}

\begin{document}
\begin{multicols}{2}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec varius suscipit
diam a mattis. Etiam tortor nisl, volutpat a pharetra eu, consequat nec massa.
Vestibulum dapibus, enim vitae tempor adipiscing, massa magna ultrices erat, in
sodales turpis quam non nisi. Ut tristique luctus turpis at viverra. Aenean id
magna nec tellus facilisis mollis. Sed blandit nibh vitae turpis gravida
sodales. Donec erat velit, mollis id mattis at, eleifend quis neque. Morbi
ullamcorper bibendum feugiat. \todo{Fix this!} Aenean sed massa faucibus lectus
facilisis facilisis. Vivamus urna justo, commodo non mollis sodales, consequat
nec ipsum. Nam eget ligula non neque condimentum malesuada non et nisi.

\end{multicols}

\end{document}

However, I get the following warning and no todos in the margin:

Package multicol Warning: Floats and marginpars not allowed inside `multicols' 
environment!.

Is there an easy fix or perhaps some other package that is better suited?

share|improve this question
1  
add comment

2 Answers

up vote 9 down vote accepted

You could force todonotes to use \marginnote instead. It will need more than one run to "settle":

\documentclass[12pt]{article} 
\usepackage{todonotes}
\usepackage{marginnote} 
\let\marginpar\marginnote
\usepackage{multicol}  
\begin{document} 
\begin{multicols}{2}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec varius suscipit diam a mattis. Etiam tortor nisl, volutpat a pharetra eu, consequat nec massa. Vestibulum dapibus, enim vitae tempor adipiscing, massa magna ultrices erat, in sodales turpis quam non nisi. Ut tristique luctus turpis at viverra. Aenean id magna nec tellus facilisis mollis. Sed blandit nibh vitae turpis gravida sodales. Donec erat velit, mollis id mattis at, eleifend quis neque. Morbi ullamcorper bibendum feugiat. \todo{Fix this!} Aenean sed massa faucibus lectus facilisis facilisis. Vivamus urna justo, commodo non mollis sodales, consequat nec ipsum. Nam eget ligula non neque condimentum malesuada non et nisi.

\end{multicols}

\end{document}
share|improve this answer
    
Hm, this will change all \marginpar to \marginnote. But that is probably not a bad things but actually what I want. Didn't think of that. Nice trick. :) –  jonalv Apr 20 '12 at 16:03
1  
You could save the original definition of \marginpar before changing it with e.g. \let\normalmarginpar\marginpar. You could also write to the author of todonotes and ask for an option to switch to \marginnote. Btw: You should be aware that a \marginnote is not a float. If you have two in the same line there are printed one over the other. –  Ulrike Fischer Apr 20 '12 at 16:12
add comment

Try \todo[inline]{Todo text}.

share|improve this answer
    
Yea, that works but does of course not put it in the margin... –  jonalv Apr 20 '12 at 11:45
add comment

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.