Hallo ConTeXt list members, 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 | ------- ------- ------- ------- ------- ------- for doublesided printing. I'd tried to set \setuparranging[2DOWN] or \setuparranging[2TOP] but it is not desired arrangement. I also experimented with \pusharrangedpage... \poparrangedpages... \handlearrangedpage... macros but I wasn't succsessful. Please, can somebody help me? Send answer also to my private address vit.zyka@seznam.cz since my dial up connection due to long time traveling does not enable to be member of the lively conference. Thanks, Vit Zyka
At 02:53 08/12/2003, you wrote:
Hallo ConTeXt list members,
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 | ------- ------- ------- ------- ------- ------- for doublesided printing. I'd tried to set \setuparranging[2DOWN] or \setuparranging[2TOP] but it is not desired arrangement. I also experimented with \pusharrangedpage... \poparrangedpages... \handlearrangedpage... macros but I wasn't succsessful.
Please, can somebody help me? Send answer also to my private address vit.zyka@seznam.cz since my dial up connection due to long time traveling does not enable to be member of the lively conference.
\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
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
At 09:01 25/12/2003, you wrote:
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
fyi: in context: \starttext \dorecurse {8} {\startstandardmakeup \cbox{Page \recurselevel} \stopstandardmakeup} \stoptext actually 4SIDE is not the right name (compared to 2SIDE), maybe 4SEQUENCE is better \def\poparrangedpagesTWOTOPSIDE {\ifnum\arrangedpageN>\zerocount \bgroup \gdef\arrangedpageN{2}\poparrangedpagesTWO \let\arrangedpageA\arrangedpageC \let\arrangedpageB\arrangedpageD \gdef\arrangedpageN{2}\poparrangedpagesTWO \doglobal\newcounter\arrangedpageN \egroup \fi} \def\pusharrangedpageTWOTOPSIDE#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} \installpagearrangement 2TOPSIDE {\dosetuparrangement{1}{2}{4}{2}{3}% \pusharrangedpageTWOTOPSIDE\poparrangedpagesTWOTOPSIDE\handlearrangedpageTOP} works ok with : \setuppapersize[A5,landscape][A4] \setuparranging[2TOPSIDE] \starttext \dorecurse{8}{Page \recurselevel\page} \stoptext Hans Hans
Hi Hans,
\setuppapersize[A5,landscape][A4] \setuparranging[2TOPSIDE]
it is better, but still I obtain different solution that is desired. There is an empty sheet before the last one if \pageno mod 4 != 0 My result in the table: sheet contains pages: sheet should contain pages #pages #sheets 1 2 3 4 5 6 7 1 2 3 4 1 3 1- -- -- 1- (--) 2 3 1- -- 2- 1- 2- 3 3 13 -- 2- 13 2- 4 2 13 24 13 24 5 7 13 24 5- -- -- 13 24 5- (--) 6 5 13 24 5- -- 6- 13 24 5- 6- 7 5 13 24 57 -- 6- 13 24 57 6- 8 4 13 24 57 68 13 24 57 68 - = empty page Is problem in my old ConTeXt or in the macro? ConTeXt ver: 2003.9.25 fmt: 2003.10.21 int: english mes: english
fyi: in context: \starttext \dorecurse{8}{Page \recurselevel\page} \stoptext
Hmm, a bit less typing. And one more question related arranging. I suppose, that arranging has no effect to the page contents. But using \setuparranging the empty table of content occures. If not use \setuparranging toc is OK. Testing file: ------------------------------ \setuppapersize[A5,landscape][A4] %\setuparranging[2TOPSIDE] \starttext Content: \placecontent \switchtobodyfont[20pt] \dorecurse{7}{\section{Section \recurselevel}Page \recurselevel\page} \stoptext --------------------------------- Good luck in this year. Vit Zyka
participants (2)
-
Hans Hagen
-
Vit Zyka