Bugs item #556275, was opened at 2002-05-15 06:20
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=373747&aid=556275&group_id=21935
Category: DocBook XSL FO
Group: DocBook V4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Vincent O'Donnell (vincent_o)
Assigned to: Nobody/Anonymous (nobody)
Summary: procedure <step> number / content offset
Initial Comment:
Used a <procedure> in xml and found that in the final
pdf the content of the <step> was on the next line
from the number, e.g., like:
3.
Using the blah blah.
Used xalan to make the .fo file and fop to make the
pdf.
My xml looked like:
<step>
<para>
Using the blah blah.
</para>
</step>
and the resulting fo:
<fo:list-block space-before.optimum="1em" space-
before.minimum="0.8em" space-before.maximum="1.2em"
provisional-label-separation="0.2em" provisional-
distance-between-starts="2em">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block space-before.optimum="1em" space-
before.minimum="0.8em" space-before.maximum="1.2em"
id="N400084">1.</fo:block></fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block space-before.optimum="1em" space-
before.minimum="0.8em" space-
before.maximum="1.2em">Using the blah blah.</fo:block>
</fo:list-item-body>
</fo:list-item>
..
..
</fo:list-block>
On dockbook@..., David Cramer said:
Looking at the fo markup for orderedlists and
procecures, I see the differnece is that xsl:use-
attribute-sets="list.item.spacing" is being applied to
a fo:block inside the fo:list-item-label in
procedure/step, while it's applied to the fo:list-item
in itemizedlist/listitem.
He suggested using the following fix in a custom xsl:
<xsl:template match="step">
<xsl:variable name="id"><xsl:call-template
name="object.id"/></xsl:variable>
<fo:list-item id="{$id}" xsl:use-attribute-
sets="list.item.spacing">
<!-- moving list.item.spacing here for fop -->
<fo:list-item-label end-indent="label-end()">
<fo:block>
<xsl:choose>
<xsl:when test="count(../step) = 1">
<xsl:text>•</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."
mode="number">
<xsl:with-param name="recursive"
select="0"/>
</xsl:apply-templates>.
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<xsl:apply-templates/>
</fo:list-item-body>
</fo:list-item>
</xsl:template>
<!-- adding step/para[1] -->
<xsl:template match="listitem/para[1]
|listitem/simpara[1]
|listitem/formalpara[1]
|step/para[1]
|callout/para[1]
|callout/simpara[1]
|callout/formalpara[1]"
priority="2">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
This does the trick, but I suppose if it is really a
bug, its better to fix in the fo docbook.xsl
tamuch
V
----------------------------------------------------------------------
>Comment By: Norman Walsh (nwalsh)
Date: 2002-08-21 11:13
Message:
Logged In: YES
user_id=81663
Fixed in CVS.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=373747&aid=556275&group_id=21935
|