[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Outline numbering for HTML output
Thanks, Bob. That was helpful.
Here’s the customized template I created: <!--
==================================================================== --> <!-- Custom numbering of sections
(adapted from common/labels.xsl). --> <xsl:template match="d:section" mode="label.markup"> <xsl:variable name="level"> <xsl:call-template name="section.level"/> </xsl:variable> <!-- does this section get
labelled? --> <xsl:variable name="label"> <xsl:call-template name="label.this.section"> <xsl:with-param name="section" select="."/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="@label"> <xsl:value-of select="@label"/> </xsl:when> <xsl:when test="$label != 0"> <xsl:choose> <xsl:when test="$level = 1"> <xsl:number format="I" count="d:section"/> </xsl:when> <xsl:when test="$level = 2"> <xsl:number format="A" count="d:section"/> </xsl:when> <xsl:when test="$level = 3"> <xsl:number format="1" count="d:section"/> </xsl:when> <xsl:otherwise> <!-- nop
--> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:template> Regards, Jeff From: Bob Stayton
[mailto:bobs@sagehill.net] Hi
Jeff, This
would require a customization of this template: <xsl:template
match="section" mode="label.markup"> from
common/labels.xsl to take into account the section level. You can use
the existing utility template named "section.level" that
returns an integer value for the section level. If
you customize that template, then those numbers will be used everywhere,
including the TOC and xrefs. Bob
Stayton From: Jeff Powanda Sent: Thursday, July 25,
2013 9:11 AM To: docbook-apps Cc: TechPubs Subject: [docbook-apps]
Outline numbering for HTML output I’m trying to output HTML release notes using outline
numbering for sections, using the following hierarchy: I (uppercase Roman numerals)
A (uppercase letters)
1 (numerals)
a (lowercase letters) This doesn’t seem possible using section.autolabel property,
which lets you specify only one label value. Is there a simple out-of-the-box
way to do this? Or do I need to implement custom section numbering in my
customization layer? Regards, Jeff
Powanda |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]