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: Typography for olinks


Using the 9/25 snapshot (based on 1.69.1) 
The goal is to have cross-ref text styled like this:
See System Requirements on page 27.

where the title is bold and blue, while the page citation is in the
normal body font. 

I can do this using xrefs by customizing the page citation gentext and
adding the following (based on "Customizing cross reference typography"
http://www.sagehill.net/docbookxsl/CustomXrefs.html#CustomXrefStyle) to
my customization layer:

<xsl:template  match="chapter|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 font-weight="bold" color="#1892FF">
        <xsl:copy-of select="$title"/>
      </fo:inline>
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy-of select="$title"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

With olinks, however, it seems to be an all or nothing proposition:
either both the title and page citation use the customized typography,
or they both come across in the normal body font. 

I tried customizing the xref.properties attribute set as follows
(because interal olinks are formatted like xrefs), but the formatting
was applied to the title (as desired) and to the page citation (not
desired):

<xsl:attribute-set name="xref.properties">
	<xsl:attribute name="color">#1892FF</xsl:attribute>
	<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>

I also tried  putting <xsl:when test="$purpose = 'olink'"> in the
template, but got both title and page citation in the normal body font. 

Using xsltproc and FOP 0.20.5, with insert.xref.page.number="yes" and
insert.olink.page.number="maybe"
Sample tags:
<xref linkend="SystemRequirements" /> <!-- Works as desired -->
<olink targetdoc="rg" targetptr="SystemRequirements" /> <!-- All or
nothing -->

What am I missing?
Thanks,
-Robert


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