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.

I have a command \TODO (and \FIXME) that display a review note in the document. I'd like to collect all those notes at the end of the document as well, like a list of figures.

Is there some easy way to do this with the remark and the page number? Extra points for listing the section as well.

share|improve this question
3  
Do you know the package todonotes? –  Kurt Apr 2 '13 at 18:26
    
@Kurt I've never heard of that; thanks. I've added it to my answer and marked it as community wiki in case there are any other good packages for things like this. Thanks. –  Sam Whited Apr 3 '13 at 14:12

2 Answers 2

up vote 7 down vote accepted

tocloft

You can define new lists using the tocloft package.

For example:

\newlistof{todo}{lotd}{TODO List}

Then, in your TODO command:

\newcommand*{\TODO}{%
    \refstepcounter{todo}
    \addcontentsline{lotd}{todo}{TODO \thetodo}
    % Your TODO command
}

Finally, at the end of the document, you can run:

\listoftodo

to print a table of todo's similar to the table of contents or list of figures. More info in the tocloft documentation.

todonotes

As someone else suggested, the todonotes package also looks good. It works in a similar manner, and you can insert a list using:

\listoftodos

The question has been marked as community wiki in case there are other packages like this I've missed.

share|improve this answer

As you see, I flag the todo in the text itself. If you don't wish to disturb your formatting, you could eliminate that feature, but it might then be hard to locate the todo in the original document. (EDITED to remove spurious whitespace)

\documentclass{article}
\usepackage{ifthen}
\newcounter{todoindex}
\setcounter{todoindex}{0}
\newcommand\TODO[1]{%
  \addtocounter{todoindex}{1}%
  \expandafter\def\csname todo\roman{todoindex}\endcsname{#1}%
  (TODO \arabic{todoindex})%
}
\newcounter{index}
\newcommand\showTODOs{%
  \vspace{5ex}%
  \rule{10ex}{.5ex}TO-DO LIST\rule{10ex}{.5ex}\\%
  \setcounter{index}{0}%
  \whiledo{\value{index} < \value{todoindex}}{%
    \addtocounter{index}{1}%
    \arabic{index}):  \csname todo\roman{index}\endcsname\\%
  }%
}
\begin{document}

I start hear \TODO{Fix this bug} and do some work

THen I do thiis \TODO{Get spelling fixed, too} which I have to get back
to

and then I am done

\showTODOs

\end{document}

enter image description here

share|improve this answer
    
Looks interesting, but it yielded just a list of numbers, but no text for me. I'll be using Sam Whited's answer, since it is shorter. –  queueoverflow Apr 2 '13 at 18:09
    
@queueoverflow When using it, did you pass an argument to the \TODO command? It saves the argument for regurgitation later. –  Steven B. Segletes Apr 2 '13 at 18:12

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.