Hi Michael,
An XSL-FO output file is structured into a series of fo:page-sequences, each
with its own designation of a page-master to declare the page specs. The
default processing of article is to put each article in its own
fo:page-sequence. That always forces a page break between articles.
To prevent such page breaks, the XSL template matching on book in
fo/division.xsl would need to be customized. When it encounters a set of
articles, it should start a single fo:page-sequence and apply-templates to
all the articles inside that sequence. But since fo:page-sequences cannot
be nested, you would also need to customize the template for article in
fo/component.xsl to remove its fo:page-sequence.
The templates for article titlepages do not insert page breaks, despite
being named recto and verso. The page breaks for article are normally
handled by the fo:page-sequence.
Let me know if you need more help implementing this.
Bob Stayton
Sagehill Enterprises
[email protected]
--------------------------------------------------
From: "Michael Broschinsky" <[email protected]>
Sent: Saturday, March 16, 2013 3:18 PM
To: <[email protected]>
Subject: [docbook-apps] How to remove page breaks between articles in book
I have the following Docbook file:
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude">
<info>
<title>Family History Encyclopedia</title>
</info>
<article>
<title>Article the first</title>
<para>Now is the time for all good men to come to the aid of their
country. We hold these truths to be self-evident; that all men are created
equal. Four-score and seven years ago. Ask not what your country can do
for your, as what you can do for your country. Whatever the mind of man
can conceive, it can acheive.</para>
</article>
<article>
<title>Article the second</title>
<para>Now is the time for all good men to come to the aid of their
country. We hold these truths to be self-evident; that all men are created
equal. Four-score and seven years ago. Ask not what your country can do
for your, as what you can do for your country. Whatever the mind of man
can conceive, it can acheive.</para>
</book>
I process this file using the stock DocBook stylesheets to produce fo
output using this command line:
C:\Programs>xsltproc --output book.fo --stringparam column.count.body 2
C:\Programs\docbook-xsl-ns\fo\docbook.xsl book.xml
I then process using fop ver. 1.1 to get the pdf output.
The articles each begin a new page. I poked around in the stylesheets and
found titlepage.templates.xsl which seems to default to haveing articles
always begin on a recto page. Is it possible to have the articles appear
consecutively?
Thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]