4

I recently discovered the todonotes package. It would be great to somehow check the notes as done. I know the creator has this on his "todo list" (funny), but right now its not implemented. My idea was to hide it in the document and to strike it out in the listoftodos. Below you see a minimum working example. This is how I do it now.

Thanks for the help in advance!

\documentclass[a4paper,12pt,captions=tableheading,abstracton,
%draft,
%final,
headsepline,bibliography=totoc]{scrreprt}

\usepackage{ulem}
\usepackage[obeyFinal,textsize=footnotesize]{todonotes}
\newcommand{\addref}{\todo[color=red!40]{Add reference.}}
\newcommand{\done}{\todo[disable]{Test}
}%this shouldnt show up in document and be striked out in listoftodos



\begin{document}
\listoftodos\clearpage
\todo{ToDo}

\addref{addRef}

\done{Done}
\end{document}

In an older version of the question I also asked for the color in listoftodos. This is not the case anymore.

0
2

I would suggest something like this. The idea is to add the striked out line in the list of todos manually.

\documentclass{article}

\usepackage{ulem}
\usepackage{todonotes}
\newcommand{\addref}[1]{\todo[color=red!40]{Add reference.}}
\newcommand{\done}[1]{\todo[disable]{#1}\addcontentsline{tdo}{todo}{\sout{#1}}}

\begin{document}
\listoftodos

\section{Header}
Some text\todo{ToDo}.
More text that needs a reference\addref{paper}.
\done{Write text with reference}
\end{document}

The output looks like this.

example output

If you want to have the completed todos at the end of the list of todos (which was requested in a comment), the following approach can be used. The idea is to have a separate list of completed todos (.tdod instead of .tdo).

\documentclass{article}

\usepackage{ulem}
\usepackage{todonotes}
\newcommand{\addref}[1]{\todo[color=red!40]{Add reference.}}
\newcommand{\done}[1]{\todo[disable]{#1}\addcontentsline{tdod}{todo}{\sout{#1}}}

\begin{document}
\listoftodos
\makeatletter
\@starttoc{tdod}
\makeatother

\section{Header}
Some text\todo{ToDo}.
More text that needs a reference\addref{paper}.
\done{Write text with reference}
An extra todo, to show that things are ordered\todo{last todo}.
\end{document}

Here the output looks like

example output

4
  • This is awesome! Would it be possible to move all checkedoff tods to the bottom?
    – JulianWgs
    Aug 22 '17 at 12:03
  • I found this question, unfortunately it seems that it only works with LuaLaTeX: tex.stackexchange.com/questions/330485/…
    – JulianWgs
    Aug 23 '17 at 6:52
  • The acro package does have a sorting algorithm. So it should be possible to implement this in plain LaTex.
    – JulianWgs
    Aug 23 '17 at 7:04
  • Im using this now. Sorting would be nice, but is not mandatory. If someone else adds this feature, I will mark that answer as accepted.
    – JulianWgs
    Aug 29 '17 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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