Keith Thank you for helping. I will try this as soon as I figure out
what is going. But in the mean while, Do I really need all these lines
of code? Here's my template, and I am pretty happy with it except for
the location of the icon:
<xsl:template match="tip">
<fo:inline>
<fo:instream-foreign-object alignment-baseline="middle">
<xsl:call-template name="tip-icon" />
</fo:instream-foreign-object>
</fo:inline>
<xsl:apply-templates />
</xsl:template>
Is there a possibility to move the icon little bit left using FO ?
Keith Fahlgren wrote:
On Wed, Mar 5, 2008 at 1:52 PM, Mansour <[EMAIL PROTECTED]> wrote:
I am trying to add an icon before the <tip> or <warning>. I need this
icon to the left of the block. I have added the icon I need using
<fo:instream-foreign-object> but no luck with positioning it before the
<tip>. Any ideas ?
Hi Mansour,
Here's the quite-ugly overriden template I use to do the same sort of
things for my titles, hope it helps:
<xsl:template name="graphical.admonition">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="graphic.width">
<xsl:apply-templates select="." mode="admon.graphic.width"/>
</xsl:variable>
<fo:block id="{$id}" xsl:use-attribute-sets="orm.zero.para.spacing">
<xsl:attribute name="line-stacking-strategy">max-height</xsl:attribute>
<xsl:if test="self::note|self::tip">
<xsl:attribute name="margin-left">14pt</xsl:attribute>
</xsl:if>
<fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
provisional-label-separation="18pt">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<fo:external-graphic height="auto">
<xsl:attribute name="width">auto</xsl:attribute>
<xsl:attribute name="src">
<xsl:call-template name="admon.graphic"/>
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<xsl:if test="$admon.textlabel != 0 or title">
<fo:block xsl:use-attribute-sets="admonition.title.properties">
<xsl:apply-templates select="." mode="object.title.markup"/>
</fo:block>
</xsl:if>
<fo:block xsl:use-attribute-sets="orm.admonition.properties">
<xsl:choose>
<!-- Modification to adjust for tip/note paw print -->
<xsl:when test="self::tip|self::note">
<xsl:attribute name="padding-top">7.5pt</xsl:attribute>
<xsl:attribute name="margin-left">-12pt</xsl:attribute>
<xsl:attribute name="margin-top">7.5pt</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="margin-left">2pt</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:block>
</xsl:template>
The reference attribute sets:
<xsl:attribute-set name="orm.zero.para.spacing">
<xsl:attribute name="space-before.optimum">0pc</xsl:attribute>
<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
<xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="orm.admonition.properties">
<xsl:attribute name="space-after">6pt</xsl:attribute>
<xsl:attribute name="start-indent">42pt</xsl:attribute>
<xsl:attribute name="end-indent">42pt</xsl:attribute>
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="padding-bottom">0pt</xsl:attribute>
<xsl:attribute name="padding-left">0pt</xsl:attribute>
<xsl:attribute name="padding-right">0pt</xsl:attribute>
<xsl:attribute name="padding-top">0pt</xsl:attribute>
<xsl:attribute name="space-before.optimum">0pc</xsl:attribute>
<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
<xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
</xsl:attribute-set>
Keith
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]