Skip to main content
Known Participant
August 18, 2014
Question

Autonumbering with Headings

  • August 18, 2014
  • 2 replies
  • 510 views

Hi,

I'm trying to auto number some of my headings. Ideally, I would like Heading 1 to have no auto numbering, Heading 2 to go by 1.1, 1.2, 2.1, 2.2, etc, and Heading 3 to go by 1.1.1, 1.1.2, 2.1.1, 2.1.2, etc.

Is there any way to achieve this without having to auto number Heading 1?

Thanks.

    This topic has been closed for replies.

    2 replies

    Bob_Niland
    Community Expert
    August 26, 2014

    If what you want could be described as "I want H1 to have an autonumber, but not look like it has an AN", then see the hacks suggested at:
    Generated list with section numbers

    Arnis Gubins
    Inspiring
    August 18, 2014

    Is the first digit of the autonumber supposed to reflect the chapter number? If so, then just use the <$chapnum> building block to represent the first digit in your autonumber series for each subsequent heading level. Then you can use the matrix-method to setup your Heading autonumbers for Heading2 on down.

    LuxxieAuthor
    Known Participant
    August 18, 2014

    My problem is that in the front matter of my document, I list all the sections as cross references. For example, Section 1: Introduction, Section 2: Getting Started.

    I originally set up Heading 1 to be auto numbered like this Section <n+>:, but when I insert the cross-reference, only the text that comes after Section 1: is inserted. And since the cross-reference is in a blue to distinguish as a link, it looks a little funny since I've manually typed in Section 1. I don't want to change the colour of the text Section 1: since they won't be able to click on it anyways.

    I've tried your suggestion with the building block, but it does not pick up my Section 2, those headings continue to number from section 1.

    Brainiac
    August 26, 2014

    Have you looked at the building-blocks you're using in the cross-reference? in particular, <$paranum> – this should pull in the auto-numbering slug from the numbered heading. And fine-tuning the building-blocks in your numbering definitions (coupled with adjusting the numbering properties for the chapter files, which is best done from the book) should get your level two numbering to start again wherever required. Post again if you have questions.