List Info

Thread: Left aligning instead of left justifying




Left aligning <glossterm> instead of left justifying
user name
2007-07-11 09:34:07
Hello,

I'm using this DocBook customization:

<xsl:template match="glossterm"
mode="glossary.as.list"> <xsl:variable
name="id"> <xsl:call-template
name="object.id"/> </xsl:variable>
<fo:block
text-align="left"> <fo:inline
id="{$id}"><xsl:apply-templates/></fo:
inline>
</fo:block>
</xsl:template>

It left aligns <glossterm>, but it also has the side
effect of completely
screwing up acronyms.  It makes acronyms appear a line
beneath the gloss
term and also seems to make acronym spill over to the next
page without
keeping together with the rest of the glossentry.

On the FOP Users list, I was told that this customization is
creating a new
fo:block, so that's causing a line break.  Can you help me
with a non
intrusive way of left aligning glossterm without breaking
anything?  

Thank you,
Joseph Caporale

-- 
View this message in context: http://ww
w.nabble.com/Left-aligning-%3Cglossterm%3E-instead-of-left-j
ustifying-tf4062305.html#a11541564
Sent from the docbook apps mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Left aligning <glossterm> instead of left justifying
user name
2007-07-11 09:53:30
I put <xsl:param
name="alignment">start</xsl:param> in my
customization
layer, and now I don't have the problem.

Is this a valid fix?

Thank you,
Joseph Caporale
-- 
View this message in context: http://ww
w.nabble.com/Left-aligning-%3Cglossterm%3E-instead-of-left-j
ustifying-tf4062305.html#a11541971
Sent from the docbook apps mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Left aligning <glossterm> instead of left justifying
user name
2007-07-14 11:53:14
Well, it worked because it is a global parameter that sets
the default for 
the entire document.  You will notice that all your
paragraphs are 
left-aligned now.

In my opinion, certain elements should always be
left-aligned, and 
glossterm is one of them because it fits inside a small
area.  If you want 
to fix yours, you can customize the template that starts
this way instead:

<xsl:template match="glossentry"
mode="glossary.as.list">
  <xsl:variable name="id">
    <xsl:call-template name="object.id"/>
  </xsl:variable>

  <fo:list-item
xsl:use-attribute-sets="normal.para.spacing">
    <xsl:call-template name="anchor">
      <xsl:with-param name="conditional">
        <xsl:choose>
          <xsl:when test="$glossterm.auto.link != 0
                          or $glossary.collection !=
''">0</xsl:when>
          <xsl:otherwise>1</xsl:otherwise>
        </xsl:choose>
      </xsl:with-param>
    </xsl:call-template>

    <fo:list-item-label
end-indent="label-end()">
      <fo:block text-align="left">
      ....

I changed the last line shown to add the text-align
property.  This is the 
block inside the left part of the list-block that contains
the term and the 
acronym, so now they will stay within the same block and not
produce a line 
break.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "caporale" <tranceradihotmail.com>
To: <docbook-appslists.oasis-open.org>
Sent: Wednesday, July 11, 2007 7:53 AM
Subject: Re: [docbook-apps] Left aligning <glossterm>
instead of left 
justifying


>
> I put <xsl:param
name="alignment">start</xsl:param> in my
customization
> layer, and now I don't have the problem.
>
> Is this a valid fix?
>
> Thank you,
> Joseph Caporale
> -- 
> View this message in context: 
> http://ww
w.nabble.com/Left-aligning-%3Cglossterm%3E-instead-of-left-j
ustifying-tf4062305.html#a11541971
> Sent from the docbook apps mailing list archive at
Nabble.com.
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>
>
> 



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )