Next in thread →
Next in month →
Re: [docbook-apps] indenting verbatim environments
On Tue, Nov 04, 2003 at 03:58:40AM -0500, Robert P. J. Day wrote:
>
> given that i was having some problems with this before, and i'm just
> about to upgrade to the 1.62.4 stylesheets, what's the recommended way to
> add a small indent to my verbatim environments? the previous problem was
> that the indent i was trying to add did not take into account whether the
> verbatim element was already a child element and therefore already
> indented. so which is the correct approach?
>
> <!--
> <xsl:attribute-set name="monospace.verbatim.properties">
> <xsl:attribute name="margin-left">0.25in</xsl:attribute>
> </xsl:attribute-set>
> -->
>
> <!--
> <xsl:attribute-set name="monospace.verbatim.properties">
> <xsl:attribute name="start-indent">body-start() + 0.25in</xsl:attribute>
> </xsl:attribute-set>
> -->
The "right" answer is to use margin-left, which indents
relative to the containing block. start-indent is
measured relative to the reference container, which is
usually the page. The thread about using the body-start()
function outside of a fo:list-block seemed to conclude that
it wasn't appropriate.
But FOP doesn't seem to properly handle nested margin-left
indents. XEP does. So the "right" answer depends on your
FO processor.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email:
Next in thread →
Next in month →