Auto-numbering and Appendices
-
- Sr. Propeller Head
- Posts: 261
- Joined: Wed Apr 18, 2007 2:25 am
- Location: Nottingham, UK
Auto-numbering and Appendices
I need to set up autonumbering so that I get headings numbered as follows:
Appendix A (for H1)
A.1 (for H2)
A.2
A.2.1 (for H3)
A.2.2
A.3
Appendix B
B.1
B.2
B.3
etc, etc.
I'm sure this should be straightforward. Can anyone help?
Appendix A (for H1)
A.1 (for H2)
A.2
A.2.1 (for H3)
A.2.2
A.3
Appendix B
B.1
B.2
B.3
etc, etc.
I'm sure this should be straightforward. Can anyone help?
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
You'll need only to set up one heading style, for the h1, using the {chapnum} autonumber. Here's what mine looks like:
Then, for the TOC item for the first appendix, on the (TOC) Properties window's Auto-numbers tab under Chapter Number, reset to 1 and use the format of ALPHA (A,B,C).
For the other appendixes' TOC items, do the same, except don't reset to 1 but instead increment the number.
You won't need to have any special h2s and h3s, assuming that the current h2s and h3s you have are picking up the {chapnum}. They will pick up the appendix letter.
HTH. Post back if this is not enough details for you.
Code: Select all
h1.Appendix
{
mc-auto-number-format: 'Appendix {chapnum}. ';
}
For the other appendixes' TOC items, do the same, except don't reset to 1 but instead increment the number.
You won't need to have any special h2s and h3s, assuming that the current h2s and h3s you have are picking up the {chapnum}. They will pick up the appendix letter.
HTH. Post back if this is not enough details for you.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- Sr. Propeller Head
- Posts: 261
- Joined: Wed Apr 18, 2007 2:25 am
- Location: Nottingham, UK
Re: Auto-numbering and Appendices
Thanks Nita. I had hoped I could do this in a similar way to my normal section numbering (see below), but my current attempts are not working so I may have to resort to chapnum after all.
Code: Select all
h1
{
mc-auto-number-format: 'A:Section {Gn+}:{ =0} ';
}
h2
{
mc-auto-number-format: 'A:{Gn}.{Gn+} ';
}
h3
{
mc-auto-number-format: 'A:{Gn}.{Gn}.{Gn+} ';
}
h4
{
mc-auto-number-format: 'A:{Gn}.{Gn}.{Gn}.{Gn+} ';
}
body.appendix h1
{
mc-auto-number-format: 'O:Appendix {A+}:{ =0} ';
}
body.appendix h2
{
mc-auto-number-format: 'O:{A}.{n+} ';
}
body.appendix h3
{
mc-auto-number-format: 'O:{A}.{n}.{n+} ';
}
Re: Auto-numbering and Appendices
body.appendix wouldn't do anything unless you're actually applying a class called "appendix" to the body tag in the topic, which also wouldn't work, because it would get stripped out at build time and replaced with the body tag from the masterpage. Unless you've added a second masterpage and added the appendix class to the body tag in that masterpage and specified that masterpage for the appendix topics. Not sure if that would work or not.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- Jr. Propeller Head
- Posts: 3
- Joined: Thu Nov 19, 2020 12:46 pm
Re: Auto-numbering and Appendices
Nita- I have run across many of your posts in hunting for solutions to MCF questions as I work to learn the software. This one was so succinct and clear, I thought I'd just take the opportunity to say "thanks."Nita Beck wrote:You'll need only to set up one heading style, for the h1, using the {chapnum} autonumber. Here's what mine looks like:Then, for the TOC item for the first appendix, on the (TOC) Properties window's Auto-numbers tab under Chapter Number, reset to 1 and use the format of ALPHA (A,B,C).Code: Select all
h1.Appendix { mc-auto-number-format: 'Appendix {chapnum}. '; }
For the other appendixes' TOC items, do the same, except don't reset to 1 but instead increment the number.
You won't need to have any special h2s and h3s, assuming that the current h2s and h3s you have are picking up the {chapnum}. They will pick up the appendix letter.
HTH. Post back if this is not enough details for you.
Set this problem (lettered Appendices) aside last week because it was driving me crazy; started fresh today and after finding your post had it square in less than 5 minutes. Thanks again.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
Thanks for that feedback, Tom. So glad that I could help, even 7 years after my post!
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Auto-numbering and Appendices
I have an appendix numbering issue that is making me crazy. I tried the aforementioned method with chapnum, and it didn't work for me. Here's what I have.
h1.Appendix1: mc-auto-number-format: 'GN:Appendix {A+}{ =0}: ' ;
h2.Appendix2: mc-auto-number-format: 'GN:{A}.{n+}{ =0}: ';
However, when I go to the text editor for one of the H2.Appendix2 sections, I see this. <h2 class="Appendix2" MadCap:autonum="0.1: ">. and the 0.1 is what's being applied in the document. I have tried cutting that 0.1 code. I have tried entering a different value. It always reverts to auto-numbering of 0.1. What can I do to fix this?
h1.Appendix1: mc-auto-number-format: 'GN:Appendix {A+}{ =0}: ' ;
h2.Appendix2: mc-auto-number-format: 'GN:{A}.{n+}{ =0}: ';
However, when I go to the text editor for one of the H2.Appendix2 sections, I see this. <h2 class="Appendix2" MadCap:autonum="0.1: ">. and the 0.1 is what's being applied in the document. I have tried cutting that 0.1 code. I have tried entering a different value. It always reverts to auto-numbering of 0.1. What can I do to fix this?
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
Welcome to the forums!
Any idea why {chapnum} didn't work? It works for me reliably. In the TOC properties for the first topic of the first appendix, have you set it to use a chapter break and then set the chapter number format to ALPHA (A,B,C) instead of the default decimal format. (Re)set it to start at "1" again too. For subsequent appendices, set their first topics' TOC properties to ahve a chapter break but have the chapter number increment.
Sorry, I may not be answering your question...
Any idea why {chapnum} didn't work? It works for me reliably. In the TOC properties for the first topic of the first appendix, have you set it to use a chapter break and then set the chapter number format to ALPHA (A,B,C) instead of the default decimal format. (Re)set it to start at "1" again too. For subsequent appendices, set their first topics' TOC properties to ahve a chapter break but have the chapter number increment.
Sorry, I may not be answering your question...
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Auto-numbering and Appendices
I have no idea why chapnum doesn't work. I'm a contractor that's new to this company, so I don't know the ins and outs of the documentation. I followed your instructions (page break, reset to 1 ALPHA). I even deleted the auto-numbering for h2.Appendix and h3.Appendix.
Now my h1.Appendix shows Appendix 1 and my first h2.Appendix shows 0.1.
Now my h1.Appendix shows Appendix 1 and my first h2.Appendix shows 0.1.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
I suspect, then, that the CSS for the h2 and h3 needs to be adjust so that the first bit in their auto-number formats also uses {chapnum}. I suspect they are using something like {n}.88Schwind wrote:I have no idea why chapnum doesn't work. I'm a contractor that's new to this company, so I don't know the ins and outs of the documentation. I followed your instructions (page break, reset to 1 ALPHA). I even deleted the auto-numbering for h2.Appendix and h3.Appendix.
Now my h1.Appendix shows Appendix 1 and my first h2.Appendix shows 0.1.
Here're some bits from one of my stylesheets, to use as inspiration:
Code: Select all
h1.Appendix
{
mc-auto-number-format: 'CH:Appendix {chapnum}. ';
}
h1.Chapter
{
mc-auto-number-format: 'CH:Chapter {chapnum}. ';
}
h2
{
mc-auto-number-format: 'CH:{chapnum}.{n+} ';
}
h3
{
mc-auto-number-format: 'CH:{chapnum}.{n}.{n+} ';
}
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Auto-numbering and Appendices
h1.Appendix still displays Appendix 1. Each subsequent h2.Appendix now displays 1.1 despite the instruction to reset to 1 Alpha in the TOC properties.
You do not have the required permissions to view the files attached to this post.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
Where are you seeing the 1.1, in your output or in your source in Flare's XML Editor (and the internal text editor, too)?88Schwind wrote:h1.Appendix still displays Appendix 1. Each subsequent h2.Appendix now displays 1.1 despite the instruction to reset to 1 Alpha in the TOC properties.
If you are talking about what you see in source, then this is normal. Flare will calculate the actual section numbers when it builds your print output. But in the source file, Flare is just showing you the format, as it does not "know" (sorry to anthropromorphize Flare) what the numbers will be in output. Consider how you might have the same topic on two different TOCs with different organizations and hierarchy of topics. In other words, the topic mighr appear in Appendix A in one output but in Appendix C in another.
If you are seeing the numbers in ouptut, then perhaps show us what your CSS looks like.
EDIT: Ah, I see in your original question, you mentioned looking in the text editor. Don't worry about what the numbers look like there. Do you get the right numbers in your output? That's the proof of the pudding.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Auto-numbering and Appendices
All is well now. Thanks for guiding me through that.
Re: Auto-numbering and Appendices
There's nothing wrong with the numbering in my appendices. We use the auto-numbering format CH:Appendix {chapnum} and then we use alphabetical characters so we have Appendix A, etc. However, one of my colleagues pointed out that in our Help files, users are not able to search for the term appendix. Is there a way to make an auto-numbered heading searchable in Help files?
Re: Auto-numbering and Appendices
Does this style needs to be applied manually to every top-level topic in the appendices? Or is there some clever way to tell Flare "use h1 to begin with but substitute h1.Appendix once you've passed point Z in the TOC"?Nita Beck wrote:You'll need only to set up one heading style, for the h1, using the {chapnum} autonumber. Here's what mine looks like:Then, for the TOC item for the first appendix, on the (TOC) Properties window's Auto-numbers tab under Chapter Number, reset to 1 and use the format of ALPHA (A,B,C).Code: Select all
h1.Appendix { mc-auto-number-format: 'Appendix {chapnum}. '; }
For the other appendixes' TOC items, do the same, except don't reset to 1 but instead increment the number.
You won't need to have any special h2s and h3s, assuming that the current h2s and h3s you have are picking up the {chapnum}. They will pick up the appendix letter.
HTH. Post back if this is not enough details for you.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Auto-numbering and Appendices
You have to apply h1.Appendix to the h1 in each appendix's first topic. That way, you'll get the "Appendix " bit before the appendix letter.bwofficer wrote:Does this style needs to be applied manually to every top-level topic in the appendices? Or is there some clever way to tell Flare "use h1 to begin with but substitute h1.Appendix once you've passed point Z in the TOC"?
The TOC settings are used to tell Flare where to add a chapter break and then to set the starting counter. For example, for your Appendix A, set its TOC properties's Printed Output to apply a chapter break and then set its Auto-numbers to reset the chapter number to 1 and use the format Alpha (A,B,C). Then, for the remaining appendixes, have each also apply a chapter break but set the auto-numbers to increment the number (that is, the letter).
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!