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: Re: [docbook-apps] Page Number Appearance


On Fri, Dec 05, 2003 at 06:25:47PM +1100, Janeene Webb wrote:
> 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.

You aren't doing anything wrong.
I'm afraid you have run into a FOP bug.
Everything you tried works in XEP, and nothing you
(or I) tried worked in FOP to get the page number
underlined.   I even tried wrapping it in additional
text and changing other properties:

<fo:inline text-decoration="underline"
           font-family="Helvetica" 
	   font-weight="bold">foo<fo:page-number/>and more</fo:inline>

FOP managed to change the font and weight of the whole
string, including the page number. But the page number
was still not underlined.  FOP seems to handle the page
number in a strange way.

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


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