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.

Is there a simple way to add todo notes to LaTeX documents ?

I would like to have these notes in red in the generated pdf and a simple syntax to write them.

share|improve this question
2  
todonotes package or marginpar? –  Seamus Jan 27 '11 at 13:28
add comment

6 Answers

up vote 47 down vote accepted

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 \mynotes 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.

share|improve this answer
4  
There's also the todo package, which works well. –  Alan Munn Jan 27 '11 at 13:52
    
@Seamus Thanks it is perfect, just one thing: is there a way to move the notes on the left side ? –  Patrick Jan 27 '11 at 13:53
    
@Patrick For the todonotes package. For marginpar do: \marginpar[I'm on one side]{I'm on the other!} So if you want just notes on the left side: \marginpar[note goes here]{} Note the empty braces. –  Seamus Jan 27 '11 at 14:16
    
it is also possible to have margin notes with different text on both sides at the same time –  Herbert Jan 27 '11 at 15:33
    
@Seamus I actually get notes on right side (and not inline) by using the \todo command. \todo{this is on right side} and the next line of text is underlined –  Patrick Jan 28 '11 at 8:19
show 3 more comments

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}
share|improve this answer
add comment

If you want the notes directly in PDF you may want to use PDF annotations with the pdfcomment package.

Take a look at the screenshots

share|improve this answer
    
Could you please expand a bit, perhaps embed some of the screenshots in your answer? See also tex.stackexchange.com/a/97483/8057 . –  krlmlr Dec 9 '13 at 10:59
    
@krlmlr see tex.stackexchange.com/questions/6306/… for a more detailed example –  Josef Dec 9 '13 at 14:07
    
It's great to have these on this site, but then at least the link should be part of your answer ;-) –  krlmlr Dec 9 '13 at 14:27
add comment

Another possibility is the fixme package. It supports several ways of outputting the notes. You can have them directly inside the text, in the page margin, or as a list at the end of the document. You can even combine the methods.

It comes with support for different authors and different levels of severity. "Notes" and "comments" will simply be ignored if you compile the document with final option, while "errors" will produce compilation errors. In draft mode they will all be printed with different markup. Every author gets his/her own prefix, that is added to the note.

share|improve this answer
1  
I use the fixme package and have defined several types of notes e. g. in red for important changes (missing content or content of document to check) and light green for "cosmetic changes" (text alignment could be better, etc.) - all in all I find the fixme package extremely useful –  Martin Apr 4 '11 at 21:39
add comment

Check out easy-todo on http://www.ctan.org/tex-archive/macros/latex/contrib/easy-todo

share|improve this answer
    
I am using this package due to its simplicity, although I have some minor issues with it. Just a notice: If you have strange issues with the content of your index. Uncomment the \usepackage{easy-todo} command for testing, if your issues are gone. It caused in my document class provided by my university, that index, table index and figure index got not displayed in the index. The creator of the document class said, it my may not be compatible with koma script. Once I don't use the easy-todo package, everything is fine. So I dont have to worry. –  OneWorld Sep 12 '12 at 16:31
add comment

To avoid the risk to submit the paper with the todo notes, I throw a warning, so that each todo appears as a warning when I compile. The command is

\newcommand{\todo}[1]{\textcolor{red}{TODO: #1}\PackageWarning{TODO:}{#1!}}
share|improve this answer
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.