This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] Keeping Text Together in a Printed Document
- From: Dave Pawson <davep at dpawson dot co dot uk>
- To: David Ashley <dashley at us dot ibm dot com>
- Cc: Docbook List <docbook at lists dot oasis-open dot org>
- Date: Fri, 25 Feb 2005 18:21:59 +0000
- Subject: Re: [docbook] Keeping Text Together in a Printed Document
- References: <OF4472BE26.D110AB50-ON06256FB2.0070DE05-06256FB2.00717C5D@us.ibm.com>
- Reply-to: davep at dpawson dot co dot uk
On Thu, 2005-02-24 at 14:39 -0600, David Ashley wrote:
> How can I force DocBook to keep text in a <programlisting> together?
> Program listings can be broken by page breaks in a printed document by
> default and in some cases I would like to force the listing to be kept
> together on the same printed page. Is there a way to do this?
Yes. Either copy the programlisting into your driver file
(the one you call from the command line)
or amend the actual one (not advisable if you update)
or
if its a single transform, amend the fo output;
such that the fo:block has an attribute
keep-together='always'
or keep-together.within-page=''
http://www.w3.org/TR/xsl/slice7.html#keep-together
values can be 'always' or an integer (higher the stronger)
HTH DaveP