[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Why do captions appear centered?
> They do, both in HTML and FO output. I haven't tried this, but in looking at the code for both HTML and FO, it looks like the caption is included in the same block as the graphic, and so picks up any alignment you put on the <imagedata/> element itself. That should be easy enough to change: For HTML: <xsl:template match="mediaobject/caption|mediaobjectco/caption"> <div class="{name(.)}" align="left"> <xsl:apply-templates/> </div> </xsl:template> or even in CSS: .mediaobject .caption, .mediaobjectco .caption { text-align: left;} For FO: <xsl:template match="mediaobject/caption|mediaobjectco/caption"> <fo:block text-align="left"> <xsl:apply-templates/> </fo:block> </xsl:template> > > This only looks good when a caption is so small that it fits into one > line, but > > "A Caption is an extended description of a MediaObject." > > "Extended" means IMHO a block of text that can become quite > large. And > that's what my captions are. Else they were just titles. > > Am I wrong? I think the definition of 'extended' is open to some interpretation. Personally, I think a caption should be brief (about a line), just not as brief as a title. For example, <figure> <title>Opening Screen</title> <mediaobject> <imageobject>...</imageobject> <caption><para>The opening screen of the application gives users quick access to the most common tasks</para></caption> </mediaobject> </figure> My caption here is "extended" in relation to the figure title, but I think it would look just fine centered, if the image itself were centered. I think the current rendering by the XSLT stylesheets is just fine, and it's a cinch to change. Jeff Beal
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]