Clark Karr wrote:
>
> You're correct that XXE displays the captions and images centered, but when
> I convert the document to pdf only the image is centered (via the align
> attribute). So, I end up with the caption left justified and the image
> centered.
>
> It's hard to believe captions can't be centered; I hope it's just ignorance
> on my part. I can't find anything in the docbook documentation and was
> hoping you'd be able to help.
>
> In many ways, I like the XXE screen format better than that generated for
> pdf.
>
Centering the title of the figure in the generated PDF can be done by
customizing the corresponding DocBook XSL style sheet.
More precisely you need to add:
<xsl:attribute name="text-align">center</xsl:attribute>
to the formal.title.properties attribute set:
<xsl:attribute-set name="formal.title.properties"
use-attribute-sets="normal.para.spacing">
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"></xsl:value-of>
<xsl:text>pt</xsl:text>
</xsl:attribute>
<xsl:attribute name="hyphenate">false</xsl:attribute>
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
</xsl:attribute-set>
More info. in
http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
Unfortunately there is no easy way to do this from XMLmind XML Editor,
but if you want, you can directly edit
XXE_install_dir/addon/config/docbook/xsl/fo/param.xsl
(For DocBook 5, you'll have to edit
XXE_install_dir/addon/config/docbook5/xsl/fo/param.xsl)