----- Original Message -----
From: "Paul Millar" <[EMAIL PROTECTED]>
To: "Docbook Apps" <[email protected]>
Sent: Wednesday, November 21, 2007 11:55 AM
Subject: [docbook-apps] Questions on verbatim output
Hi,
I've two questions about fix-format verbatim environments like screen or
programlisting.
First, is it possible to make them less verbatim; specifically, to limit
the
width to (say) 80 columns? If a line exceeds the 80 character limit it
is
split and the remainder appears on the next line. Ideally, this would
include support for some kind of mark (an arrow?) indicating the line
should
have continued but has been truncated.
Yes, you can do this if you aren't using FOP. See this reference:
http://www.sagehill.net/docbookxsl/FittingText.html#BreakLongLines
Second, I believe the DocBook FO XSLT uses the same verbatim templates
for
screen and program lists. This allows customisation (e.g. smaller font,
coloured border) for all verbatim text. Is it possible to further
customise
the FO XSLT so (for example) screen has one background- and border-colour
whilst programlistings have a different bg- and border-color?
You can put choose statements inside an xsl:attribute inside an
xsl:attribute-set, and select based on self::screen or
self::programlisting. Here is an example from another part of my book:
<xsl:attribute-set name="formal.title.properties">
<xsl:attribute name="text-align">
<xsl:choose>
<xsl:when test="self::table">center</xsl:when>
<xsl:otherwise>left</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
You have to do this with each property. Be sure to include an
xsl:otherwise so you don't leave an empty attribute.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]