How to add todo notes?

The todonotes package mentioned above can be customized to show various types of notes. It is also possible to create a summary of all notes, for example at the end of the document. Here is an example:

\documentclass{article}
\usepackage{lipsum}                     % Dummytext
\usepackage{xargs}                      % Use more than one optional parameter in a new commands
\usepackage[pdftex,dvipsnames]{xcolor}  % Coloured text etc.
% 
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\newcommandx{\unsure}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
\newcommandx{\change}[2][1=]{\todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,#1]{#2}}
\newcommandx{\info}[2][1=]{\todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,#1]{#2}}
\newcommandx{\improvement}[2][1=]{\todo[linecolor=Plum,backgroundcolor=Plum!25,bordercolor=Plum,#1]{#2}}
\newcommandx{\thiswillnotshow}[2][1=]{\todo[disable,#1]{#2}}
%
\begin{document}
\pagestyle{empty}
\todo[inline]{The original todo note withouth changed colours.\newline Here's another line.}
\lipsum[11]\unsure{Is this correct?}\unsure{I'm unsure about also!}
\lipsum[11]\change{Change this!}
\lipsum[11]\info{This can help me in chapter seven!}
\lipsum[11]\improvement{This really needs to be improved!\newline\newline What was I thinking?!}
\lipsum[11]
\thiswillnotshow{This is hidden since option `disable' is chosen!}
\improvement[inline]{The following section needs to be rewritten!}
\lipsum[11]
\newpage
\listoftodos[Notes]
\end{document}

This outputs the following text with notes:

The text with notes

And here is the summary page:

The summary

Notice the \thiswillnotshow note which is disabled using the disable option in the header. This can be used to turn off each type of note globally. Todonotes can also be used in the caption of tables and figures, though only provided that the inline option is used with these notes.


There is a todonotes package that makes adding notes easy enough. They appear in the margins by default.

A simpler version, if you just want red text in the body of the text as notes is just to define a command \myworries that makes its argument red.

\documentclass{article}
\usepackage{xcolor}
\newcommand\myworries[1]{\textcolor{red}{#1}}
\begin{document}
Here is some text.
\myworries{But I'm worried about the text}
\end{document}

And then if you want to hide the comments, just add the line \renewcommand\myworries[1]{} below the \newcommand. This will hide all your notes.

A third option is to use LaTeX's own \marginpar command to put a paragraph in the margin. It's not great, but for little notes to yourself it's adequate.

Alan Munn, in the comments, has made me aware of another package todo that seems to be simpler than todonotes but a little more powerful than \marginpar. Though I've not used it so I don't know for sure.


see package cooltooltips. When the cursor is over "This text" the blue window pops up.

enter image description here

The source code for this example:

\documentclass{article}

\usepackage{cooltooltips}
\usepackage{graphicx}
\usepackage{color}
\usepackage{hyperref}

\def\cool{\texttt{cool}}
\begin{document}

The \cool\ package enables a document to contain hyperlinks that pop
up a brief tooltip when the mouse moves over them and also open a
small window containing additional text.  \cool\ works only with
pdf\LaTeX\@.  Furthermore, the tooltips that \cool\ produces are much
less cool when viewed under older versions of Acrobat~($<7.0$) or the
current version of xpdf~(3.00) because they don't pop up the extra,
small window.  
\cooltooltip[0 0 1]{Example}{This is an example of a cool tooltip.  
Pretty cool, eh?}{http://www.ctan.org/}{Visit CTAN on the Web}{This text\strut} 
%
is an example of a cool tooltip (assuming
you're viewing this document with a sufficiently capable \textsc{pdf}
reader).  Move your mouse pointer over it and watch what happens.
Then, click on the link.  If your \textsc{pdf} reader is properly
configured it should launch a Web browser and send it to the
\textsc{ctan} home page.

\end{document}

Tags:

Todonotes