[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Chapter, Appendix, and Part headings in TOC?
Hmmm...I regenerated my stylesheets and I see that it's outputing that. I'm not sure why I wasn't getting it before. However my TOC that's getting generated is outputing A, B, C, etc for my appendicies. However, when I open the appendix it says Appendix 1, Appendix 2, etc. What I want is that the TOC matches the contents of those pages. However, what parameter controls that output? What parameter do I tweak to supress that or change it it from including Chapter 1, Appendix 2, etc? I understand the defaults. Thanks Charlie On 9/11/06, Bob Stayton <bobs@sagehill.net> wrote: > But the generated content (the chapter title itself) already says "Chapter > 1. You Got What I Need". That is the default output. What would want > instead? > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Charlie Hubbard" <charlie.hubbard@gmail.com> > To: "Ron Catterall" <ron@catterall.net> > Cc: <docbook-apps@lists.oasis-open.org> > Sent: Sunday, September 10, 2006 1:15 PM > Subject: Re: [docbook-apps] Chapter, Appendix, and Part headings in TOC? > > > > Ok thanks for the code. I was able to modify it to support the other > > sections I wanted this type of header for. But, this will only affect > > the TOC and not the generated contents. Is there no way to do this > > through just turning on a XSL parameter rather than having to > > customize this? I'm looking at the XSL book as an example of what I'd > > like to do: > > > > http://www.sagehill.net/docbookxsl/ > > > > So the TOC has > > > > Chapter 1. You Got What I Need > > Chatper 2. But you Say He's Just a Friend > > > > but also when you click Chapter 1 href link you see: > > > > Chapter 1. You Got What I Need > > > > Blah blah that adored me.... > > > > in the web page. This seems like you could just turn on a parameter > > and get it to do the same thing without creating a customization code. > > The rest of the XSL book is pretty much default like layout. > > > > Charlie > > > > On 9/10/06, Ron Catterall <ron@catterall.net> wrote: > >> Charlie > >> Try this, this will set the string 'Appendix' in the TOC to what you > >> want. > >> Similarly for Chapter - sorry no time just now to spell it out. > >> Ron > >> <!-- set labels for appendices in the table of contents --> > >> <!-- > >> ==================================================================== --> > >> <xsl:template name="toc.line"> > >> <xsl:variable name="id"> > >> <xsl:call-template name="object.id"/> > >> </xsl: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> > >> > >> <fo:block text-align-last="justify" > >> text-align="start" > >> end-indent="{$toc.indent.width}pt" > >> last-line-end-indent="-{$toc.indent.width}pt"> > >> <fo:inline keep-with-next.within-line="always"> > >> <fo:basic-link internal-destination="{$id}"> > >> <xsl:if test="$label != ''"> > >> <xsl:copy-of select="$label"/> > >> <xsl:value-of select="$autotoc.label.separator"/> > >> </xsl:if> > >> <xsl:apply-templates select="." mode="titleabbrev.markup"/> > >> </fo:basic-link> > >> </fo:inline> > >> <fo:inline keep-together.within-line="always"> > >> <xsl:text> </xsl:text> > >> <fo:leader leader-pattern="dots" > >> leader-pattern-width="3pt" > >> leader-alignment="reference-area" > >> keep-with-next.within-line="always"/> > >> <xsl:text> </xsl:text> > >> <fo:basic-link internal-destination="{$id}"> > >> <fo:page-number-citation ref-id="{$id}"/> > >> </fo:basic-link> > >> </fo:inline> > >> </fo:block> > >> </xsl:template> > >> <!-- > >> ==================================================================== --> > >> > >> <!-- turn on chapter numbering - 1, 2, 3 ... --> > >> <xsl:param name="chapter.autolabel" select="1" /> > >> > >> > >> > >> > >> >Hi, > >> > > >> >I've been trying to find the answer to this questions because it seems > >> >like an easy one, but I just can't find the parameter that controls > >> >it. I'm trying to generate the TOC with entries like > >> > > >> >Chatper 1. How to get Your Skeletons Their Whitest. > >> >Chapter 2. Selling Your Soul In a Buyers' Market. > >> >Chatper 3. How to Raise the Dead > >> >Appendix A. Pet Cemetary Rules and Regulations > >> > > >> >Right now all I get by default is: > >> > > >> >1. How to get Your Skeletons Their Whitest. > >> >2. Selling Your Soul In a Buyers' Market. > >> >3. How to Raise the Dead > >> >A. Pet Cemetary Rules and Regulations > >> > > >> >What template generates this? > >> > > >> >Thanks > >> >Charlie > >> > > >> >--------------------------------------------------------------------- > >> >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]