Changes

Jump to navigation Jump to search
1,023 bytes added ,  11:14, 9 June 2008
New pagebreakmethod nextquadruple added.
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 last page of a Booklet ==
When using you use imposition to print an a5 a booklet (a4 folded in half) John Devereux wanted you want to specify content for put something on the back coververy last page, independently of the actual <code>quadruple</code> pagebreak did not always fill the remaining pages untill you get a quadruple 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>
\unprotect
 
\startvariables all
nextquadruple: nextquadruple
\stopvariables
 
\installpagebreakhandler \v!nextquadruple
{\ifdoublesided
\!!counta\realpageno
\!!countb\realpageno
\advance\!!counta 4
\divide\!!counta 4
\multiply\!!counta 4
\advance\!!countb 1
\advance\!!counta-\!!countb
\executepagebreakhandler\v!yes
\dorecurse\!!counta{\executepagebreakhandler\v!empty}%
\fi}
 
\protect
 
\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
\starttext
 
\subject{Front Cover}
 
\dorecurse{10}{\input tufte \par}
 
\page[nextquadruple]
 
Back Cover
 
\stoptext
</texcode>
 
== 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>
\unprotect
\startvariables all beforequadruple: beforequadruple\stopvariables \installpagebreakhandler {\v!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
 
\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
 
\starttext
\showframe
\subject Front Cover
gardener
110

edits

Navigation menu