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] | [Elist Home]


Subject: Re: DOCBOOK-APPS: How to generically control print-output style issues.


On Sat, Dec 14, 2002 at 12:32:37PM +0000, Ashley J.S Mills wrote:
> I know this is FAQ but:
> 
> I want to create a number of page-breaks in some PDF output I am
> creating because the output being produced by FOP is silly. 
> 
> So I need some kind of way to insert a page-break. I saw in Dave
> Pawson's FAQ:
> 
> 2. How to insert a pagebreak into docbook output
> 
> The question looks like it has been their for a while hence the
> situation might have changed.
> 
> I know that inserting a page break is a style issue and hence
> perhaps is not for the stylesheets or tools to provide but I don't
> have PDF-Writer or whatever hence cannot change the output that is
> being produced in any quick manner (assuming this is possible
> with PDF-Writer or whatever) but I need a specific output.

Ideally, page breaks should be handled by the stylesheet
and FO processor, using keep-with-next and such.  But
FOP has limited keep capabilities at this point.


> What is the official stance on this? Are users expected to have
> PDF-Writer or whatever to control style issues?
> 
> I could manually edit the FO output and insert some kind of page
> break directive everytime I wanted a page break and will probably
> resort to that if I don't get a useful response here.

Ugh, don't do that, as those will be lost when you
have to regenerate the FO output.
 
> I could insert directives into the XML that causes the page break
> when the FO is produced. Can someone throw me a quick template
> or hack that does this?

Here is a quick hack.  Insert something like this where
you want a page break:

<?pagebreak?>

And add this to your stylesheet customization layer:

<xsl:template match="processing-instruction('pagebreak')">
    <fo:block break-after="page"/>
</xsl:template>

This is total brute force, and when you edit your document
and change your pagination, you'll still have those
PIs in there that you will probably have to remove or move.

 
> I don't get a useful response here I will work out how to do it
> myself but I thought that somebody might be able to help me shortcut
> this process and I think it is worth discussing since it seems to
> come up quite frequently.
> 
> This brings me to a more general point which is that of style,
> what does one do when one wants to adjust the PDF output of a
> DocBook document slightly but one does not want to go through
> the process of searching out the correct FO directive and
> hacking FO files in order to produce the desired results? 

The DocBook XSL stylesheets are highly customizable, but
you need doc to do it.  See:

http://www.sagehill.net/xml/docbookxsl/index.html
 
> This seems unpractical when the production of PDF documents is
> frequent enough and the results produced do not correlate with
> the desired results.

Absolutely.  The goal is a stylesheet customization
layer that generates desirable and reproducible results.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


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


Powered by eList eXpress LLC