Hi Hans, thanks you for your solution of the page arrangement. It behaves well but it adds two empty sheets and if (number of pages) mod 4 != 0 also it adds an empty sheet between two last. I try to illustrate by table: sheet contains pages: desired pages on theet: #pages #sheets 1 2 3 4 5 6 7 1 2 3 4 1 5 1- -- -- -- -- 1- 2 5 1- -- 2- -- -- 1- 2- 3 5 13 -- 2- -- -- 13 2- 4 4 13 24 -- -- 13 24 5 7 13 24 5- -- -- -- -- 13 24 5- -- 6 7 13 24 5- -- 6- -- -- 13 24 5- 6- 7 7 13 24 57 -- 6- -- -- 13 24 57 6- 8 6 13 24 57 68 -- -- 13 24 57 68 - = empty page Here is testing code: --------------------------------------------------- \setuppapersize[A5,landscape][A4] \setuparranging[4SIDE] %\setuppagenumbering[alternative=singlesided] \newcount\N \starttext \switchtobodyfont[20pt] \loop \advance\N by1 \vfill \cbox{Page \the\N} \vfill\eject \ifnum\N<8\repeat \stoptext ------------------------------------------------------ Thank you Vit Zyka
I'd like to arrange A5 landscape pages to A4 in this order ------- ------- ------- ------- ------- ------- | 1 | | 2 | | 5 | | 6 | | 9 | | 10 | ------- ------- ------- ------- ------- ------- | 3 | | 4 | | 7 | | 8 | | 11 | | 12 | ------- ------- ------- ------- ------- ------- \installpagearrangement 4SIDE {\dosetuparrangement{1}{2}{4}{2}{3}%
\pusharrangedpageFOURSIDE\poparrangedpagesFOURSIDE\handlearrangedpageTOP}
\def\pusharrangedpageFOURSIDE#1% {\doglobal\increment\arrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}000\arrangedpageA % 1 \or \handlearrangedpageXandY{#1}000\arrangedpageC % 2 \or \handlearrangedpageXandY{#1}000\arrangedpageB % 1 \or \handlearrangedpageXandY{#1}000\arrangedpageD % 2 \poparrangedpages \fi}
\def\poparrangedpagesFOURSIDE {\bgroup \gdef\arrangedpageN{2}% \poparrangedpagesTWO \let\arrangedpageA\arrangedpageC \let\arrangedpageB\arrangedpageD \gdef\arrangedpageN{2}% \poparrangedpagesTWO \egroup}
\setuppapersize[A5,landscape][A4] \setuparranging[4SIDE]
\starttext
\dorecurse{20}{\input tufte \page}
\stoptext