Next in thread → Next in month →

Re: [docbook] Alignment of external graphic inserted as style icon

From
Jean-Francois Weissmann <>
Date
2014-02-10T12:50:22+00:00
ID
Thread
Re: [docbook] Alignment of external graphic inserted as style icon
I use a vertical-align=« middle » and everything went fine in the end!
Thanks,
JF

Le 10 févr. 2014 à 13:12, Jean-Francois Weissmann <> a écrit :

> Hi,
> I defined a style for my weblink as follows:
> 
> <xsl:template match="d:link[@xrefstyle = 'web']">
>  <xsl:param name="content">
>    <xsl:call-template name="simple.xlink">
>      <xsl:with-param name="content">
>        <xsl:apply-templates/>
>      </xsl:with-param>
>    </xsl:call-template>
>  </xsl:param>
>  <fo:external-graphic src="url({$weblink})" height="9pt" content-width="scale-down-to-fit »/>
>  <xsl:text>&#160;</xsl:text>
>  <fo:inline color="#0066cc" text-decoration="underline">
>    <xsl:call-template name="anchor"/>
>    <xsl:if test="@dir">
>      <xsl:attribute name="direction">
>        <xsl:choose>
>          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
>          <xsl:otherwise>rtl</xsl:otherwise>
>        </xsl:choose>
>      </xsl:attribute>
>    </xsl:if>
>    <xsl:copy-of select="$content"/>
>  </fo:inline>
> </xsl:template>
> 
> The problem is that even if my SVG file behind the variable $weblink is 10pt x 10pt, and the size of my body text is also 10pt, I can not manage to correctly align the icon and the text: the icon is always sort of "aligned in the upper left corner" of the container where the actual SVG icon is display. Does a proper tie like vertical-align would work in that case, any other ideas?
> 
> Many Thanks,
> JF
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
Next in thread → Next in month →