Skip to main content
Inspiring
September 17, 2018
Answered

Table autonumbering - without using $Chapnum

  • September 17, 2018
  • 3 replies
  • 1177 views

Is there a way to autonumber a set of tables to look like Table 1-1, Table 2-2 (etc) without using $chapnum variable? Currently using an <n+> series for Headings (1, 2 etc) and just need to mirror this without using $Chapnum. Heading 1 is set as H:<n+>\   , Heading 2 is set as H:<n>.<n+>\   and so forth. The table autonumbering needs to mirror this. Have only seen set ups for $chapnum variable, but can't use chapnum for this instance. Thx.

This topic has been closed for replies.
Correct answer Lynne A. Price

If you want to use the chapter number at the beginning of both chapter titles and table titles, you'll either have to use <$chapnum> (or one of the parallel building blocks such as <$sectionum>) or the same sequence in your chapter/section autonumbers and your table autonumbers.

You are currently using H: for chapters and T: for tables. H: works fine for chapters and sections. But your table numbers are not related to the chapter number and you want them to be. As you've noted, if you use T:<n>-<n+>, the first number never changes and the second one never restarts. And if you use T:<n+>-<n+>, both numbers change with every table.

You can get the behavior you want as I described yesterday by using the H: sequence for both sections and tables. Just make sure you have one building block (<n>, <n+>, or < >) for every counter whether for a section or a table) in every autonumber except the one for Chapter. Chapter autonumbers need only the first counter and will therefore result those for sections and tables.

           --Lynne

3 replies

Inspiring
September 17, 2018

Hi, User, I'm just guessing, but is the problem that you want to number Tables consecutively throughout a Chapter, regardless of the section that contains them? In particular, when you start a new section (Heading 2), you want to restart the counter for subsections (Heading 3), but not the counter for tables?

FM autonumbers can contain any number of counters in each sequence. Any counter not mentioned in an autonumber is reset to 0. Suppose you have a maximum of five heading levels. You can maintain multi-part heading levels in one sequence as you have suggested, with autonumbers such as:

H:<n+>, which adds one to the first counter and displays it as an Arabic numeral and resets all following counters to 0

H:<n>.<n+>, which displays the current value of the first counter as an Arabic numeral, adds one to the second counter, and displays it as an Arabic numeral

H:<n>.<n>.<n+>, which displays the current value of the first counter, a period, the current value of the second counter, another period, and then adds one to the third counter

The letter n inserts an Arabic numeral, the letter a inserts a lowercase letter, an r inserts a Roman numeral, and so forth. One symbol that can be used in these building blocks is a space, which lets you reset or preserve a counter without displaying anything.

Suppose you have a maximum of 5 heading levels. You can use the first 5 counters for headings at different levels. But then you can use the 6th counter for tables and, if relevant, the 7th counter for figures. And you can define dependencies among the first 5 but leave the last two pretty much independent. In particular, your autonumbers can be:

Heading 1 - H:<n+>

Heading 2 - H:<n>.<n+>< =0>< =0>< =0>< >< >

Heading 3 - H:<n>.<n>.<n+>< =0>< =0>< >< >

Heading 4 - H:<n>.<n>.<n>.<n+>< =0>< >< >

Heading 5 - H:<n>.<n>.<n>.<n><n+>< >< >

Table        - H:<n>< >< >< >< >-<n+>< >

Figure       - H:<n>< >< >< >< >-< >< n+>

Here, Heading 1 uses the first counter and resets all the others. The other Headings display the numbers of all containing sections, reset the numbers for contained sections, and preserve the counters for tables and figures. The table and figure autonumbers display the counter for the first level heading, preserving the counters for other headings without displaything them, and display either the table or the figure number, preserving the other one.

Hope this makes sense,

    --Lynne

Inspiring
September 18, 2018

Thanks Lynne - thank you so much for the detailed response. This is extremely helpful.

I think its the opposite of what you're saying - if I understand your post correctly.

Heading 1 is set to: H:<n+>\ 

Heading 2 is set to H:<n>.<n+>\ 

Table Title is set to T:Table <n>-<n+>: 

This works perfectly for Heading 1 and Heading 2, 3 etc for the first round (1 Chapter Title, 1.1 Heading 2, etc)

But when I get to the second round of Heading 1's (2 Chapter Title, 2.1 Heading 2 etc) it makes it Table 1-5, Table 1-6. I think I have to use T:Table <n+>-<n+>:  bit when I set it to that I get Table 2-5 instead of 2-1.

Not certain the proper way to sequence this -  all the examples and videos I've seen seem to use $chapnum, which works fine, but unavailable for this instance.

Thanks.

Lynne A. PriceCorrect answer
Inspiring
September 18, 2018

If you want to use the chapter number at the beginning of both chapter titles and table titles, you'll either have to use <$chapnum> (or one of the parallel building blocks such as <$sectionum>) or the same sequence in your chapter/section autonumbers and your table autonumbers.

You are currently using H: for chapters and T: for tables. H: works fine for chapters and sections. But your table numbers are not related to the chapter number and you want them to be. As you've noted, if you use T:<n>-<n+>, the first number never changes and the second one never restarts. And if you use T:<n+>-<n+>, both numbers change with every table.

You can get the behavior you want as I described yesterday by using the H: sequence for both sections and tables. Just make sure you have one building block (<n>, <n+>, or < >) for every counter whether for a section or a table) in every autonumber except the one for Chapter. Chapter autonumbers need only the first counter and will therefore result those for sections and tables.

           --Lynne

Matt-Tech Comm Tools
Community Expert
Community Expert
September 17, 2018

Yes, you can still use the Fm5.0-style numbering.

Basically, you can use one or the other (the <$chapnum> style) but not both.

It looks like you need to either adjust your <n+> blocks to <$chapnum> or vice versa.

-Matt

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
Inspiring
September 17, 2018

Using FM 2015 in case it matters.