[Tex/LaTex] Create a “List of Effective Pages”

changesmacrosprogrammingrevision controltable of contents

I am considering learning Latex in order to more easily maintain a bunch of manuals for my company. One of the requirements is to have a "List of Effective Pages" towards the beginning of the document which is a list of every page in the document and the revision level and date for that page. (Note that this is a requirement of our regulatory oversight so is not optional.) Optionally, I would (really) like to combine pages with the same revision level into one line like in the example below.

For instance:

PAGE NUMBER      REVISION NUMBER     REVISION DATE
  i - ix              2                03/23/10
   1-1                2                03/23/10
1-2 - 1-10            1                06/15/09
2-1 - 2-19            0                01/31/09 

While I have searched this site and Google, I have not found a solution to this particular aspect of our manuals. Can anyone point towards a way to accomplish a List of Effective Pages?

EDIT
For a little more background and to respond to some of the comments, this is indeed for required manuals in the aviation industry. Also, we do typically use chapter specific page numbers to help minimize the impact of adding a new page. (I have updated the example above to reflect this.) Also, the table of contents, list of effective pages, etc are all in the introduction section of the document, and start with roman numeral page numbers so that adding an additional page does not impact the rest of the document.

I am a programmer (very active on SO) so when I say that I am considering learning Latex, I don't have an issue with learning the macro programming aspects as well, and would happily give my code back to the community. I'm just trying to determine if it is even feasible with the limitations of the system and, if it is, I would like some guidance from more experienced individuals to get headed down the right path.

Best Answer

It sounds like you're going to have to be nearly as attentive of page breaks as Knuth has been of line breaks in updating the TeXbook.

However, since you actually have things to track about each page, I think you may want to use a macro like \pagerevision{<rev>} for each page break, and set things up so that pages won't break anywhere else without a warning. You might also want to include the date there, though that would mean duplication, and it wouldn't be a terrible idea to include the full intended page number there either (so you can compare it with the actual page number later).

You'll probably want to read up on at least these:

  • how TeX builds pages: see chapters 15 and 23 of the TeXbook

  • LaTeX's output routine

  • \addcontentsline, which will show you how to store the information you need for the next pass through the document.