# Todonotes, inline with no decorations

I would like to use the todonotes package, but when I do inline todos, I don't want them to look any different. At the end of the document, I will list all the todos with \listoftodos and there they will be. I don't want attention called at the originating point in the document.

I know I can use \todo[disable]{this is a todo}, and it won't show the todo in the body text, but I want it to show the normal text of the todo inline. Currently, I'd have to type it out again, like \todo[disable]{this is a todo} this is a todo for it to display the text of the todo. Can this be done without repeating myself?

Example:

This is a paragraph of text. \todo[noformat]{There are some things I need to do} for this.


should render to

This is a paragraph of text. There are some things I need to do for this.


with the list at the end

Todo list

There are some things I need to do . . . . . . . . . . . . . . . . . . . 1


Can this be done?

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]{%
\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}}{%
\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}


• Works perfectly! I modified your code a little, but it's great for someone who's new to writing commands. Thank you. – tralston Apr 15 '16 at 1:21
• @tralston Thanks so much. Glad to help and best wishes! – Steven B. Segletes Apr 15 '16 at 1:26

I think maybe the todo package might be more suited. With the \todo*, you can create a quite todo which will not show up in the text but would still show up in the list. nd to generate a todo list, you can call the \todos command. Click here for an example file.