This answer is based on very minor modifications to my answer at Robust way to mark draft text?.
Now I did place red delimiters around the TO DO text, but show in the source code how to eliminate those, if one truly wanted no indication in the primary text of what was and wasn't a TO DO. I also show that the solution works in footnotes.
\documentclass{article}
\textheight=6in
\usepackage{xcolor}
\usepackage{stackengine}
\setstackgap{L}{.5\baselineskip}
\newcommand\markin[1]{\textcolor{red}{\sffamily%
\scriptsize\bfseries#1}}
\usepackage{ifthen}
\newcounter{todoindex}
\setcounter{todoindex}{0}
\newcommand\TODO[1]{%
\addtocounter{todoindex}{1}%
\expandafter\gdef\csname todo\roman{todoindex}\endcsname{#1}%
\markin{\Alph{todoindex}}% <-- ELIMINATE THIS TO GET RID OF LEADING MARKER
#1%
\markin{\Alph{todoindex}}% <-- ELIMINATE THIS TO GET RID OF TRAILINGMARKER
}
\newcounter{index}
\newcommand\showTODOs{%
\vspace{5ex}%
\rule{10ex}{.5ex}\textcolor{red}{TO-DO LIST}\rule{10ex}{.5ex}\\%
\setcounter{index}{0}%
\whiledo{\value{index} < \value{todoindex}}{%
\addtocounter{index}{1}%
\markin{\Alph{index}}\csname todo\roman{index}\endcsname\\%
}%
}
\begin{document}
When writing documents\footnote{Note, this is a copy of the OP's
\TODO{That is, the one asking the question}
text}, I like to 'mark up'
draft/partial text (e.g., short summaries of what will go in a section
\TODO{I am using the TODO macro for longer notes that do not fit into a single
line, or are otherwise inconvenient to make short}%
) so that I can clearly see what needs to be adjusted. I know that things like the todonotes package exist (see this question, for example), but I want something
that can span arbitrary parts of the document (e.g., multiple paragraphs or even sections with whatever text is in there).
I have been using the color package's \verb|\color| 'switch' to do this
\TODO{I presume you actually meant that you are using the \textsf{xcolor}
package, since it improves upon the functionality of the former package.}%
(with an alternate \verb|\textcolor| based command for short inline bits of text), with commands like this:
\begin{verbatim}
\usepackage[usenames,dvips]{color}
\newcommand{\todo}[1]{\textcolor{Purple}{#1}}
\newcommand{\startToDo}{\color{Purple}}
\newcommand{\stopToDo}{\color{Black}}
\end{verbatim}
However, this has problems in various situations (such as footnotes, URLs, tables), some dependent on the particular other packages used. (See this question and this one.)
Does anyone have any ideas on a robust alternative I could use? I would prefer not to use marginal lines (as used to indicate changes) so that it is clear exactly which bits of text, figures, etc. are included. Differently-coloured
text was the obvious choice for me.
\showTODOs
\end{document}
