I use the todonotes
package extensively to mark and comment my projects. So, for a large project, I have dozens of todo-notes and the list of todos, which I insert at the beginning of a document, get's very cluttered.
I'm looking for a way to group the list of todos by chapter, so essentially something like:
List of Todos
Chapter 1
Chapter 1 note ... 2
Chapter 1, section 1 note ... 2
Chapter 1, section 2 note ... 3
Chapter 2
Chapter 2, section 1 note ... 4
Chapter 2, section 2 note ... 4
The following MWE gives a starting point for modification:
\documentclass{scrreprt}
\usepackage{todonotes}
% \usepackage{classicthesis}
\usepackage{tocloft}
\usepackage{lipsum}
\usepackage[colorlinks=true,linktocpage=true]{hyperref}
\begin{document}
\listoftodos
\chapter{My first chapter}
\lipsum[1]
\todo{Chapter 1 note}
\section{A first section}
\lipsum[1]
\todo{Chapter 1, section 1 note}
\section{Another section}
\lipsum[1]
\todo{Chapter 1, section 2 note}
\chapter{My second chapter}
\section{A first section}
\lipsum[1]
\todo{Chapter 2, section 1 note}
\section{Another section}
\lipsum[1]
\todo{Chapter 2, section 2 note}
\end{document}
This post tries something similar, but just adds the section next to the page number, which would not remove the clutter I have.
I'm using the classicthesis
template which uses titlesec
for tableofcontents appearance, in case it matters. A second point would be to remove the "dots" in the list of todos. I believe todonotes
formats the appearance with this command:
\newcommand{\l@todo}
{\@dottedtocline{1}{0em}{2.3em}}
but I don't know how to modify it to remove the dots and show page numbers at the end of each TOC entry.