ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* page arrangement
@ 2003-12-08  1:53 Vit Zyka
  2003-12-08 11:10 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Vit Zyka @ 2003-12-08  1:53 UTC (permalink / raw)


 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: page arrangement
  2003-12-08  1:53 page arrangement Vit Zyka
@ 2003-12-08 11:10 ` Hans Hagen
  2003-12-25  8:01   ` Vit Zyka
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2003-12-08 11:10 UTC (permalink / raw)
  Cc: 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: page arrangement
  2003-12-08 11:10 ` Hans Hagen
@ 2003-12-25  8:01   ` Vit Zyka
  2004-01-04 18:57     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Vit Zyka @ 2003-12-25  8:01 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: page arrangement
  2003-12-25  8:01   ` Vit Zyka
@ 2004-01-04 18:57     ` Hans Hagen
  2004-01-05  9:27       ` Vit Zyka
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2004-01-04 18:57 UTC (permalink / raw)


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  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: page arrangement
  2004-01-04 18:57     ` Hans Hagen
@ 2004-01-05  9:27       ` Vit Zyka
  0 siblings, 0 replies; 6+ messages in thread
From: Vit Zyka @ 2004-01-05  9:27 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* page arrangement
@ 2003-12-02  5:22 Vit Zyka
  0 siblings, 0 replies; 6+ messages in thread
From: Vit Zyka @ 2003-12-02  5:22 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-01-05  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-08  1:53 page arrangement Vit Zyka
2003-12-08 11:10 ` Hans Hagen
2003-12-25  8:01   ` Vit Zyka
2004-01-04 18:57     ` Hans Hagen
2004-01-05  9:27       ` Vit Zyka
  -- strict thread matches above, loose matches on Subject: below --
2003-12-02  5:22 Vit Zyka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).