ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <context@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Is it possible to define a custom imposition schema? (sure it is, but how?)
Date: Tue, 29 May 2012 20:04:44 +0200	[thread overview]
Message-ID: <D4F49684-B757-4C77-9576-D3C796A4B7A5@boede.nl> (raw)
In-Reply-To: <878vgayl0w.fsf@universe.krase.net>

Hi Marco,

If I understand correctly what you need is a system which is basically based on booklet-printing but each booklet should be restricted to 16 pages.
In this case you might try 

\setuparranging[2*2*4]

This scheme put two pages on the front and two pages on the backside of a sheet of paper. Then it uses 4 sheets to complete the section.

Willi
On May 29, 2012, at 7:06 PM, Marco Pessotto wrote:

> 
> Hello there.
> 
> I'd need a custom imposition schema, just like the 2*4*2, but first the
> sheets will be folded, then inserted in signatures of 16 pages, and then
> finally bound. (They said the machine can fold only one sheet).
> 
> I came up with 3 "solutions" (or 3 hacks, as you wish):
> 
> 1. psutils/pstops 
> 
> 2. layers
> 
> 3. hack page-imp.mkiv
> 
> 
> 1. The first solution would be the faster, but after spending a day on
> it I gave up, because I have endless issue with cropped pages, paper
> dimension not correctly set, and I only scratched the surface. I don't
> know if exists some support for psutils (doesn't look so), but I have
> the feeling that software is pretty dead.
> 
> 2. Layers: I'm attaching the code below. Does it seem sensible, or is
> there a better way to do it? (I'll create a template from that, and will
> loop over every 16 pages with the usual perl hack). It seems to work,
> even if visually it looks a bit shifted to right (I can adjust
> it manually). [An alternate approach could be just various \hbox, but
> maybe the layer solution is better for absolute positioning]
> 
> 3. page-imp.mkiv would be the best solution (obviously). I've dug a bit
> into the code, but I'm in deep waters. I can't understand where the
> sequence of the pages is defined. the \pusharrangedpageSCHEMA seems just
> to define the position inside the page, not the sequence of the shipped
> out page. Also, what are \c_page_marks_nx and \c_page_marks_ny?  Any
> hint about how this machinery works?
> 
> 
> Thanks
> 
> Best wishes
> 
> 
> % start draft
> 
> \definepapersize[carta][width=320mm,height=440mm]
> \setuppapersize[carta][carta]
> \setuplayout
>   [topspace=0pt,
>   backspace=0pt,
>   header=0pt,
>   footer=0pt,
>   margin=0pt,
>   marking=on,
>   width=320mm,
>   height=440mm,
>   location=middle]
> 
> \setuppagenumbering[alternative=doublesided,location=]
> \setuprotate[location=depth,rotation=180]
> 
> % \showframe
> 
> \starttext
> 
> % page one
> 
> \definelayer[PageLayer1][position=no]
> \setuplayer
>   [PageLayer]
>   [preset=topleft,
>    height=\paperheight,width=\paperwidth]
> 
> \setlayer[PageLayer1][x=0mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=13]
>    }
> }
> \setlayer[PageLayer1][x=160mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=4]
>    }
> }
> \setlayer[PageLayer1][x=0mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=16]
> }
> \setlayer[PageLayer1][x=160mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=1]
> }
> \placelayer[PageLayer1]
> 
> %%% page 2
> 
> \definelayer[PageLayer2][position=no]
> \setuplayer
>   [PageLayer]
>   [preset=topleft,
>    option=test,
>    height=\paperheight,width=\paperwidth]
> 
> \setlayer[PageLayer2][x=0mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=3]
>    }
> }
> \setlayer[PageLayer2][x=160mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=14]
>    }
> }
> \setlayer[PageLayer2][x=0mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=2]
> }
> \setlayer[PageLayer2][x=160mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=15]
> }
> \placelayer[PageLayer2]
> 
> %page 3
> 
> \definelayer[PageLayer3][position=no]
> \setuplayer
>   [PageLayer]
>   [preset=topleft,
>    option=test,
>    height=\paperheight,width=\paperwidth]
> 
> \setlayer[PageLayer3][x=0mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=9]
>    }
> }
> \setlayer[PageLayer3][x=160mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=8]
>    }
> }
> \setlayer[PageLayer3][x=0mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=12]
> }
> \setlayer[PageLayer3][x=160mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=5]
> }
> \placelayer[PageLayer3]
> 
> % page 4
> \definelayer[PageLayer4][position=no]
> \setuplayer
>   [PageLayer]
>   [preset=topleft,
>    option=test,
>    height=\paperheight,width=\paperwidth]
> 
> \setlayer[PageLayer4][x=0mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=7]
>    }
> }
> \setlayer[PageLayer4][x=160mm,y=0mm]{
> \rotate{
>      \externalfigure[libretto.pdf][page=10]
>    }
> }
> \setlayer[PageLayer4][x=0mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=6]
> }
> \setlayer[PageLayer4][x=160mm,y=220mm]{
>  \externalfigure[libretto.pdf][page=11]
> }
> \placelayer[PageLayer4]
> 
> \stoptext
> 
> 
> 
> 
> -- 
> Marco
> 
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2012-05-29 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 17:06 Marco Pessotto
2012-05-29 17:13 ` Hans Hagen
2012-05-29 18:54   ` Marco Pessotto
2012-05-29 18:04 ` Willi Egger [this message]
2012-05-29 19:00   ` Marco Pessotto
2012-05-29 20:21     ` Willi Egger
2012-05-29 22:16       ` Marco Pessotto
2012-05-30  8:44         ` Marco Pessotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4F49684-B757-4C77-9576-D3C796A4B7A5@boede.nl \
    --to=context@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).