[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: depth of section numbering
> Look at the file "labels.xsl" in the common directory. Depending on whether > Look at the file "labels.xsl" in the common directory. Depending on whether > you're using nested sections (<section> tags) or numbered sections > (<sect1>,<sect2>, etc.) you'll have to edit the corresponding templates with > mode "label.markup". > > This does get pretty tricky, and involves a lot of customization of Norm's > current stylesheets. You may want to submit a RFE on sourceforge. Another > option is to use bridgeheads, but again, I don't know what will happen. > > Jeff > > -----Original Message----- > From: Michael Wiedmann [mailto:mw@miwie.in-berlin.de] > Sent: Monday, June 17, 2002 3:08 PM > To: Jeff Beal > Cc: DocBook-Apps ML > Subject: Re: DOCBOOK-APPS: depth of section numbering > > > * Jeff Beal <jeff.beal@ansys.com> [020617 10:18]: > > > OK. I found a reasonably simple way to do this --- customize the template > > named "label.this.section" in the "labels.xsl" stylesheet. Make it look > > like this (I haven't tested, but it should work.) > > Thanks Jeff, this almost works! > But unfortunately the deeper sections are still numbered with the number > of the last numbered section, e.g.: > > 1.2.2.1. Counters > ... > 1.2.2.1.. \addtocounter > > What I want is no number at all for the deeper sections. Actually, you can do it with just parameters and the gentext templates. These lines in your stylesheet customization file will do what I think you want, assuming you want to omit the unnumbered section titles from the TOC. <xsl:param name="section.autolabel" select="1"/> <xsl:param name="toc.section.depth" select="2"/> <xsl:param name="section.label.includes.component.label" select="1"/> <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en"> <l:context name="title-numbered"> <l:template name="sect3" text="%t"/> <l:template name="sect4" text="%t"/> <l:template name="sect5" text="%t"/> </l:context> <l:context name="section-xref-numbered"> <l:template name="sect3" text="the section called “%t”"/> <l:template name="sect4" text="the section called “%t”"/> <l:template name="sect5" text="the section called “%t”"/> </l:context> </l:l10n> </l:i18n> The first parameter turns on section numbering, and the second one limits the TOC list to sect2 at the most. The third parameter adds the chapter number to the numbering (the usual for multiple chapter numbering). The <l:i18n> stuff customizes the gentext templates, in this case for English. You'll have to do something for other languages if you use them. It redefines how the section titles and cross references are generated for sect3 through sect5 when in the 'sections being numbered' context. In this case, although sections are being numbered, you want these section levels to just display %t (title) and not %n (number). -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC