Indexing different numbering styles


With the introduction of Frame 6, several important changes were made to numbering, particularly to the way one does chapter-page numbering. One of these changes was that Frame introduced two (quite handy) variables called $volnum and $chapnum, and they removed the (tedious) method of setting up chapter numbering in generated files such as tables of contents and indexes. These variables are explained in more detail in "Working with Frame's new variables"; here, I will discuss the impact of those variables on indexing.

Before Frame 6, you used the book files to instruct generated files to place, for example, the chapter number and a dash in front of page numbers for any given file. For example, you told the book "for chapter 3, place a 3 and a dash in front of it." This is gone in Frame 6; instead, these prefixes are constructed on the fly by grabbing the $volnum and/or $chapnum from the files the reference points to.

The problem is that generated files like indexes no longer know how to deal with different kinds of chapters. For example, say you have a book set up as the following:

File Numbering Setup
TOC lowercase roman (ii, iii, iv)
preface lowercase roman, page numbering follows TOC
Chapter 1 chapter-page number style; arabic, starts at 1 (1-1, 1-2, etc.)
rest of chapters Follows chapter 1 style (2-1, 2-2, 3-1, etc.)
Appendix A-1, A-2, B-1, etc.
index Index-1, Index-2, etc.

The problem with an index, for example, is that if your page number entry (paragraph tag IndexIX) looks like <$chapnum>-<$pagenum>, then all of your page numbers will try to look like this. If your index markers only come from the numbered chapters, then you are okay, but if there are markers in the preface then you will end up with entries like

      sequence of 3-4
      with other products -iii


The solution for indexes is to create unique index markers for each "look" of page number. In this example, you need two: one for pages with prefixes and one for single page numbers:

Pages using prefixes Pages using single numbers
File Type Example File Type Example
main chapters 1-1, 2-3 preface iii, iv
appendix A-1, C-2

Thus, you will have one marker called Index, which is the Frame default, and another one named of your choice (Index2, for example). When you assign your markers, you use one marker for one type of page number and one for the other (I would use the default marker for my main chapters). Then, when you create your index, you will include both markers:

When you do a generate, you will need to go to the reference page and set up two entries:

It's fair to ask, "why don't you need one marker for the chapters with letters, like Appendix A-1, and one for the chapters, like Chapter 3-1, to distinguish between numbered chapters and lettered appendices?" The reason is that the building block is just "chapter number, dash, page number." Frame does not care that the chapter number of a main chapter is a number and the chapter number of an appendix is a letter -- Frame just grabs whatever it finds in the $chapnum variable and runs with it.

See also...

Working with Frame's new variables