[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Appendix Titles
Sorry, I misunderstood this line: > I'm trying to add the word "Appendix" before any Appendix Title. Because you said before the title, I assumed you had appendix.autolabel set to zero to turn off the number and wanted to add the word Appendix before the title, not before the number. Then I don't understand what you mean for your third problem: > 3) Main text of appendix The main title of an appendix says "Appendix A. My Appendix Title". Where is the word Appendix missing? Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Aidan Lister" <aidanis@gmail.com> To: "Bob Stayton" <bobs@sagehill.net> Cc: <docbook-apps@lists.oasis-open.org> Sent: Monday, July 04, 2005 2:42 AM Subject: Re: [docbook-apps] Appendix Titles Hi Bob, List, The only problem with this is I get A. Appendix Tables. Where as I want Appendix A. Tables. Thanks, Aidan On 6/30/05, Bob Stayton <bobs@sagehill.net> wrote: > Hi Aiden, > Actually, there is an easier way to do it. The title.markup mode is used > almost everywhere a title generated. So you could customize that mode for > appendix. The original is a template with match="preface|chapter|appendix" > mode="title.markup" in common/titles.xsl. You could add this customization > template for just appendix: > > <xsl:template match="appendix" mode="title.markup"> > <xsl:param name="allow-anchors" select="0"/> > > <xsl:variable name="title" select="(info/title > |appendixinfo/title > |title)[1]"/> > > <xsl:call-template name="gentext"> > <xsl:with-param name="key" select="'Appendix'"/> > </xsl:call-template> > <xsl:text> </xsl:text> > > <xsl:apply-templates select="$title" mode="title.markup"> > <xsl:with-param name="allow-anchors" select="$allow-anchors"/> > </xsl:apply-templates> > </xsl:template> > > I think this handles all your cases. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Aidan Lister" <aidanis@gmail.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Tuesday, June 28, 2005 6:49 PM > Subject: [docbook-apps] Appendix Titles > > > Hello list, > > I'm trying to add the word "Appendix" before any Appendix Title. > > This occurs in three places. > 1) Table of contents > 2) <title> of appendix > 3) Main text of appendix > > I've solved 1 and 2 using the below modifications, > > <!-- Adds "Appendix" to appendices --> > <xsl:template name="head.content"> > ... > <title> > <!-- Added this --> > <xsl:if test="local-name(.) = 'appendix'"> > <xsl:call-template name="gentext"> > <xsl:with-param name="key" select="'Appendix'"/> > </xsl:call-template> > <xsl:text> </xsl:text> > </xsl:if> > > <xsl:copy-of select="$title"/> > </title> > ... > </xsl:template> > > <!-- Add "Appendix" to appendices listing in TOC --> > <xsl:template name="toc.line"> > ... > > <span> > <xsl:attribute name="class"><xsl:value-of > select="local-name(.)"/></xsl:attribute> > <a> > ... > <!-- Added this --> > <xsl:choose> > <xsl:when test="self::appendix"> > <xsl:call-template name="gentext"> > <xsl:with-param name="key" select="'Appendix'"/> > </xsl:call-template> > <xsl:text> </xsl:text> > </xsl:when> > </xsl:choose> > ... > </a> > </span> > </xsl:template> > > However I'm unable to solve number 3. > > If anyone knows how to add this, that would be great. Better yet, is > there a better way to do it? > > Kind regards, > Aidan > > --------------------------------------------------------------------- > 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]