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.

When adding several notes on the same line using todonotes and then one note on the line behind them, its impossible to see which notes belong to which line since the line connecting each textbox to the corresponding piece of text overlap. I made a minimal example below. Is there any way to automatically solve this problem using todonotes or any similar package?

\documentclass[10pt,a4paper]{article} 
\usepackage{todonotes}
\usepackage{lipsum}

\begin{document}

\todo{Lorem}\textbf{Lorem} \todo{ipsum}\textbf{ipsum} \todo{dolor}\textbf{dolor}
sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad \todo{minim}\textbf{minim} veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 

\end{document}

An example of the problem with overlapping lines

A couple of acceptable solutions (which I do not node how to obtain in LaTeX) is the following:

Solution 1 Solution 2

share|improve this question
    
From what I suspect seeing your question (and midtiby's cool answer), implementing your ideas for solution within existing todonotes code might be quite difficult. –  mbork Feb 24 '13 at 19:14

1 Answer 1

up vote 16 down vote accepted

There is the option 'fancyline' for the todo commands. With it the notes now appear as follows. Personally I prefer the default behaviour.

Todonotes with the fancyline option.

\documentclass[10pt,a4paper]{article} 
\usepackage{todonotes}
\usepackage{lipsum}

\begin{document}

\todo[fancyline]{Lorem}\textbf{Lorem} \todo[fancyline]{ipsum}\textbf{ipsum}
\todo[fancyline]{dolor}\textbf{dolor} sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
\todo[fancyline]{minim}\textbf{minim} veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. 

\end{document}
share|improve this answer
5  
Might want to mention that "This does require two runs. First one to determine the locations, and the second to do the drawing.". This won't be obvious to new users. –  Peter Grill Feb 24 '13 at 18:58
    
@midtiby (Henrik Skov Midtiby --author of todonotes --, I suppose): How can one enable the fancyline behaviour globally (for all notes) in the preamble? \presetkeys{todonotes}{fancyline}{} seems like a low-level-hack -- is there a package option I'm missing? –  lockstep Feb 24 '13 at 19:15
3  
Well todonotes is my package ;-). Regarding your question, there is currently no global option for enabling fancyline for all todos. You can redefine the todo command with the following code to set fancyline as default. \makeatletter \renewcommand{\todo}[2][]{\@bsphack\@todo[fancyline,#1]{#2}\@esphack\ignorespace‌​s}% \makeatother –  midtiby Feb 24 '13 at 20:06
    
You should consider adding a global option. =] –  Alex Hirzel Feb 24 '13 at 21:56

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.