Next in thread → Next in month →

Re: [docbook-apps] XREF in an article

From
Fllen Kuhlin
Date
2007-02-14T01:33:15+00:00
ID
Thread
Re: [docbook-apps] XREF in an article
Hi Bob,
That was indeed the problem. Thanks for the quick reply!

Ellen

On Feb 13, 2007, at 5:10 PM, Bob Stayton wrote:

Hi Ellen,

Are your sections numbering in articles but not in books (using the section.autolabel parameter)?  If so, then you are getting the gentext template for your sections from the context with name="xref-number-and-title".  So you need to customize that as well.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

----- Original Message -----

From: Ellen Juhlin

To: 

Sent: Tuesday, February 13, 2007 4:58 PM

Subject: [docbook-apps] XREF in an article

Hello list,

I created a customization layer for our user manuals, which are docbook "books". Now I am adapting that customization for "articles" (for release notes, etc).

However, when I generate the PDF, the XREFs are not formatted the same way in the article as they are in the book, even though the XSL is exactly the same (see code snip below).

In the book, an xref produces the following (xref text marked like *this*):

...Other automation information can be found in *Automation Control (p. 25)*...

But in the article, xrefs look like this:

...Other automation information can be found in *Section 5, "Automation Control"*...

Is there something special I need to do to affect xrefs in articles in addition to books? I am using the most recent version of the docbook stylesheets. Thanks for your help in advance.

Ellen

Product Specialist, LCS Series

Meyer Sound Laboratories

<xsl code snip>

<xsl:template match="chapter|sect1|sect2|sect3|sect4|sect5|section" mode="insert.title.markup">

        <xsl:param name="purpose" />

        <xsl:param name="xrefstyle" />

        <xsl:param name="title" />

        

        <xsl:choose>

            <xsl:when test="$purpose = 'xref'">

                <fo:inline color="#002266" font-style="italic" font-weight="bold">

                    <!-- This sets attributes for the title on xrefs -->

                    <xsl:copy-of select="$title" />

                </fo:inline>

            </xsl:when>

            <xsl:otherwise>

                <xsl:copy-of select="$title" />

            </xsl:otherwise>

        </xsl:choose>

    </xsl:template>

    

    <xsl:attribute-set name="xref.properties">

        <!-- This sets attributes for the page # on xrefs -->

        <xsl:attribute name="color">black</xsl:attribute>

        <xsl:attribute name="font-style">normal</xsl:attribute>

        <xsl:attribute name="font-weight">normal</xsl:attribute>

    </xsl:attribute-set>

    

    <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="xref">

                <l:template name="appendix" text="%t (p. %p)" />

                <l:template name="chapter" text="%t (p. %p)" />

                <l:template name="sect1" text="%t (p. %p)" />

                <l:template name="sect2" text="%t (p. %p)" />

                <l:template name="sect3" text="%t (p. %p)" />

                <l:template name="section" text="%t (p. %p)" />

            </l:context>

        </l:l10n>

    </l:i18n>

</xsl code snip>

 
Product Specialist, LCS Series

Meyer Sound Laboratories
Next in thread → Next in month →