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:

  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?

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.

  • 8
    How do you connect up the dates/revisions with pages? This seems like an odd concept, since a page is not a logical part of a document. For example, if revision 1 of page 1 adds a page, and now the old page 2 begins on page 3, does the revision number of the old page 2 (and its associate date) have to change as well? If not, how does this work?
    – Alan Munn
    Aug 7, 2013 at 18:51
  • 2
    @Alexander Unfortunately this won't work, since the source document (which latexdiff would operate on) has no concept of the page.
    – Alan Munn
    Aug 7, 2013 at 23:01
  • 3
    @Alexander I've seen this before, and essentially enough blank space is added at the end of a section/chapter that for a reasonable document lifetime, addition will be swallowed there. Also chapter-wise page number can be used, so adding a lot of text to page 1-11 would create a new page 1-12, the next page would still be 2-1 and unchanged. As the change log is at the beginning of the document, and can only ever grow, it will have this effect itself, so may start on page 0-2 after a page 0-1 title page, for example.
    – Chris H
    Aug 8, 2013 at 8:01
  • 3
    Would it be feasible to mark changes in the document with macros like \change{<rev>}{<date>}...\endchange? This way it would be quite feasible to calculate the "most recent change" for any page. Dec 11, 2013 at 11:18
  • 1
    Yes, I'll try to make a suggestion during my christmas holidays ;-) Sorry for not answering earlier. Dec 27, 2013 at 4:26

2 Answers 2


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.


I think the easiest solution would be to couple the compilation of the latex file with an external program. I would do this:

  • separate the file in different files (as many as you want to track separately), join them in the main tex file (the include command is optimal for chapters, while input can be used recursively).
  • use the fancyhdr package to get the numbers with the chapter number included.
  • get the "last modified date", you can run an external script, or in latex itself (see here) but I think is better to handle it externally, because eventually you can get information from some other revision control system, like git.
  • add the annotation of the date to the toc (see here).

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.