h1 autonumbering 1,2,3,A,B,C WITHOUT an h1.Appendix class

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

h1 autonumbering 1,2,3,A,B,C WITHOUT an h1.Appendix class

Post by bwofficer »

I'm creating product user manuals as PDFs. I want to number the h1 headings 1,2,3 in the main body but Appendix A, Appendix B, Appendix C in the appendices. I've seen loads of posts on this forum on how to do this but neither of the two main solutions suggested meet all my needs. Is there an alternative?

The two main methods seem to be:
1. The Styles-Only Method
Add an autonumbering rule to the h1 style applying {n+} numbering
Create an h1.Appendix class, autonumbering it Appendix {A+}
Manually apply the h1.Appendix style to the h1's of the topics going into the appendices

2. The {chapnum} Method
Have a single h1 style in which the first digit of the autonumber is the {chapnum}
Put a chapter break at the start of every top-level entry in the TOC
In the TOC entry that begins the appendices part of the manual, reset the chapter number and change its appearance to upper case letters

The problem I have with method 1 is that I don't want to apply appendix-specific styles in topics, because I don't want to commit those topics to only ever appearing in appendices. I want the flexibility to move them from main body to appendices, or even have them in the main body in one target/TOC and in the appendices of another.

The problem I have with method 2 is that I can't see how to prefix the autonumber in the appendices (A, B, C...) with the word Appendix, without it also appearing before the main body autonumbers. I also hate that I have to go through every chapter-level entry in the TOC and set a chapter break. But my inability to prefix the {chapnum} autonumbers in the appendices (A, B, C...) with the word Appendix is the real killer for me. Is there a way to do it while still relying on the {chapnum} for the numbering?

Alternatively, if I fall back on method 1 is there a way to have both numbering schemes in a single h1 style which chooses the right one based on whether the TOC entry it's linked to is flagged as being an appendix (however you might do that)?

It's all way above my skill level, but I'm not ready to give up and adopt a compromise quite yet. Any suggestions?
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

Re: h1 autonumbering 1,2,3,A,B,C WITHOUT an h1.Appendix clas

Post by bwofficer »

P.S. Is it possible to link a stylesheet to only PART of a TOC? If so, might it be possible to have the 1, 2, 3 numbered h1 rule in the main stylesheet but have it overridden by an Appendix A, Appendix B, Appendix C numbered h1 in another stylesheet that only applies to the appendices part of the TOC.
Post Reply