diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex')
-rw-r--r-- | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex new file mode 100644 index 0000000000..df607835f8 --- /dev/null +++ b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex @@ -0,0 +1,38 @@ +\documentclass{book} + +\usepackage{todonotes} +\usepackage{lipsum} +\makeatletter +\def\myaddcontentsline#1#2#3{% + \addtocontents{#1}{\protect\contentsline{#2}{#3}{see \thesection\ at p. \thepage}{}}} +\renewcommand{\@todonotes@addElementToListOfTodos}{% + \if@todonotes@colorinlistoftodos% + \myaddcontentsline{tdo}{todo}{{% + \colorbox{\@todonotes@currentbackgroundcolor}% + {\textcolor{\@todonotes@currentbackgroundcolor}{o}}% + \ \@todonotes@caption}}% + \else% + \myaddcontentsline{tdo}{todo}{{\@todonotes@caption}}% + \fi}% +\newcommand*\mylistoftodos{% + \begingroup + \setbox\@tempboxa\hbox{see 9.9 at p. 99}% + \renewcommand*\@tocrmarg{\the\wd\@tempboxa}% + \renewcommand*\@pnumwidth{\the\wd\@tempboxa}% + \listoftodos% + \endgroup +} +\makeatother + +\begin{document} +\chapter{My first chapter} +\section{A first section} +\lipsum +\todo{This is a note} +\section{Another section} +\lipsum +\todo{This is another note} + +\tableofcontents +\mylistoftodos +\end{document} |