OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Controlling page breaks in pdf


Hi,
There is another solution that doesn't require hard page breaks.  Hard page
breaks are a quick fix, but they make maintenance of the file a pain.  You
end up adding and deleting hard page breaks every time the document is
edited, in order to fix bad breaks introduced by the hard page breaks that
get moved by the edits.

Version 1.66.1 of the stylesheets introduced soft page breaks, which work
with XEP and Antenna House (but not FOP, unfortunately).  The soft page
break is implemented as a processing instruction, so you don't need a
stylesheet customization.  With a soft page break, you indicate how much
space you need on the page from that point.  If there is enough space,
nothing happens.  If there isn't enough space left, the page breaks.

Here is  how you would do it for a section when using XEP:

<section>
<title>My section title</title>
<?dbfo-need height="2in" ?>
<para>etc.

You have to estimate or measure how much space you need, so an initial
printout is handy.

Normally you would put the PI before the <section> tag, but there is a
glitch with XEP and it doesn't work quite right there.  Putting it after the
title works because the title has a keep-with-next property, so it is kept
with the "need" and it works.

The best thing about soft page breaks is that you don't need to worry about
them if you edit your document. They only work when they need to.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Gurra Green" <gurra_green@hotmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, November 15, 2004 11:37 PM
Subject: [docbook-apps] Controlling page breaks in pdf


> Hello!
>
> I'm setting up an environment for creating user guides for a product at my
> company, switching from FrameMaker to DocBook. Unevitably, all (the few)
> good sides of FM are compared by my co-writers/fellow content authors
> whenever FM has a benefit. After all, the switch in work procedure is
rather
> big.
>
> This means that I have to point-mark a number of issues of the type "in
> FrameMaker I could do this, why can I not do this with DocBook? DocBook
must
> be crap" (however, the resistance has been lower than I expected, much
> because FM is not a simple tool for the casual author either).
>
> One of my current issues is controlling the way paragraphs are handled in
> relation to page breaks. In most cases it works fine as is, but for
example
> I have a book with a section in a chapter, and the section starts with one
> header, one two-line sentence ending with a colon (:) and then an
unordered
> list. I get a page break after the colon, before the first bullet. This
has
> been considered Bad by the output jury.
>
> I see two solutions; either insert a manual page break for the section,
> getting the header on top of the next side (but the <beginpage> did not do
> that as I discovered) or use some other mechanism to make the short
> paragraph stay with the bullet list and I expect the section header to
> follow the paragraph over to the next page in that case.
>
> What is the list's opinions on this problem?
>
> I use xsltproc/XEP to produce my pdf, docbook 4.2 and a thin customization
> layer with mostly parameter settings.
>
> Best regards,
>   G
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]