2

I am keeping something like a diary, that helps me keep track of things that I am working on. Occasionally there are some actions (To do's) that need to be taken, which I would like to keep on the first page of the document (or some other predefined area). Ideally this list of actions would be sorted inverse to the sequence in which they appear in the text.

How would one go about creating a command that would achieve this? Ideally, this command would be in the format like:

Some text blah blah blah
\mynewcommand{Finish reading the document} 
Yet more text
3
  • 3
    Maybe have a look at the todonotes package and its \listoftodos? Commented Sep 11, 2023 at 12:58
  • 1
    The gist: Things that are to be listed separately during the LaTeX-run can be written to some external text file which in turn can be processed via \input at whatever place of the document you like. E.g., the \@starttoc/\addtocontents/\@writefile--mechanism of the LaTeX 2e-kernel which underlies \tableofcontents, \listoffigures, \listoftables etc etc. Actually things to be listed separately can be considered records of a database. ... Commented Sep 11, 2023 at 19:03
  • 1
    ... So you could as well use the datatool-package, maintain a "database where records get written to" and which at the end of the LaTeX-run is written into a .csv-file. At the begin of the LaTeX-run the .csv-file, if existing, is imported as a "database where records can be read". So actually you have two databases, one for reading, another one for writing. The database for reading is available throughout the whole LaTeX-run, e.g., for iterating it and creating listings of some of its entries.You might be interested in Use LaTeX to produce parts lists? Commented Sep 11, 2023 at 19:05

1 Answer 1

1

Thanks samcarter-is-at-topanswers-xyz, \listoftodos effectively solves my question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .