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.

This question already has an answer here:

What is a good package for taking note of draft ideas, and have them emphasized in the output document? For example:

This is a very brilliant idea for a 
research topic \somecommandthathighlightsanotetoself{(Try
to find out exactly why this is a brilliant idea.)}

In the output document, I would like to see the note in red or any other color to call out my attention as I review my work. As a bonus, perhaps some note in the margins for additional attention-calling.

share|improve this question

marked as duplicate by krlmlr, Peter Jansson, Jubobs, Thorsten, Claudio Fiandrino Dec 9 '13 at 12:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Also related: tex.stackexchange.com/q/124021/8057 –  krlmlr Dec 9 '13 at 12:51
add comment

5 Answers

You can have a look at the todonotes package. It has some very simple yet quite customizable commands to add notes and stuff to your document. There is also a nice feature called listoftodos that lists all the todo fields that you set in the document.

Compare the MWE below:

\documentclass{article}
\usepackage{todonotes}

\begin{document}
Some text... \todo{Some Todo stuff} Some more text

\listoftodos
\end{document}

enter image description here

The documentation of the package is quite short but shows some useful examples and tweaks.

But there is also a little drawback: as pointed out in the comments by T. Verron, todonotes is built up on tikz to draw its fancy note bubbles. This means that, depening on the number of notes you have in your document, the compilation process may be significantly slowed down.

share|improve this answer
    
If I use two \todo{} on the same line, the result is not so nice. –  Sigur Feb 9 '13 at 13:22
    
Thats true to some extent. But how often will this happen? And then there is also an inline option, that shifts the note from the margin into the text. –  Benedikt Bauer Feb 9 '13 at 13:29
8  
Note that this package makes use of tikz to draw the nice boxes. On long documents and slow machines, it may noticeably slow down the compilation process. Alternative solutions using simple \marginpar commands give less eye-candy, but are less expensive. YMMV –  T. Verron Feb 9 '13 at 13:43
add comment

If you use Adobe Reader, then there is also pdfcomment. You can run texdoc pdfcomment in your terminal to read the manual. Like todnotes package, this package tries to emulate the commenting functionality found in some word processors.

This sample code is taken from the example.tex file provided with the package and some of the things that it can do.

\documentclass{article}

\usepackage{amsmath,array}
\usepackage[svgnames]{xcolor}
\usepackage{pdfcomment}
\usepackage{lipsum}

\begin{document}
\pdfmarkupcomment[author={Donald Duck},subject={Strikeout},color=red,markup=StrikeOut]{A little Test!}{Why is this repeated? This is a StrikeOut markup annotation} 

\pdfmarkupcomment[author={Donald Duck},subject={squiggly},color=Teal,opacity=1.0,markup=Squiggly]{Unfortunately the support of pdf annotations by pdf viewers is only partly available to nonexistent. The reference viewer for the development of this package is \texttt{Adobe Reader}.}{This is a Squiggly markup annotation}

\pdfmarkupcomment[id=300,author={Donald Duck},subject={highlight},color=yellow,opacity=1.0,markup=Highlight]{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, 
placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, 
nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. 
}{This is a Highlight markup annotations with page break}

\begin{pdfsidelinecomment}[avatar=CaptainJack,subject={sideline},opacity=1,color=red,icolor=yellow,caption=inline,linebegin={/Butt},lineend={/Square},linewidth=3bp,linesep=1cm]{ ! Delete ! }
\lipsum[2-4]
\end{pdfsidelinecomment}

\vspace{2cm}
\definestyle{mathpopup}{author={},subject={},color=NavajoWhite,markup=Highlight}
\[
\begin{array}{c>{\displaystyle}c}
 \text{Bernoulli Trials} &
 \pdfmarkupcomment[style=mathpopup]{P(E)}{Probability of event E: Get exactly k heads in n coin flips.}%
  =
 \pdfmarkupcomment[style=mathpopup]{\dbinom{n}{k}}{Number of ways to get exactly k heads in n coin flips}%
  {\pdfmarkupcomment[style=mathpopup]{p}{Probability of getting heads in one flip}%
}^{%
    \pdfmarkupcomment[style=mathpopup,mathstyle=\scriptstyle]{k}{Number of heads}
  }%
 \pdfmarkupcomment[style=mathpopup]{(1-p)}{Probability of getting tails in one flip}^{%
 \pdfmarkupcomment[style=mathpopup,mathstyle=\scriptstyle]{n-k}{Number of tails}%
 }%
\end{array}
\]

\end{document}
share|improve this answer
4  
Remarkable package, which I hadn't seen before. And it works with my (non-Adobe) reader - pdf-XChange viewer –  Brent.Longborough Feb 9 '13 at 14:26
    
@Brent.Longborough I have to try pdf-XChnage viewer yet. I have uninstalled Adobe Reader for some time now. –  hpesoj626 Feb 9 '13 at 14:32
1  
It's Windows-only, I think, but, for what I do, I find it much less bloated than Adobe –  Brent.Longborough Feb 9 '13 at 14:41
    
@Brent.Longborough Yes. You are right. I might try it with wine in my linux machine for now. Thanks for the link. –  hpesoj626 Feb 9 '13 at 14:43
    
Not so good in Foxit :( \pdfmarkupcomment appears as if I'd just used \texttt{}, while the pdfsidelinecomment shows up in the margin, with the box over the top of the text. –  Chris H Aug 14 '13 at 15:22
add comment

I don't know if there is a package but I use this command

\def\alert#1{\textcolor{red}{#1}}

and then I simply type

text here \alert{in red} and foo

You can improve it to make use of some \marginpar{}.

share|improve this answer
1  
I use a similar approach. If you want to typeset the document without notes then you can comment out \def\alert#1{\textcolor{red}{#1}} and replace it with \def\alert{} –  Ubiquitous Jul 12 '13 at 12:59
    
Similarly here, though my \warn is slightly different: \DeclareRobustCommand\warn[1]{\ifthenelse{\equal{#1}{}}{\textcolor{red}{\textbf‌​{**CH**}}}{\textcolor{red}{\textbf{**CH**#1**}}}} to allow an attention-grabbing mark even if I don't type anything. I tend to have %\renewcommand{\warn}{} immediately following to make hiding easier by removing the %. –  Chris H Aug 14 '13 at 15:07
add comment

Another option is the rather new fixmetodonotes package. It is much more lightweight than \todonotes by using \marginpar instead of tikz, but contains many of its features, plus some more:

  • Inline and margin placement
  • Listing all notes through \listofnote
  • Flexible customization
  • Automatic placement of a DRAFT watermark on any page that contains notes (can be deactivated using the nowatermark package option)

The development version and an issue tracker can also be found on GitHub.

Example

\documentclass{article}
\pagestyle{empty}
\usepackage{fixmetodonotes}

\defnote{MARGIN}{inline}{\marginpar}

\begin{document}
  Some text... \FIXME{Some Todo stuff} Some more text

  It can also display \MARGIN{(Check if margin notes can be displayed
  with the new MARGIN note type)} notes.

  \listofnote
\end{document}

Result of compilation

share|improve this answer
add comment

There's also the more mature fixme package, which I learned from this question. My current favorite.

\documentclass[draft]{article}
\pagestyle{empty}
\usepackage{fixme}
\fxsetup{theme=colorsig}

\begin{document}
  Regular text
  \fxerror*{Issued by the fxerror command}
  continued here.
  \fxwarning{And another warning}
\end{document}

Compiled output

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.