OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] TOC entries for Apendices


Hi Ron,
As you discovered, the default output for article/appendix is to include a
label such as:

A. Title of the appendix

I need to update my book.

Regarding the customization, that variable needs to be inside the
customization of the template named toc.line.  See the example in the book.

Also, the call to the template named 'gentext' is what generates the word
"Appendix" from the local file.  You don't also need the xsl:text element to
output Appendix.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Ron Catterall" <ron@catterall.net>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, December 14, 2005 4:48 AM
Subject: Re: [docbook-apps] TOC entries for Apendices


> Bob
>
> Thanks for the help.  I found the problem.  First a quote from your book
(p.71)
> "Appendix titles are numbered when in a book, but not numbered when
> in an article."
> So I had to switch Appendix labeling on in an article.
>
> First, I find that if I use :
> <!-- <xsl:param name="appendix.autolabel" select="1" /> -->
> in my customization layer to switch the numbering on in an article,
> this numbers the appendices 1.,2.,..., not A.,B.,...
>
> Second, if I omit the appendix.autolabel definition altogether, then
> the appendices are labeled by default in an article, and they are
> labeled A.,B.,...
>
> So I have no problem with this now I know how it works.  But if your
> book is right, then there is a bug in the XSL.
>
> However, I still have a problem with getting appendices labeled
> Appendix A., Appendix B.,....
> I tried your recipe and put:
> <xsl:variable name="label">
>    <xsl:choose>
>      <xsl:when test="self::appendix">
>        <xsl:call-template name="gentext">
>          <xsl:with-param name="key">appendix</xsl:with-param>
>        </xsl:call-template>
>        <xsl:text>Appendix </xsl:text>
>        <xsl:apply-templates select="."  mode="label.markup"/>
>      </xsl:when>
>      <xsl:otherwise>
>        <xsl:apply-templates select="."  mode="label.markup"/>
>      </xsl:otherwise>
>    </xsl:choose>
> </xsl:variable>
> into my customization layer.  But it has no effect, I get labels
> A.,B.,...What am I doing wrong?
>
> Ron
>
>
>
>
>
> >Hi Ron,
> >1.  When I process an article containing multiple appendices with version
> >1.69.1 of the stylesheets, I get appedices numbered A, B, etc.  I don't
know
> >how you are getting numbers.  *However*, any sections within the
appendices
> >use arabic numbers in place of the letters, which is clearly a bug.
> >
> >2.  To add "Appendix" to your toc, you can customize each line of the TOC
> >using the template named 'toc.line' from autotoc.xsl, which is used to
form
> >each line of the TOC.  For an example, see:
> >
> >http://www.sagehill.net/docbookxsl/PrintToc.html#PrintTocEntries
> >
> >In your case, you want put an xsl:choose inside the body of the label
> >variable:
> >
> ><xsl:variable name="label">
> >   <xsl:choose>
> >     <xsl:when test="self::appendix">
> >       <xsl:call-template name="gentext">
> >         <xsl:with-param name="key">appendix</xsl:with-param>
> >       </xsl:call-template>
> >       <xsl:text> </xsl:text>
> >       <xsl:apply-templates select="."  mode="label.markup"/>
> >     </xsl:when>
> >     <xsl:otherwise>
> >       <xsl:apply-templates select="."  mode="label.markup"/>
> >     </xsl:otherwise>
> >   </xsl:choose>
> ></xsl:variable>
> >
> >Bob Stayton
> >Sagehill Enterprises
> >DocBook Consulting
> >bobs@sagehill.net
> >
> >
> >----- Original Message -----
> >From: "Ron Catterall" <ron@catterall.net>
> >To: <docbook-apps@lists.oasis-open.org>
> >Sent: Monday, December 12, 2005 7:00 AM
> >Subject: [docbook-apps] TOC entries for Apendices
> >
> >
> >>  Query 1
> >>  When I use <xsl:param name="appendix.autolabel" select="1" /> in my
> >>  customisation layer, in a book I get appendices labeled A, B, C, etc
> >>  in the TOC.
> >>  But when I use it in an article, the appendices are numbered 1, 2, 3,
etc.
> >>  How do I get appendices labeled A, B, C, in an article?
> >>  Query 2
> >>  How do I get TOC entries as Appendix A (not just A) in an article and
> >>  in a book.
> >>  (I have read Bob's book on this, but I didn't find it much help)
> >>  Can anyone help?
> >>  Ron
> >>  I'm using Saxon 6.5.4 in Oxygen 6.2 with all defaults except XEP for
> >>  FO, Docbook 4.4
> >>  --
> >>  Ron Catterall, Phd, DSc email: ron@catterall.net
> >>  Prolongacion de Hidalgo 140 http://catterall.net/
> >>  San Felipe del Agua tel: +52 951 520 1821
> >>  Oaxaca      68020 Mexico fax: +1 530 348 8309
> >>
> >>  ---------------------------------------------------------------------
> >>  To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >>  For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org
> >>
> >>
> >>
>
>
> -- 
> Ron Catterall, Phd, DSc email: ron@catterall.net
> Prolongacion de Hidalgo 140 http://catterall.net/
> San Felipe del Agua tel: +52 951 520 1821
> Oaxaca      68020 Mexico fax: +1 530 348 8309
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]