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


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 either.

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

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>
      <glossdef>
        <indexterm type="StorefrontAndroid" xml:id="id0448600732750424">
          <primary>role</primary>
        </indexterm>
        <para>A predefined group of <emphasis><olink targetptr="privilege.term.android"
              >Privileges</olink></emphasis> which governs access to particular functionalities of
          the &ProductName; console. It can be assigned to specific <emphasis><olink
              targetptr="user.term.android">Users</olink></emphasis> or <emphasis><olink
              targetptr="user_group.term.android">User 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
              <emphasis><olink targetptr="privilege.term.android">Privileges</olink></emphasis> are
          the sum of the <emphasis><olink targetptr="privilege.term.android"
            >Privileges</olink></emphasis> available within assigned
          <emphasis>Roles</emphasis>.</para>
      </glossdef>
    </glossentry>

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}" xsl:use-attribute-sets="xref.properties">
      <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'"/>
            </xsl:call-template>
          </xsl:with-param>
        </xsl:call-template>
      </fo:inline>
    </fo:basic-link>
  </xsl:template>

 

Much thanks for any advice.

 

Regards,Maria


Attachment: destroyed_justification.png
Description: PNG image



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