This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Page Number Appearance


Bob Stayton wrote:
> Can you show us what you tried in your customization?

After a bit more testing, I found the font size is changing with the 
header.content.properties, it was just looking out of proportion due to the 
lack of underlining. The underlining is definitely not being applied.

Have got the header format set as follows:

<xsl:attribute-set name="header.content.properties">
  <xsl:attribute name="font-size">9pt</xsl:attribute>
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>

An example of what I'm getting for the header is in the attached gif (assuming 
the list doesn't remove it...). The page number is not underlined, but the 
rest of the text is.

The part of the header content code that produces the example header is:

      <xsl:when test="$sequence = 'even' and $position = 'left'">  
        <fo:page-number/>
        <fo:inline> - </fo:inline>
        <fo:inline>
          <xsl:call-template name="header.component.title">
          <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
          </xsl:call-template>
        </fo:inline>
      </xsl:when>

And the header.component.title template:
  <xsl:template name="header.component.title">
    <xsl:param name="node" select="."/>
    <xsl:param name="pagewide" select="0"/>
    <xsl:variable name="title">
      <xsl:apply-templates select="$node" mode="object.title.markup">
        <xsl:with-param name="allow-anchors" select="1"/>
      </xsl:apply-templates>
    </xsl:variable>
    <xsl:variable name="titleabbrev">
      <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
    </xsl:variable>
  
    <xsl:copy-of select="$title"/>
  </xsl:template>


I've tried modifying the page-number call as follows:
        <fo:page-number text-decoration="underline"/>

And:
        <fo:inline text-decoration="underline"><fo:page-number/></fo:inline>

And:
    <xsl:when test="$sequence = 'even' and $position = 'left'">  
      <fo:block text-decoration="underline">
        <fo:page-number/>
        <fo:inline> - </fo:inline>
        <fo:inline>
          <xsl:call-template name="header.component.title">
          <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
          </xsl:call-template>
        </fo:inline>
      </fo:block>
    </xsl:when>

And:
    <xsl:when test="$sequence = 'even' and $position = 'left'">  
      <fo:inline text-decoration="underline">
        <fo:page-number/>
        <fo:inline> - </fo:inline>
        <fo:inline>
          <xsl:call-template name="header.component.title">
          <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
          </xsl:call-template>
        </fo:inline>
      </fo:inline>
    </xsl:when>


I couldn't work out how to set specific properties for the text appearance 
through the page.number.format template - it complained everytime I tried, 
and didn't work.

Cheers,
Janeene Webb.

Attachment: headerexample.gif
Description: GIF image

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]