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] Adding page number to olinks destroys text justification

Hi Maria,
I believe this is an artifact of FOP 1.0. It seems that it measured the text on the line for justification *before* resolving the page numbers. I believe this is fixed in FOP 1.1, but you could send me a .fo file and I could check it. Can you test with FOP 1.1?

Bob Stayton
Sagehill Enterprises

On 1/7/2014 5:11 AM, Maria Lowas wrote:
Hi all,

Recently, I've been experimenting a bit with adding a page number to
olinks in PDFs. Everything looks great apart from two small issues:
- the space behind a page number isn't rendered always in the same way.
Sometimes the text is distributed evenly within a line and sometimes the
space behind the page number is cut off and the number covers the next
character in the line.
- sometimes the line with a page number is not justified correctly.
Please, have a look at the attached image to see what I mean.

Those issues don't seem to depend on whether there is a space behind an
olink element or whether there is a comma or dot straight afterwards.
Even the space itself have a different width from one place to another.
The problem doesn't seem to be related to any particular DocBook element

Has anyone experienced a similar problem? Any thoughts on how can I
improve it? As for now, PDFs rendered in that way look rather

A bit more details:

I'm using DocBook stylesheets version 1.75.1 and FOP Version 1.0.
The source XML looks as follows:

     <glossentry xml:id="role.term.android">
       <glossterm xml:id="role.term.title.android">Role </glossterm>
         <indexterm type="StorefrontAndroid" xml:id="id0448600732750424">
         <para>A predefined group of <emphasis><olink
               >Privileges</olink></emphasis> which governs access to
particular functionalities of
           the &ProductName; console. It can be assigned to specific
               targetptr="user.term.android">Users</olink></emphasis> or
groups</olink></emphasis>. A particular
<emphasis><olink targetptr="user.term.android">User</olink></emphasis>
can have
           assigned more than one <emphasis>Roles</emphasis>, in which
case their overall
targetptr="privilege.term.android">Privileges</olink></emphasis> are
           the sum of the <emphasis><olink
             >Privileges</olink></emphasis> available within assigned

As for the stylesheets customatization, I have set the following
parameters to "yes":
   <xsl:param name="insert.olink.page.number">yes</xsl:param>
   <xsl:param name="insert.link.page.number">yes</xsl:param>
   <xsl:param name="insert.xref.page.number">yes</xsl:param>

Additionally, I've made small changes to the templete generating the
default page number format so I can style the page number separately to
the olink text and so that the line can be broken between the olink text
and the page number:

   <xsl:template match="*" mode="page.citation">
     <xsl:param name="id" select="'???'"/>

     <fo:basic-link internal-destination="{$id}"
       <fo:inline xsl:use-attribute-sets="olink.page.numbers">
<xsl:call-template name="substitute-markup">
           <xsl:with-param name="template">
             <xsl:call-template name="gentext.template">
               <xsl:with-param name="name" select="'page.citation'"/>
               <xsl:with-param name="context" select="'xref'"/>

Much thanks for any advice.


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]