[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] AW: Graphical admonition in FO: Alignment?
Hi,The way I interpret your examples is that just adding the red border to the block in the list-item-body changes the alignment of the list-item-label. Is that right? That should not happen. What FO processor are you using?
Can you be a bit more precise on your need: "What I need is to align the list body text with the middle of the graphic, not the top." The "middle of the graphic" is a precise point, but the text can span multiple lines. Do you mean the baseline of the first line of the body?
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 4/17/2015 12:02 AM, Kallauch, Benjamin (EEIN) wrote:
Dear all, I made some further tests on the admonition alignment and incidentally discovered a strange behavior. If I made the <fo:block> inside the item body visible with a red dotted line, the inner block (built through <apply-templates>) is rendered on the bottom of its outer block. Here is an example code: <fo:list-item-body start-indent="body-start()"> <fo:block xsl:use-attribute-sets="admonition.properties" border="thin dotted red"> <xsl:apply-templates/> </fo:block> </fo:list-item-body> As soon as the <fo:block> is empty and without any graphical content it seems to be not considered as rendered block. That’s ok, but then the inner content (apply-templates) ist rendered differently: <fo:list-item-body start-indent="body-start()"> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> </fo:list-item-body> Any suggestions, how I can control the behavior? Maybe leave out the <fo:block> element, because a block will already be rendered due to apply-templates? best regards, Ben *Von:*Kallauch, Benjamin (EEIN) *Gesendet:* Donnerstag, 16. April 2015 11:25 *An:* docbook-apps@lists.oasis-open.org *Betreff:* [docbook-apps] Graphical admonition in FO: Alignment? Dear all, I have some difficulties to understand how to align the List Item Graphic with the first text line in the list body. In my example (attachment) the list body seems to be aligned with the top of the graphic (the graphic has actually no surrounding white space around). The background colors and line are set manually to see better what’s going on. What I need is to align the list body text with the middle of the graphic, not the top. Several tests with the fo-attribute “alignment-baseline” did not bring any solution. Here is my current stylesheet code for generating this type of admonition: <xsl:template match="tip" name="volkswagen.tip.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="graphical.admonition.properties" border="thin dotted black"> <fo:list-block provisional-distance-between-starts="{$graphic.width} + 6pt" provisional-label-separation="6pt"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block background-color="#EEFFEE"> <fo:external-graphic width="auto" height="auto" content-width="{$graphic.width}"> <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()"> <fo:block xsl:use-attribute-sets="admonition.properties" background-color="#FFEEEE"> <xsl:apply-templates/> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </fo:block> </xsl:template> Does anyone has a good idea how to control alignment between list item labels and their body text? Thanks, Ben. --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]