[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] incrementing item numbers in docbook
Hi Paul,This will require customization of templates in certain modes. In general, titles are generated using a template in a mode applied to the element like section. That way it can find the title if it is a child of section or a child of info.
Numbered titles are generated by applying mode="object.title.markup" to the section. This mode engages the gentext files like common/en.xml to look up the appropriate gentext template like
<l:template name="section" text="%n. %t"/>It fills in %n by applying templates in mode="label.markup" and it fills in %t by applying-templates in mode="title.markup". So you could customize the template for section in mode="title.markup" to first generate your lab label for sections that are labs, and then add the title if you want it.
Autonumbering is done in XSLT using the <xsl:number> instruction, setting appropriate attributes for what to count and when to reset the number sequence.
Ask if you need more help with the details. Bob Stayton Sagehill Enterprises bobs@sagehill.net On 1/13/2018 6:17 PM, Paul Faulstich wrote:
Hi all,I am creating a modular document with chapters and sections. Some of the sections are labs. I'm hoping to auto-number the labs, so I end up with something like this:Book * Chapter 1 ** Section 1 ** Section 2: Lab 1.1 ** Section 3 ** Section 4: Lab 1.2 ** Section 5: Lab 1.3 * Chapter 2 ** Section 1 ** Section 2: Lab 2.1 ** Section 3: Lab 2.2 etc. How do I autonumber the Lab titles? Many thanks! Paul
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]