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] Ordered list and line alignment in pdf-files

What you are seeing is that each of the list-item-label and list-item-body blocks are aligned to the top of the row (the "before" side). Normally that isn't a problem because both parts are text.  But when you added the inline graphic, that line became taller, so the text no longer aligns.
The solution is to add a relative-align="baseline" property to each fo:list-item.  The easiest way to do that is with this attribute-set, which is applied to each fo:list-item:
<xsl:attribute-set name="list.item.spacing">
  <xsl:attribute name="relative-align">baseline</xsl:attribute>
I can't think of a reason why this should not be the default setting for these lists.  Unless someone objects, I'll add it for the next release.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
Sent: Saturday, April 10, 2010 10:00 AM
Subject: [docbook-apps] Ordered list and line alignment in pdf-files

I'm trying to include inline images (small icons) to a step-list using DocBook XML V4.5, docbook-xsl.1.75.1 and XEP (4.16) to produce pdf-files.
The problem I experience is that the text row is aligned below the baseline of the digit in the ordered list.
The image is aligned with the baseline of the text.
Example screenshot: http://imgur.com/QVy5c.jpg
Is there any way to come around this problem?
FO and xml-source attached below.
Best regards,

<fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To select a new style, do the following:</fo:block><fo:list-block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" provisional-distance-between-starts="1.2em" id="N1093B"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1093E"><fo:list-item-label end-indent="label-end()"><fo:block>1.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Click <fo:external-graphic src="url(graphics_gif/icon.gif)" width="auto" height="auto" content-width="auto" content-height="auto"/>.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10946"><fo:list-item-label end-indent="label-end()"><fo:block>2.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Select <fo:external-graphic src="javascript:void(0);" width="auto" height="auto" content-width="auto" content-height="auto"/> <fo:inline font-weight="bold">Style</fo:inline>.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10952"><fo:list-item-label end-indent="label-end()"><fo:block>3.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Select a predefined style, or click <fo:inline font-weight="bold">Custom scheme</fo:inline> to
select a color of your choice.</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block>
<para>To select a new style, do the following:</para>
<orderedlist><listitem><para>Click <inlinemediaobject><imageobject><imagedata fileref="graphics_gif/icon.gif"/></imageobject></inlinemediaobject>.</para></listitem>
<listitem><para>Select <inlinemediaobject><imageobject><imagedata fileref="icons_jpg/style.JPG"/></imageobject></inlinemediaobject> <guimenuitem>Style</guimenuitem>.</para></listitem>
<listitem><para>Select a predefined style, or click <guimenuitem>Custom scheme</guimenuitem> to
select a color of your choice.</para></listitem></orderedlist>

Köp bläckpatron, toner eller fotopapper för 1 kr hos Inkclub. Beställ före kl. 19 för
leverans till din hemadress redan nästa vardag. Det är bekvämt, snabbt och enkelt. Beställ på


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