Auto-Numbering Question

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Auto-Numbering Question

Post by ccardimon »

I am relatively new at the Auto-Numbering thing. How do I achieve this Auto-Numbered TOC layout without having this numbering in the text itself:

1. First H1 heading
1.1 Subhead
1.2 Subhead
1.3 Subhead

2. Second H1 Heading
2.1 Subhead
2.2 Subhead
2.3 Subhead

3. Third H1 heading
3.1 Subhead
3.2 Subhead
3.3 Subhead
Craig

Lost in Disturbia
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Auto-Numbering Question

Post by Msquared »

Are you saying you want the heading entries in the table of contents to be numbered, but you don't want any heading numbering in the main body of the document? Or are you saying you want heading numbers but you want them to be auto-generated and don't want to have to maintain them manually?

If it's the latter, you do it by using mc-auto-number-format. Here's my H1:

mc-auto-number-format: '{chapnum} '

and my H2

mc-auto-number-format: '{chapnum}.{Cn+} '

and H3

mc-auto-number-format: '{chapnum}.{Cn}.{Cn+} '

There are various slightly different ways of coding these, but this works for me.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Auto-Numbering Question

Post by kwag_myers »

Msquared wrote:... you do it by using mc-auto-number-format..
Do you need to reset the Cn for each chapter, e.g., {Cn=1}?
Last edited by kwag_myers on Fri Aug 08, 2014 6:43 am, edited 1 time in total.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Auto-Numbering Question

Post by ccardimon »

kwag_myers wrote:
Msquared wrote:... you do it by using mc-auto-number-format..
Do you need to reset the Cn for each chapter?
I need to increment the Cn for each chapter.
Craig

Lost in Disturbia
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Auto-Numbering Question

Post by Msquared »

In your TOC, right click on each topic that is the start of a chapter and on the Printed Output tab, set Break Type to Chapter Break. On the Auto Numbers tab, set the Chapter Number to increment for each chapter, except for the first, which you can set to "Reset to" 1. Or whatever numbering scheme you want.

And no, you shouldn't need to do anything with the {Cn} counter. That's a counter that has the scope of a chapter (as opposed to a Gn counter which has a global scope, for example). So it will automatically reset when {chapter} increments.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto-Numbering Question

Post by Nita Beck »

FWIW, my various formats look like this, where the "C" counter is in a different part of the format from Marjorie's [aka Msquared].

Code: Select all

	h1.Appx
	{
		mc-auto-number-format: 'Appendix {chapnum}. ';
	}

	h1.Chpt
	{
		mc-auto-number-format: 'Chapter {chapnum}. ';
	}

	h2
	{
		mc-auto-number-format: 'CH:{chapnum}.{n+} ';
	}

	h3
	{
		mc-auto-number-format: 'CH:{chapnum}.{n}.{n+} ';
	}

	h4
	{
		mc-auto-number-format: 'CH:{chapnum}.{n}.{n}.{n+} ';
	}

	h5
	{
		mc-auto-number-format: 'CH:{chapnum}.{n}.{n}.{n}.{n+} ';
	}

	p.FigureTitle
	{
		mc-auto-number-format: 'CF:Figure {chapnum}–{n+} ';
	}

	p.TableTitle
	{
		mc-auto-number-format: 'CT:Table {chapnum}–{n+} ';
	}

Numbers are reset by virtue of the chapter numbers' incrementing, which is set up on the properties of the TOC books that start each chapter (or appendix). Each TOC book must be associated with a chapter break and then one can say whether to start counting at an explicitly set number or to increment from the prior chapter. My guess is that Marjorie's numbers are reset using the same mechanism.

(Hi Marjorie! Didn't see you "standing" there!)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Auto-Numbering Question

Post by ccardimon »

Thanks for your help, everyone. The AutoNumbering is finally beginning to fall into place.
Craig

Lost in Disturbia
Post Reply