This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] a couple quick questions re: docbook -> FO ->PDF


On Tue, 20 May 2003, Christopher R. Maden wrote:

> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> At 04:55 20/5/03, Robert P. J. Day wrote:
> >1) how to automatically push a new book/chapter to the next odd
> >    page.
> >
> >    there's lots of stuff regarding "auto-odd" in fo/pagesetup.xsl
> >    but i don't see how to do this right offhand.  (i've selected
> >    double-sided output.)
> 
> There are two controls for this in FO: initial-page-number="auto-odd" 
> starts the page-sequence on an odd page, and force-page-count="end-on-even" 
> forces this page-sequence to end on an even page.  I recommend using both.
> 
> How?  Good question.  The DocBook XSL stylesheets aren't really 
> parameterized for this; there probably should be a 
> start.components.on.recto parameter or something.  I did it with a horrible 
> hack, taking advantage of the fact that in XSLT you can always create an 
> attribute in an element if there's been no content yet:
> 
>    <xsl:template match="*" mode="running.head.mode">
>      <xsl:param name="master-reference" select="'unknown'"/>
>      <xsl:param name="gentext-key" select="name(.)"/>
> 
>      <xsl:attribute name="force-page-count">
>        <xsl:text>end-on-even</xsl:text>
>      </xsl:attribute>
> 
>      <!-- rest of running.head.mode template from DocBook XSL -->
>    </xsl:template>

it does seem odd that something that's fairly standard should be this
difficult to get.

although it just occurred to me that i can make most of this hassle
go away by changing page numbering from simply 1->n to a combination
of chapter-page, so that my pages are numbered 1-1, 1-2, 1-3, ...,
2-1, 2-2.  then i just have to reproduce each double-sided chapter
separately and i won't have any problems.

maybe i'll give that a shot.

rday


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]