Changes

Jump to navigation Jump to search
1,045 bytes added ,  20:20, 8 June 2008
Added Wolfgangs example code to get to the back cover of a booklet.
This will run the document at first without page arrangment and impose the pages in a separate run after table of contents etc are created.
 
== Getting to the Back Cover of a Booklet ==
 
When using imposition to print an a5 booklet (a4 folded in half) John Devereux wanted to specify content for the back cover, independently of the actual number of pages in the booklet. Here is a way that worked (thanks to Wolfgang Schuster on the mailing list). \page[beforequadruple] gets to the inside back cover. Another \page gets to the outside back cover.
 
<texcode>
\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
 
\unprotect
 
\installpagebreakhandler {beforequadruple}%
{\ifdoublesided
\!!counta\realpageno
\!!countb\realpageno
\advance\!!counta 5
\divide\!!counta 4
\multiply\!!counta 4
\advance\!!countb 2
\advance\!!counta-\!!countb
\executepagebreakhandler\v!yes
\dorecurse\!!counta{\executepagebreakhandler\v!empty}%
\fi}
 
\protect
\starttext
\showframe
\subject Front Cover
 
\dorecurse{10}{\input tufte \par}
 
\page[beforequadruple]
 
Imprint
 
\page
 
Back Cover
 
\stoptext
</texcode>
Anonymous user

Navigation menu