| November 2003 | |
|
FrameMaker: Chapter Template Numbering, Part 2 |
|
| Contact Matt |
Last month I talked about the prep work I do when I set up the numbering for a chapter template. For a look at that material, see http://www.stc-sd.org/newsletter/october_2003/techissues.htm . In that article,
the screen capture is a little tough to read. The PDF includes:
Working out the Codes Now, on with the process: using the same Paragraph Format names as my sample files. ChapterTitle Chapter numbering is one of the easiest codes to use, as it is explicitly defined as the system variable <$chapnum>. This variable is controlled by the Numbering dialog box available from both chapter and book files.
Heading1 The first portion of the heading uses the chapter number variable, so we start with <$chapnum>, which returns the current value of our chapter. Following that with a period (just plain text) and the code for incrementing our section numbers and, finally, the code for a tab gives us <$chapnum>.<n+>, \t. Note: The first time Frame runs into a numbering code, Frame will give it a default value of 0 if not otherwise specified. The <n+>, code says, "add a unit to the previous value of the variable, and display it as a numeric." Because Frame has no previous value for this code in Section 1.1, Frame assigns 0, giving us 0+1, or a value of 1. In subsequent sections, we pick up the previous value, increment, and display the incremented number. When we got to the Heading1 paragraph, we needed to start establishing a routine for working out the codes in subsequent numbers. Here is where my four questions come in. After the chapter number and period, ask yourself:
In this case, it does, so we then ask:
Because it does, we use an increment code of <n+>, which not only increments but displays the value as a numeric. Note:
We could also have displayed the resulting value as Roman numerals (R
or r) as alphas (A or a)
in the place of the n.
Because our value does reset, we'll need to answer the final question:
Because our Heading1s reset at the beginning of the chapter, we can use our book-numbering dialog box to reset paragraph numbers, ensuring that each chapter will have an x.1 as its first section (where x is the current chapter number).
Heading2 In my Heading2 example, 1.2.3\t Sample Text, we first need the chapter number, again, <$chapnum>, followed by a period. Going through our questions again, we need to display our second-level autonumber, but we don't need to increment or reset it. This brings up our display code, followed by a period. For the Heading2 code, our questions lead us to the <n+> building block, again, resulting in <$chapnum>.<n>.<n+>\t Note: There are three bracketed codes to get us out to the third-level autonumber, which is our Heading2. We know that, because the Heading2 resets, we need a reset code, < =0>. We also know that the Heading2s reset every time we encounter a Heading1 in our document. This leads us to change the Heading1 code to <$chapnum>.<n+><n=0>\t Wrapping Up for Now Sorry for the long-winded article (Parts 1 and 2). I thought two months would give me enough space to tackle this subject, but I started running long halfway through the "Heading2" section. I'll do my best to finish up with Part 3 next month. Which leads me to an old joke: Question: How do you keep 200 tech writers in suspense? Answer: Tell you next month! |
| Return Home |
|