ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to make page break & headers in XY arrangements?
@ 2020-03-30 11:03 Mojca Miklavec
  2020-03-30 11:21 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2020-03-30 11:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

Stupid question: what's the proper way to introduce an actual page
break and put some header on the paper holding the XY arrangement of
smaller pages?

I know I can create the second document which includes the first one
and adds page numbers on top, but I'm sure there's a more elegant way
to achieve the same.

Thank you,
    Mojca

\setuppapersize
    [XY][A4]
\setuppaper
    [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13]
\setuplayout
    [page]
    [topspace=2mm,backspace=2mm]
\setuplayout
    [page]
\setuplayout
    [location=middle]
\setuparranging
    [XY]
\showframe
\setupbodyfont
    [8pt]

\def\somecontent#1{\startpagemakeup #1 \stoppagemakeup}

\starttext

% I want to mark the page with label numbers
\setupheadertexts[1][1][1][1]%
\dorecurse{50}{\somecontent{Label ONE}}

% I want an actual page break here
\page

\setupheadertexts[2][2][2][2]%
\dorecurse{70}{\somecontent{Label TWO}}

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to make page break & headers in XY arrangements?
  2020-03-30 11:03 How to make page break & headers in XY arrangements? Mojca Miklavec
@ 2020-03-30 11:21 ` Hans Hagen
  2020-03-30 12:21   ` Mojca Miklavec
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2020-03-30 11:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mojca Miklavec

On 3/30/2020 1:03 PM, Mojca Miklavec wrote:
> Hi,
> 
> Stupid question: what's the proper way to introduce an actual page
> break and put some header on the paper holding the XY arrangement of
> smaller pages?
> 
> I know I can create the second document which includes the first one
> and adds page numbers on top, but I'm sure there's a more elegant way
> to achieve the same.
> 
> Thank you,
>      Mojca
> 
> \setuppapersize
>      [XY][A4]
> \setuppaper
>      [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13]
> \setuplayout
>      [page]
>      [topspace=2mm,backspace=2mm]
> \setuplayout
>      [page]
> \setuplayout
>      [location=middle]
> \setuparranging
>      [XY]
> \showframe
> \setupbodyfont
>      [8pt]
> 
> \def\somecontent#1{\startpagemakeup #1 \stoppagemakeup}
> 
> \starttext
> 
> % I want to mark the page with label numbers
> \setupheadertexts[1][1][1][1]%
> \dorecurse{50}{\somecontent{Label ONE}}
> 
> % I want an actual page break here
> \page

a rather stipid solution:

\dorecurse{15}{\page[empty]}


> \setupheadertexts[2][2][2][2]%
> \dorecurse{70}{\somecontent{Label TWO}}
> 
> \stoptext
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to make page break & headers in XY arrangements?
  2020-03-30 11:21 ` Hans Hagen
@ 2020-03-30 12:21   ` Mojca Miklavec
  2020-03-30 13:05     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2020-03-30 12:21 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Mon, 30 Mar 2020 at 13:21, Hans Hagen wrote:
> On 3/30/2020 1:03 PM, Mojca Miklavec wrote:
> >
> > % I want an actual page break here
> > \page
>
> a rather stipid solution:
>
> \dorecurse{15}{\page[empty]}

I did think of this one (and actually did it for the batch that I had
to print today).
But it involves manual counting and when data changes, the file needs
to be adjusted every time.

Anyway, this is relatively low priority. If there is no mechanism for
this in place already, there's no need to add anything new. I can live
with a few manual adjustments, and I guess I could do something based
on current page number modulo total subpages as well.

Thank you,
    Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to make page break & headers in XY arrangements?
  2020-03-30 12:21   ` Mojca Miklavec
@ 2020-03-30 13:05     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2020-03-30 13:05 UTC (permalink / raw)
  To: Mojca Miklavec; +Cc: mailing list for ConTeXt users

On 3/30/2020 2:21 PM, Mojca Miklavec wrote:
> On Mon, 30 Mar 2020 at 13:21, Hans Hagen wrote:
>> On 3/30/2020 1:03 PM, Mojca Miklavec wrote:
>>>
>>> % I want an actual page break here
>>> \page
>>
>> a rather stipid solution:
>>
>> \dorecurse{15}{\page[empty]}
> 
> I did think of this one (and actually did it for the batch that I had
> to print today).
> But it involves manual counting and when data changes, the file needs
> to be adjusted every time.
> 
> Anyway, this is relatively low priority. If there is no mechanism for
> this in place already, there's no need to add anything new. I can live
> with a few manual adjustments, and I guess I could do something based
> on current page number modulo total subpages as well.\setuppapersize
     [XY][A4]
\setuppaper
     [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13]
\setuplayout
     [page]
     [topspace=2mm,backspace=2mm]
\setuplayout
     [page]
\setuplayout
     [location=middle]
\setuparranging
     [XY]
\showframe
\setupbodyfont
     [8pt]

\def\somecontent#1{\startpagemakeup #1 \stoppagemakeup}

\starttext

\installpagebreakmethod{mojca}
   {\page
    \scratchcounterone 
\numexpr\rootlayouttargetparameter{nx}*\rootlayouttargetparameter{ny}\relax
    \scratchcountertwo 
\luaexpr{math.mod(\the\realpageno-1,\the\scratchcounterone)}%
    \scratchcounterthree\numexpr\scratchcounterone-\scratchcountertwo\relax
    \dorecurse\scratchcounterthree{\page[empty]}}

\setupheadertexts[1][1][1][1]\dorecurse{50}{\somecontent{Label 1 #1}} 
\page[mojca]
\setupheadertexts[2][2][2][2]\dorecurse{70}{\somecontent{Label 2 #1}} 
\page[mojca]
\setupheadertexts[3][3][3][3]\dorecurse{10}{\somecontent{Label 3 #1}} 
\page[mojca]
\setupheadertexts[4][4][4][4]\dorecurse{30}{\somecontent{Label 3 #1}} 
\page[mojca]

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-03-30 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 11:03 How to make page break & headers in XY arrangements? Mojca Miklavec
2020-03-30 11:21 ` Hans Hagen
2020-03-30 12:21   ` Mojca Miklavec
2020-03-30 13:05     ` Hans Hagen

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).