docbook: keep-with-next


Previous by date: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Next by date: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Previous in thread: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Next in thread: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton

Subject: Re: keep-with-next
From: Machtelt Garrels ####@####.####
Date: 6 Jun 2005 12:38:20 -0000
Message-Id: <Pine.LNX.4.44.0506061231220.7814-100000@cobra.xalasys.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 5 Jun 2005, David Horton wrote:

> Machtelt Garrels wrote:
> >
> > Hello David or anybody else who knows about this,
> >
> > A while ago I was told to use this for keeping together Q&A when printing:
> >
> >   <xsl:template match="instructions">
> >     <fo:block keep-with-next="always">Instructions</fo:block>
> >     <fo:block><xsl:apply-templates/></fo:block>
> >
> >   </xsl:template>
> >
> >
> > I'm really not a hero in this.  Where do I configure this?  And can it
> > also work for keeping together lists?


> The example above is useful if you are writing your own XSL style sheet
> or wanting to modify and existing one.  But maybe this is not what you
> are trying to do.  Is your original document is in DocBook XML and are
> you using the DocBook XSL stylesheets to transform it?  If so, what are
> you transforming it into?  Also, what tool are you using to do the
> transformation?

Hello Dave,

I am writing in DocBook XML, and using xsltproc to convert to FO, then I
use fop to convert to PDF.  I was trying to modify the lists.xsl that
comes with the DocBook XSL stylesheets, with no result.  I've modified the
stylesheets now to allow hard pagebreaks, but that is not at all handy, of
course.  I've changed from qandaset to orderedlists because it is more
handy for the numbering (multiple answers per question).  This is a sample
source:

<article>
<orderedlist>
	<listitem><para>Question 1</para>
		<orderedlist>
			<listitem><para>answer 1</para></listitem>
			<listitem><para>answer 2</para></listitem>
			<listitem><para>answer 3</para></listitem>
			<listitem><para>answer 4</para></listitem>
		</orderedlist>
	</listitem>

        <listitem><para>Question 2</para>
                <orderedlist>
                        <listitem><para>answer 1</para></listitem>
                        <listitem><para>answer 2</para></listitem>
                        <listitem><para>answer 3</para></listitem>
                        <listitem><para>answer 4</para></listitem>
                </orderedlist>
        </listitem>


</orderedlist>

What I want to obtain is that the questions are kept together with their
answers automatically.  So no page breaks after a question, no pagebreaks
in the middle of an answerlist.

Thanks for your time,

Tille.

- --
My Penguin, my freedom.		http://tille.xalasys.com
Books:				http://writers.fultus.com/garrels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCpEQnsIIUbMXbBA8RAv9dAKCc2CIkbEnFn9GcvOG6ITkg8yjeSACeImmv
n/TdW3pbsm4PzHm3acRL+8c=
=BCtX
-----END PGP SIGNATURE-----


Previous by date: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Next by date: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Previous in thread: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton
Next in thread: 6 Jun 2005 12:38:20 -0000 Re: keep-with-next, David Horton


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.