The todonotes package typically underlines the whole line. I would like to have more control over this. Is there an easy way?
For instance, how do I write a todo that underlines just the word 'first' in the second paragraph?
\documentclass[11pt,a4paper]{scrartcl}
\usepackage{todonotes}
\begin{document}
\todo{note 1. full line}
First paragraph. This is the first sentence of the first paragraph.
Second paragraph. This is the \todo{note 2. single word} first sentence of the second paragraph.
\end{document}
At the moment, the second note underlines from 'first' to the end of the line.
Using \todo[noline]{note 2. single word}
results in:
and the word in not underlined at all.
Best Answer
Edit: Added a macro to do highlighting and the note together, with both disabled when the
disable
option is given totodonotes
.This solution comes from section 1.8.13 of the
todonotes
documentation, but is slightly improved (doesn't eat the following space).