Auto-numbering questions

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Terence
Jr. Propeller Head
Posts: 8
Joined: Mon May 06, 2013 7:57 am

Auto-numbering questions

Post by Terence »

Hi, I have a few autonumbering headaches that I've been struggling with. Can anyone help? These styles will be used primarily for PDF output.

1. What would be a good way to display footer page numbers in Roman numerals? I'm trying to make a page layout for front matter (disclaimers, etc) that displays some legalese in the footer along with the page numbers in roman numerals, and then have the body pages of the document contain a different footer that displays (among other things) the page number in digits. I currently have the PageNumber variable where I want it to be, but I don't know how to get it displayed in Roman numerals.

2. What would be a good way to make figure captions use the following numbering format?
<chapter number>-<heading 2 number>-<figure number>

For context, my numbering styles are currently in the following format:
h1: {chapnum} (e.g. 1)
h2: {chapnum}.{n+} (e.g. 1.1, 1.2, etc.)
h3: {chapnum}.{n}.{n+} (e.g. 1.1.1, 1.1.2, etc)

So if I was inserting multiple figures under an h2 that said "1.3", I want my figure captions to read something like "Figure 1-3-1", "Figure 1-3-2", and so on. Can I do this? If it makes a difference, I also want to use a similar numbering scheme for table captions.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering questions

Post by Nita Beck »

In answer to your first question, you tell Flare what number format to use by setting the properties of the first TOC item on your TOC that will begin using numbers of that format. So say you want to begin using Roman numbers with what will be page ii of your print document. On my TOC, I have a TOC item called "Inside Title Page". I right-click that item on the TOC, and then on the Printed Output tab under Page Number, I have the Reset to field set to "2" and the Format field set to "roman (i, ii, iii). Everything that follows this page on the TOC will increment the page number from there in the selected format. Then for the first TOC item (in this case, a book) that will begin the first chapter, I reset the Page Number to 1 and change the Format to "decimal (1, 2, 3)".

This forum post might also yield some advice: http://forums.madcapsoftware.com/viewto ... 47&p=79857

In answer to your second question, here are some relevant topics from the Flare 9 Help:
http://webhelp.madcapsoftware.com/flare ... amples.htm
http://webhelp.madcapsoftware.com/flare ... Output.htm

If you still need advice, post back.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Terence
Jr. Propeller Head
Posts: 8
Joined: Mon May 06, 2013 7:57 am

Re: Auto-numbering questions

Post by Terence »

Thanks for the help!

First question worked out fine. Footers in my front matter are now correctly displaying in roman numerals. Thanks :)

As for the second question...I looked over the help files, but I still can't figure out how to do what I'm trying to accomplish. I want the first two digits in my figure captions to display the numbering used in the H1 and H2 styles before it, with the last digit incrementing according to the number of figure captions inserted. At the same time, I don't want the number of figure captions to affect the numbering used in any h1/h2/h3 styles used after the figure caption.

For example, when inserting an image under a heading 3 that contains the numbering 2.2.2, I want inserted figure captions to have the numbering 2-2-1, 2-2-2, 2-2-3, etc. But after these figure captions (regardless of how many figures were inserted under heading 2.2.2), I want the next heading 3 to display the number 2.2.3.

As another way to illustrate my example, I'm trying to make the numbering scheme look like this:

1 Heading 1
1.1 Heading 2
1.1.1 Heading 3
1.1.2 Heading 3
Figure 1-1-1 - First figure in section 1.1
Figure 1-1-2 - Second figure in section 1.1
1.1.3 Heading 3

1.2 Heading 2
1.2.1 Heading 3
Figure 1-2-1 - First figure in section 1.2
Figure 1-2-2 - First figure in section 1.2
1.2.2 Heading 3


I can't figure out a way to do this in the autonumbering commands.
Terence
Jr. Propeller Head
Posts: 8
Joined: Mon May 06, 2013 7:57 am

Re: Auto-numbering questions

Post by Terence »

Still struggling with the figure caption counter.

I tried to approach this with another method by using the {Cn} counter as it seemed like something I could use. So right now, the autonumbering on my headings looks like this:

H1:
{chapnum}
H2:
{chapnum}.{Cn+}
H3:
{chapnum}.{Cn}.{n+}

For figure captions, I'm using a p.FigureCaption style with the following autonumbering setting:
CF:Figure {chapnum}.{Cn}.{n+}

The headings are numbering properly with this, but the figure captions are not. This is what I'm getting so far:
figurecaptions.png
Can someone please help? I'd really like to get this working soon.
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Auto-numbering questions

Post by LTinker68 »

The problem is that the auto-number placeholders (e.g., {n+}) are tied to the "ID" of the sequence. For example, the "F" in your figure caption code is its ID, and you might have a table caption that has an ID of "T". They both use the auto-number placeholder {n+}. It's that ID letter that keeps your sequence for figure captions separate from your sequence for table captions. So the next number for a figure could be "8" and the next number for a table could be "3", even if the table immediately follows the figure.

The reason what you're trying to do won't work is because you have different IDs for your headings than you do for your figures, so even though they both use {Cn}, it's keeping their numbering separate. The only way to get the effect you want is to assign the same ID to both the headers and the figures. The problem with that is that the {n+} at the end of your figure code will increment the same {n+} used by H3, so you could end up with...

1 Heading 1
1.1 Heading 2
1.2.1 Heading 3
Figure 1.2.2
Figure 1.2.3
1.2.4 Heading 3

So there's no way to do what you want to do unless you change that last number in the figure for a different placeholder, like {a+}. So if your IDs for headings is "H", then your figure setup would be something like CH:Figure {chapnum}.{Cn}.{n}{a+}. If you did that, then you'd end up with...

1 Heading 1
1.1 Heading 2
1.2.1 Heading 3
Figure 1.2.1a
Figure 1.2.1b
1.2.2 Heading 3

So that option would work as long as you have no more than 26 figures in one section. I have no idea what Flare does when it gets to the letter "z"; I don't know if it would restart at "a" or go to "aa".

I should mention the above is in theory -- I haven't actually tried tying headings and figures to the same sequence, and I don't use the chapnum and Cn placeholders, so I don't have a test project set up to test this in.

Oh, and if your figures would come at different levels, then you'll need to create multiple figure setups. So the above would be used with figures after H3 tags, and you'd have to add another setup for figures that follow H2 tags, etc. CH:Figure {chapnum}.{Cn}{a+}, for example.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Terence
Jr. Propeller Head
Posts: 8
Joined: Mon May 06, 2013 7:57 am

Re: Auto-numbering questions

Post by Terence »

Thanks!

Your suggestion works fine:

H1:
{chapnum}

H2:
CH: {chapnum}.{Cn+}

H3:
CH: {chapnum}.{Cn}.{n+}

p.FigureCaption:
CH: Figure {chapnum}.{Cn}.{n}{a+} -
figurecaptions_1.png
And to answer your question, after 26 instances of this type of numbering, it goes to "aa", "ab", "ac", etc. Maybe I could use roman numerals or something to avoid this.

The figure caption numbering resets after each instance of a heading 3, which is unintentional (we wanted it to reset after each instance of a heading 2), but may still be okay for us as it is. Is there a way to get the figure caption numbering to reset after each instance of a heading 2? I messed around with the settings, but couldn't get it working. I'll keep trying in the meantime.
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Auto-numbering questions

Post by LTinker68 »

Terence wrote:The figure caption numbering resets after each instance of a heading 3, which is unintentional (we wanted it to reset after each instance of a heading 2), but may still be okay for us as it is. Is there a way to get the figure caption numbering to reset after each instance of a heading 2? I messed around with the settings, but couldn't get it working. I'll keep trying in the meantime.
No, that's where I said (I think I wrote this) that you'd need to create a second figure class for that situation. So you'd apply one figure class if the figure is following H2, and the other figure class if the figure follows H3. So you'd have something like:

H1:
{chapnum}

H2:
CH: {chapnum}.{Cn+}

p.FigureCaptionH2:
CH: Figure {chapnum}.{Cn}{a+} -

H3:
CH: {chapnum}.{Cn}.{n+}

p.FigureCaptionH3:
CH: Figure {chapnum}.{Cn}.{n}{a+} -

That should in theory give you:
1 Heading 1
1.1 Heading 2
Figure 1.1a - Figure Caption
Figure 1.1b - Figure Caption
1.2 Heading 2
1.2.1 Heading 3
Figure 1.2.1a - Figure Caption

I haven't tried something like that before, hence the emphasis on "in theory". I think it will keep the {a+} separate, but test it.
Terence wrote:And to answer your question, after 26 instances of this type of numbering, it goes to "aa", "ab", "ac", etc. Maybe I could use roman numerals or something to avoid this.
Or break your sections up more so you don't have so many figures following a heading.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply