0

This is supposed to be a part of: Calendar instead of table of contents.


Situation

As mentioned I want to create a calendar-ish table of contents. The link to the heading (of eg. a chapter) should be the same as in ordinary ToC's. In order to be able to place references inside the calendar, one must know where (or when) the entry belongs (corresponds to).

In order to make usage easier, the automatism should be able to insert the current date without the necessity to enter the current date (assume you create a diary-entry for that current day). Therefore I have this problem:

Problem

If I am using the \today command on different days, obviously, the displayed date changes. Manually typing the date is possible as long as some user creates a file and knows which date to insert. At most this will be cumbersome repetitive work.

However, I am planning to use this in a general piece of code, where I will not know in advance which dates to insert.

Question

How does one insert some text (like the current date) into the source-file at compile time?

  • or at least some auxiliary file; this would be more error prone, as it could easily be confused and deleted
  • if possible without external scripts invoked via shell escape
  • could this also be dependent on other circumstances ? (eg. "option in command provided"; I am thinking of an optional argument for the date, which is auto-set, if not provided)
BadAtLaTeX
  • 1,139
  • Since TeX does not change the source file, it seems to me an answer to your question would point you in the direction of some sort of revision-control system superstructure, by which you manage your source file developments. – Steven B. Segletes Oct 06 '17 at 16:03
  • 1
    You seem to try to solve the details before you even have a general working system. – Ulrike Fischer Oct 06 '17 at 16:12
  • @StevenB.Segletes : But ToC / ToF and such are also inserted with the help of an auxiliary file, so at least this approach should work. – BadAtLaTeX Oct 06 '17 at 16:43
  • @Ulrike FIscher : Well the general working system is in the linked question. This 'detail' feature is an important part imho. But you are right, I am about to investigate / ask, how to insert the necessary information into the aux; and also create the calendar. – BadAtLaTeX Oct 06 '17 at 16:43
  • Nothing in the linked question looks as if it wouldn't allow you to enter the date manually (or with a shortcut) in the source. And while it is possible to store a date at the first compilation I wouldn't recommend it, tex writes simple text files and they are easily lost or changed. – Ulrike Fischer Oct 06 '17 at 16:53

0 Answers0