ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \installpagearrangement doublesided stickers
       [not found] <404527216.1114701.1642342717214.ref@mail.yahoo.com>
@ 2022-01-16 14:18 ` Jigé via ntg-context
  2022-01-22 21:20   ` Willi Egger via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Jigé via ntg-context @ 2022-01-16 14:18 UTC (permalink / raw)
  To: ntg-context; +Cc: Jigé

Greetings everyone.

Well, it's not exactly about double-sided stickers but sort of. Imagine printing a double-sided sheet and using a so-called plastifying device to make tokens.
I began with the File Card and Labels examples from the wiki, then tried to change the \installpagearrangement example from the 'imposition' wiki page.

My question is:
how to position everything in the middle of the sheet, so that double-siding actually works?
As is, it's all in the top left corner. Changing the location argument for "location=middle" in \setuplayout doesn't work here. What should it be?

By the way, I'm not sure about the 3rd, 4th and 6th arguments in the dosetuparrangement command.

Thanks a lot!

Here it is:

\installpagearrangement 2*5*double*2*5
  {\dosetuparrangement{5}{2}{10}{3}{6}% X,Y,Total,hcutmarks,vcutmarks
       \pusharrangedpageTWOFIVEDOUBLESIDED\poparrangedpagesAB\relax}

\def\pusharrangedpageTWOFIVEDOUBLESIDED#1%
 {\advancearrangedpageN
  \reportarrangedpage\arrangedpageN
  \ifcase\arrangedpageN
  \or \handlearrangedpageXandY{#1}000\arrangedpageA %  1 rot,hskip,vskip
  \or \handlearrangedpageXandY{#1}010\arrangedpageB %  2
  \or \handlearrangedpageXandY{#1}010\arrangedpageA %  3
  \or \handlearrangedpageXandY{#1}000\arrangedpageB %  4
  \or \handlearrangedpageXandY{#1}001\arrangedpageA %  5
  \or \handlearrangedpageXandY{#1}011\arrangedpageB %  6
  \or \handlearrangedpageXandY{#1}011\arrangedpageA %  7
  \or \handlearrangedpageXandY{#1}001\arrangedpageB %  8
  \or \handlearrangedpageXandY{#1}002\arrangedpageA %  9
  \or \handlearrangedpageXandY{#1}012\arrangedpageB %  10
  \or \handlearrangedpageXandY{#1}012\arrangedpageA %  ...
  \or \handlearrangedpageXandY{#1}002\arrangedpageB %  
  \or \handlearrangedpageXandY{#1}003\arrangedpageA %  
  \or \handlearrangedpageXandY{#1}013\arrangedpageB %  
  \or \handlearrangedpageXandY{#1}013\arrangedpageA %  
  \or \handlearrangedpageXandY{#1}003\arrangedpageB %  
  \or \handlearrangedpageXandY{#1}004\arrangedpageA %  
  \or \handlearrangedpageXandY{#1}014\arrangedpageB %  
  \or \handlearrangedpageXandY{#1}014\arrangedpageA %  
  \or \handlearrangedpageXandY{#1}004\arrangedpageB %  
    \poparrangedpages
  \fi}

\definepapersize[Etiquette][width=80.0mm,height=50.0mm]
\setuppapersize [Etiquette][A4]
\setuparranging [2*5*double*2*5]
%\setuplayout [margin=0pt, width=fit]
\setuplayout[
  %location=middle,%nx=2,ny=5,
  %location=middle,
  location=left,
  marking=on,
  margin=0mm,
  topspace=0mm,
  backspace=0mm,
  width=fit,
  %header=0mm,
  %footer=0mm,
  %align=middle,
  ]

\showframe
%\setuppagenumbering[state=stop]
\setuppagenumbering[alternative=doublesided]

\starttext
\dorecurse{20}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page}
\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] 3+ messages in thread

* Re: \installpagearrangement doublesided stickers
  2022-01-16 14:18 ` \installpagearrangement doublesided stickers Jigé via ntg-context
@ 2022-01-22 21:20   ` Willi Egger via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Willi Egger via ntg-context @ 2022-01-22 21:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Hello Jigé,

Adapt your layout to the following and it works.

\setuplayout
[%]
margin=0mm,
topspace=0mm,
backspace=1mm,
width=80mm,
height=50mm,
nx=2,
ny=5,
dx=0mm,
dy=0mm,
location=middle,
marking=on,
]

Kind regards
Willi

> On 16 Jan 2022, at 15:18, Jigé via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Greetings everyone.
> 
> Well, it's not exactly about double-sided stickers but sort of. Imagine printing a double-sided sheet and using a so-called plastifying device to make tokens.
> I began with the File Card and Labels examples from the wiki, then tried to change the \installpagearrangement example from the 'imposition' wiki page.
> 
> My question is:
> how to position everything in the middle of the sheet, so that double-siding actually works?
> As is, it's all in the top left corner. Changing the location argument for "location=middle" in \setuplayout doesn't work here. What should it be?
> 
> By the way, I'm not sure about the 3rd, 4th and 6th arguments in the dosetuparrangement command.
> 
> Thanks a lot!
> 
> Here it is:
> 
> \installpagearrangement 2*5*double*2*5
> {\dosetuparrangement{5}{2}{10}{3}{6}% X,Y,Total,hcutmarks,vcutmarks
>      \pusharrangedpageTWOFIVEDOUBLESIDED\poparrangedpagesAB\relax}
> 
> \def\pusharrangedpageTWOFIVEDOUBLESIDED#1%
> {\advancearrangedpageN
> \reportarrangedpage\arrangedpageN
> \ifcase\arrangedpageN
> \or \handlearrangedpageXandY{#1}000\arrangedpageA %  1 rot,hskip,vskip
> \or \handlearrangedpageXandY{#1}010\arrangedpageB %  2
> \or \handlearrangedpageXandY{#1}010\arrangedpageA %  3
> \or \handlearrangedpageXandY{#1}000\arrangedpageB %  4
> \or \handlearrangedpageXandY{#1}001\arrangedpageA %  5
> \or \handlearrangedpageXandY{#1}011\arrangedpageB %  6
> \or \handlearrangedpageXandY{#1}011\arrangedpageA %  7
> \or \handlearrangedpageXandY{#1}001\arrangedpageB %  8
> \or \handlearrangedpageXandY{#1}002\arrangedpageA %  9
> \or \handlearrangedpageXandY{#1}012\arrangedpageB %  10
> \or \handlearrangedpageXandY{#1}012\arrangedpageA %  ...
> \or \handlearrangedpageXandY{#1}002\arrangedpageB %  
> \or \handlearrangedpageXandY{#1}003\arrangedpageA %  
> \or \handlearrangedpageXandY{#1}013\arrangedpageB %  
> \or \handlearrangedpageXandY{#1}013\arrangedpageA %  
> \or \handlearrangedpageXandY{#1}003\arrangedpageB %  
> \or \handlearrangedpageXandY{#1}004\arrangedpageA %  
> \or \handlearrangedpageXandY{#1}014\arrangedpageB %  
> \or \handlearrangedpageXandY{#1}014\arrangedpageA %  
> \or \handlearrangedpageXandY{#1}004\arrangedpageB %  
>   \poparrangedpages
> \fi}
> 
> \definepapersize[Etiquette][width=80.0mm,height=50.0mm]
> \setuppapersize [Etiquette][A4]
> \setuparranging [2*5*double*2*5]
> %\setuplayout [margin=0pt, width=fit]
> \setuplayout[
> %location=middle,%nx=2,ny=5,
> %location=middle,
> location=left,
> marking=on,
> margin=0mm,
> topspace=0mm,
> backspace=0mm,
> width=fit,
> %header=0mm,
> %footer=0mm,
> %align=middle,
> ]
> 
> \showframe
> %\setuppagenumbering[state=stop]
> \setuppagenumbering[alternative=doublesided]
> 
> \starttext
> \dorecurse{20}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page}
> \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
> ___________________________________________________________________________________

___________________________________________________________________________________
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] 3+ messages in thread

* Re: \installpagearrangement doublesided stickers
       [not found] <mailman.1026.1642886451.1172.ntg-context@ntg.nl>
@ 2022-02-11 22:55 ` Jigé via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Jigé via ntg-context @ 2022-02-11 22:55 UTC (permalink / raw)
  To: ntg-context; +Cc: Jigé


[-- Attachment #1.1: Type: text/plain, Size: 6227 bytes --]

 Thanks a lot Willi,

Sorry for the late reply. Actually, for a while I couldn't make it work.
But It seems it was just my \dosetuparrangement that was wrong.

Now it works. Here it is, cleaned-up:

\installpagearrangement 2*5*double*2*5
{\dosetuparrangement{2}{5}{10}{3}{6}
 % number of pages on the x axis,
 % number of pages on the y axis,
 % total (?),
 % number of cutmarks on the x axis,
 % number of cutmarks on the y axis,
 \pusharrangedpageTWOFIVEDOUBLESIDED\poparrangedpagesAB\relax}
\def\pusharrangedpageTWOFIVEDOUBLESIDED#1%
{\advancearrangedpageN
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
\or \handlearrangedpageXandY{#1}000\arrangedpageA % 1
 % Numbers starting from 0:
 % rotation state,
 % horizontal placement,
 % vertical placement.
\\or \handlearrangedpageXandY{#1}010\arrangedpageB % 2
\or \handlearrangedpageXandY{#1}010\arrangedpageA % 3
\or \handlearrangedpageXandY{#1}000\arrangedpageB % 4
\or \handlearrangedpageXandY{#1}001\arrangedpageA % 5
\or \handlearrangedpageXandY{#1}011\arrangedpageB % 6
\or \handlearrangedpageXandY{#1}011\arrangedpageA % 7
\or \handlearrangedpageXandY{#1}001\arrangedpageB % 8
\or \handlearrangedpageXandY{#1}002\arrangedpageA % 9
\or \handlearrangedpageXandY{#1}012\arrangedpageB % 10
\or \handlearrangedpageXandY{#1}012\arrangedpageA % ...
\or \handlearrangedpageXandY{#1}002\arrangedpageB %
\or \handlearrangedpageXandY{#1}003\arrangedpageA %
\or \handlearrangedpageXandY{#1}013\arrangedpageB %
\or \handlearrangedpageXandY{#1}013\arrangedpageA %
\or \handlearrangedpageXandY{#1}003\arrangedpageB %
\or \handlearrangedpageXandY{#1}004\arrangedpageA %
\or \handlearrangedpageXandY{#1}014\arrangedpageB %
\or \handlearrangedpageXandY{#1}014\arrangedpageA %
\or \handlearrangedpageXandY{#1}004\arrangedpageB %
 \poparrangedpages
\fi}

\definepapersize[Vignette][width=80.0mm,height=50.0mm]
\setuppapersize [Vignette][A4]
\setuparranging [2*5*double*2*5]
\setuplayout
 [margin=0pt,
 location=middle,
 marking=on]

\showframe
\starttext
\dorecurse{20}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page}
\stoptext


My aim is to have something as plain as possible
so I can modify it quickly to print double-sided cards, more likely from an image,
instead of using some clumsy wysiwyg editor.
Next thing is to find a sensible name for the layout. I'm not sure about the 2*5*double*2*5 name.
Thanks again.



> Date: Sat, 22 Jan 2022 22:20:36 +0100
> From: Willi Egger <context@boede.nl>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] \installpagearrangement doublesided
>     stickers
> Message-ID: <6A631259-75DC-4B7F-BE10-A0584908B5E9@boede.nl>
> Content-Type: text/plain;    charset=utf-8
> 
> Hello Jigé,
> 
> Adapt your layout to the following and it works.
> 
> \setuplayout
> [%]
> margin=0mm,
> topspace=0mm,
> backspace=1mm,
> width=80mm,
> height=50mm,
> nx=2,
> ny=5,
> dx=0mm,
> dy=0mm,
> location=middle,
> marking=on,
> ]
> 
> Kind regards
> Willi
> 
>> On 16 Jan 2022, at 15:18, Jigé via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> Greetings everyone.
>>
>> Well, it's not exactly about double-sided stickers but sort of. Imagine printing a double-sided sheet and using a so-called plastifying device to make tokens.
>> I began with the File Card and Labels examples from the wiki, then tried to change the \installpagearrangement example from the 'imposition' wiki page.
>>
>> My question is:
>> how to position everything in the middle of the sheet, so that double-siding actually works?
>> As is, it's all in the top left corner. Changing the location argument for "location=middle" in \setuplayout doesn't work here. What should it be?
>>
>> By the way, I'm not sure about the 3rd, 4th and 6th arguments in the dosetuparrangement command.
>>
>> Thanks a lot!
>>
>> Here it is:
>>
>> \installpagearrangement 2*5*double*2*5
>> {\dosetuparrangement{5}{2}{10}{3}{6}% X,Y,Total,hcutmarks,vcutmarks
>>      \pusharrangedpageTWOFIVEDOUBLESIDED\poparrangedpagesAB\relax}
>>
>> \def\pusharrangedpageTWOFIVEDOUBLESIDED#1%
>> {\advancearrangedpageN
>> \reportarrangedpage\arrangedpageN
>> \ifcase\arrangedpageN
>> \or \handlearrangedpageXandY{#1}000\arrangedpageA %  1 rot,hskip,vskip
>> \or \handlearrangedpageXandY{#1}010\arrangedpageB %  2
>> \or \handlearrangedpageXandY{#1}010\arrangedpageA %  3
>> \or \handlearrangedpageXandY{#1}000\arrangedpageB %  4
>> \or \handlearrangedpageXandY{#1}001\arrangedpageA %  5
>> \or \handlearrangedpageXandY{#1}011\arrangedpageB %  6
>> \or \handlearrangedpageXandY{#1}011\arrangedpageA %  7
>> \or \handlearrangedpageXandY{#1}001\arrangedpageB %  8
>> \or \handlearrangedpageXandY{#1}002\arrangedpageA %  9
>> \or \handlearrangedpageXandY{#1}012\arrangedpageB %  10
>> \or \handlearrangedpageXandY{#1}012\arrangedpageA %  ...
>> \or \handlearrangedpageXandY{#1}002\arrangedpageB % 
>> \or \handlearrangedpageXandY{#1}003\arrangedpageA % 
>> \or \handlearrangedpageXandY{#1}013\arrangedpageB % 
>> \or \handlearrangedpageXandY{#1}013\arrangedpageA % 
>> \or \handlearrangedpageXandY{#1}003\arrangedpageB % 
>> \or \handlearrangedpageXandY{#1}004\arrangedpageA % 
>> \or \handlearrangedpageXandY{#1}014\arrangedpageB % 
>> \or \handlearrangedpageXandY{#1}014\arrangedpageA % 
>> \or \handlearrangedpageXandY{#1}004\arrangedpageB % 
>>  \poparrangedpages
>> \fi}
>>
>> \definepapersize[Etiquette][width=80.0mm,height=50.0mm]
>> \setuppapersize [Etiquette][A4]
>> \setuparranging [2*5*double*2*5]
>> %\setuplayout [margin=0pt, width=fit]
>> \setuplayout[
>> %location=middle,%nx=2,ny=5,
>> %location=middle,
>> location=left,
>> marking=on,
>> margin=0mm,
>> topspace=0mm,
>> backspace=0mm,
>> width=fit,
>> %header=0mm,
>> %footer=0mm,
>> %align=middle,
>> ]
>>
>> \showframe
>> %\setuppagenumbering[state=stop]
>> \setuppagenumbering[alternative=doublesided]
>>
>> \starttext
>> \dorecurse{20}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page}
>> \stoptext
>> ___________________________________________________________________________________
  

[-- Attachment #1.2: Type: text/html, Size: 7262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2022-02-11 22:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <404527216.1114701.1642342717214.ref@mail.yahoo.com>
2022-01-16 14:18 ` \installpagearrangement doublesided stickers Jigé via ntg-context
2022-01-22 21:20   ` Willi Egger via ntg-context
     [not found] <mailman.1026.1642886451.1172.ntg-context@ntg.nl>
2022-02-11 22:55 ` Jigé via ntg-context

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