Auto-numbering and Appendices

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Auto-numbering and Appendices

Postby Paul Griffiths on Wed May 22, 2013 4:02 am

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?
Paul Griffiths
Sr. Propeller Head
 
Posts: 255
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Auto-numbering and Appendices

Postby Nita Beck on Wed May 22, 2013 5:19 am

You'll need only to set up one heading style, for the h1, using the {chapnum} autonumber. Here's what mine looks like:
Code: Select all
h1.Appendix
{
   mc-auto-number-format: 'Appendix {chapnum}. ';
}


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.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3484
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering and Appendices

Postby Paul Griffiths on Wed May 22, 2013 5:33 am

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+} ';
   }   
Paul Griffiths
Sr. Propeller Head
 
Posts: 255
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Auto-numbering and Appendices

Postby LTinker68 on Wed May 22, 2013 7:34 am

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.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Auto-numbering and Appendices

Postby tomthemoth on Tue Nov 24, 2020 11:41 am

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:
Code: Select all
h1.Appendix
{
   mc-auto-number-format: 'Appendix {chapnum}. ';
}


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.


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."

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.
tomthemoth
Jr. Propeller Head
 
Posts: 3
Joined: Thu Nov 19, 2020 12:46 pm

Re: Auto-numbering and Appendices

Postby Nita Beck on Wed Nov 25, 2020 6:58 am

Thanks for that feedback, Tom. So glad that I could help, even 7 years after my post!
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3484
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering and Appendices

Postby 88Schwind on Tue Sep 21, 2021 8:27 am

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?
88Schwind
Propeller Head
 
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Auto-numbering and Appendices

Postby Nita Beck on Tue Sep 21, 2021 12:30 pm

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...
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3484
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering and Appendices

Postby 88Schwind on Wed Sep 22, 2021 8:37 am

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.
88Schwind
Propeller Head
 
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Auto-numbering and Appendices

Postby Nita Beck on Wed Sep 22, 2021 8:44 am

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.

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}.

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+} ';
}


You can find examples of auto-numbering here: https://help.madcapsoftware.com/flare2021r2/Content/Flare/Autonumbers/General-Information/Autonumber-Format-Examples.htm. Looks like my CSS is straight out of some of the examples.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3484
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering and Appendices

Postby 88Schwind on Wed Sep 22, 2021 10:46 am

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.

toc_properties.png
You do not have the required permissions to view the files attached to this post.
88Schwind
Propeller Head
 
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Auto-numbering and Appendices

Postby Nita Beck on Thu Sep 23, 2021 4:49 am

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.

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)?

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
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3484
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-numbering and Appendices

Postby 88Schwind on Thu Sep 23, 2021 7:49 am

All is well now. Thanks for guiding me through that.
88Schwind
Propeller Head
 
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Auto-numbering and Appendices

Postby 88Schwind on Fri Jan 14, 2022 10:02 am

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?
88Schwind
Propeller Head
 
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 15 guests