Hi Bernhard,

In this case you will need to copy the template that processes captions to your customization layer and modify it.  It is in fo/graphics.xsl and looks like this:

<xsl:template match="mediaobject/caption|figure/caption">
  <fo:block>
    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
      <xsl:attribute name="text-align"><xsl:value-of
select="@align"/></xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

In your customization, you could add a line like this:

<xsl:attribute name="margin-left">2cm</xsl:attribute>

after the <fo:block> line.  An <xsl:attribute> element adds its attribute to the start tag of the element it is in (fo:block here), but it must appear before any actual content of the element, which in this case is generated by the <xsl:apply-templates/> statement.

I was surprised that there was not already a "caption.properties" attribute set to allow easier customization.  I'll add that for the next stylesheet release.

Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 10/5/2018 7:44 AM, Bernhard Kleine wrote:

I had tomatoes over my eyes: I have not seen the caption tag.

Now the question is : How to indent all the captions by lets say 2 cm.

Regards

Bernhard


Am 05.10.2018 um 03:47 schrieb Bob Stayton:

Other than the title, which is placed according to that param, the content of figure is presented in the same order as it appears in the XML.  So if you move your legend para after mediaobject, it will appear below.

Bob Stayton
Sagehill Enterprises
b...@sagehill.net
On 10/4/2018 11:43 AM, Bernhard Kleine wrote:
I have numerous figures in my book. So far I have constructs like

<figure>
<title/>
<para>Here is the legend</para>
<mediaobject/>
</figure>

When I send the title to below the figure with

formal.title.placement: figure after

then the legend stays above. Can I find an instruction to move the
legend likewise  after the figure.

I have looked into the docbook 5 guide and the docbook XSL guide.
Legends are not mentioned.

Regards

Bernhard



--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com,www.urseetal.net
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Reply via email to