Working with the new $chapnum and $volnum variables

With Frame 6 came two new variables that help you conveniently use chapter numbers and volume numbers in your books: $chapnum and $volnum. Because these two variables are functionally equivalent -- they vary only in name -- I will focus on $chapnum.

Note that the reader is expected to be Frame savvy and already familiar with numbering, sequence identification, and cross-references in FM5.

Summary

You can now use $chapnum in any location where you previously used an <n>-type counter for the chapter number. The number is controlled by the book and is unaffected by any <n>-type counters.

Paragraph tags

For example, say that your numbering properties for chapter titles look like "C:Chapter <n+>". In FM6, you can replace the n+ with $chapnum:

C:Chapter <$chapnum>

But as it turns out, you can make it even simpler. Because $chapnum is a variable, not a counter, it does not change within a file, so you no longer have to use the identifier for this tag:

Chapter <$chapter>

Now, say that your figures use a chapter-seqence form such as "Figure 3-6: Installation Wiring" for the sixth figure in chapter 3. Your FM5 tag might look like

F:Figure <n>-<n+>: 

Like the previous example, you can replace the first <n>. Whether or not you still need the identifier depends on other counters, just as it did in FM5:

F:Figure <$chapnum>-<n+>:

Cross-references

Cross-references can easily pull the $chapnum from the source. So for "see Chapter 3, Installation" your FM5 reference might have been

see Chapter <$paranumonly[Title]>, <$paratext[Title]>

but in FM6 you could use

see Chapter <$chapnum>, <$paratext[Title]>

Controlling numbering

In FM5, you had to concern yourself with numbering that started over with 1 for each chapter, and numbering that continued. The hassle is that if you told the book file to restart then all tags must restart; thus, if your book used some of both, you may have had to play tricks with using a few <n=1> tags. In FM6, $chapnum stands alone and is controlled by the book. Further, you can set it to

Table of contents

In FM5, you used the book file to add a prefix. In FM6, you use the $chapnum where ever you want it to appear:

Chapter <$chapnum>: <$paratext[ChapTitle]>............<$pagenum>

See also...

Indexing different numbering styles