I'm working out notes from a meeting in LateX. During the meeting I write down so called "todo's" (not to confuse with the todo package). I use my own command TD to simplify my layout, it basicly comes down to this :

\newcommand{\TD}[2]{ToDo \textbf{#1} : #2 }

Where#1 is the persons name, and #2 what he or she has to do. At the end of my file I want to generate a complete list of all the ToDo's that accumulated along the notes, a bit like a list of symbols for instance. How can I make this ? If possible I want to list them by person, and then use subitems to list all their todos.

Thank you very much

  • If my solution fits you needs consider to accept it please – user31729 Nov 28 '15 at 19:11

Improved code with 'grouping' of persons and hyperlinks (if needed)




  \expandafter\newwrite\csname tf@#1\endcsname
  \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax


\newcommand{\listoftodosname}{List of persons who should do something}

\seq_new:N \l__todotoc_personnames_seq

  \tl_set:Nx \l_tmpa_tl {#1}
  \tl_if_empty:NTF \l_tmpa_tl {%
    \tl_set:Nn \l_tmpb_tl {\NoNamePerson}
    \tl_set:Nx \l_tmpb_tl {#1}
  \tl_set_eq:NN  \l_tmpa_tl  \l_tmpb_tl % Copy the 'real name'
  \seq_if_in:NVTF \l__todotoc_personnames_seq {\l_tmpa_tl} {
    \seq_map_inline:Nn \l__todotoc_personnames_seq {%
      \str_if_eq_x:nnT {##1} {\l_tmpa_tl} {% 
        \seq_map_break: % Break out, we've found the number
    }% End of mapping
    \seq_put_right:NV \l__todotoc_personnames_seq {\l_tmpa_tl}
  \seq_remove_duplicates:N \l__todotoc_personnames_seq


  \marginnote{ToDo \textbf{#1} : #2}%
  \AddPersonName{#1}{#2}% Adding the name to the list

  % Now get all the person specific toc files
  \ifnum\value{dummycounter} < \numexpr\totvalue{personcounter}+1
  \latex@starttoc{\@arabic\c@dummycounter todo}%

\usepackage{blindtext} % Just to produce text
\providecommand{\phantomsection} % If hyperref is not used!



\TD{Groucho}{Slap Harpo}
\TD{}{Improve this document}
\TD{Harpo}{Slap Chico}
\TD{Chico}{Slap Gummo}
\TD{Gummo}{Slap Zeppo}
\TD{Zeppo}{Slap Groucho properly until he will slap Harpo properly and that one will slap Chico}
\TD{Groucho}{Smoke a cigar}
\TD{}{Improve this code}


enter image description here

| improve this answer | |
  • Thanks for the superquick answer ! but I might have been a bit unclear in my question. I write down todos's as my notes go, at the moment they were decided in the meeting, and what I am actually looking for is a code that generates a kind of summary of all the todo's, just like this one, but I want to avoid copying them all maually in the table, there are like 30 of them and I'll have to do this every week. – Libel8 Nov 26 '15 at 20:38
  • @Libel8: What manual copying? Call the \TD command and it is added automatically to the table? – user31729 Nov 26 '15 at 20:55
  • Oh ok I don't fully understand the code then, my bad ! I'll try it out and play with it to see how it works, Thanks ! – Libel8 Nov 26 '15 at 21:05
  • Oh, whoops, I get it now, I missed the end of the code ^^' – Libel8 Nov 26 '15 at 21:08
  • @Libel8: Alright ;-) I leave the design of the list to you, especially the formatting of entries, which is done by \persontoctext and \addcontentsline. – user31729 Nov 26 '15 at 21:10

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.