* \setuparranging values for perfect bound A5 on A3?
@ 2022-10-09 0:29 Bruce Horrocks via ntg-context
2022-10-09 1:58 ` Max Chernoff via ntg-context
2022-10-09 8:35 ` Henning Hraban Ramm via ntg-context
0 siblings, 2 replies; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-10-09 0:29 UTC (permalink / raw)
To: ntg-context mailing list; +Cc: Bruce Horrocks
I have a book to be perfect bound[1] and I'm trying to work out what imposition to use.
The printer would like 4 A5 pages laid out on A3 e.g.
+---+---+
| | |
| a | b |
| | |
+---+---+
| | |
| c | d |
| | |
+---+---+
so that he can cut the paper and simply stack a, b, c, & d on top of each other and then put them in the binding machine[2].
If the book is 40 pages long, say, then stack 'a' has page 1 on the top, page 2 on the reverse, then the next sheet has page 3 and 4, and so on down to the last sheet which has page 9 on the front and page 10 on the back. Stack 'b' would have page 11 on the front, 12 on the back and so on, so that each stack has a quarter of the book.
Is this something LMTX can do and if so what combination of \setuplayout and \setuppaper do I need to use? If they can be printed in reverse order then great but I assume the printer can do that fairly easily. If not, is there a recommended external program that can do it?
I've tried \setuplayout[4*2] and XY with 2x2 but neither output is what I need.
Thanks in advance.
[1] glued spine (if that term isn't used outside the UK)
[2] I'm sure it's actually harder than that. :-)
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \setuparranging values for perfect bound A5 on A3?
2022-10-09 0:29 \setuparranging values for perfect bound A5 on A3? Bruce Horrocks via ntg-context
@ 2022-10-09 1:58 ` Max Chernoff via ntg-context
2022-10-09 18:24 ` Bruce Horrocks via ntg-context
2022-10-09 8:35 ` Henning Hraban Ramm via ntg-context
1 sibling, 1 reply; 4+ messages in thread
From: Max Chernoff via ntg-context @ 2022-10-09 1:58 UTC (permalink / raw)
To: ntg-context; +Cc: Max Chernoff
Hi Bruce,
> I have a book to be perfect bound[1] and I'm trying to work out what
> imposition to use.
>
> The printer would like 4 A5 pages laid out on A3 e.g.
>
> +---+---+
> | | |
> | a | b |
> | | |
> +---+---+
> | | |
> | c | d |
> | | |
> +---+---+
>
> so that he can cut the paper and simply stack a, b, c, & d on top of
> each other and then put them in the binding machine[2].
>
> If the book is 40 pages long, say, then stack 'a' has page 1 on the
> top, page 2 on the reverse, then the next sheet has page 3 and 4, and
> so on down to the last sheet which has page 9 on the front and page 10
> on the back. Stack 'b' would have page 11 on the front, 12 on the back
> and so on, so that each stack has a quarter of the book.
>
> Is this something LMTX can do and if so what combination of
> \setuplayout and \setuppaper do I need to use? If they can be printed
> in reverse order then great but I assume the printer can do that
> fairly easily.
I don't think that there's any way to do this from within a document
run, so I think that you'll need to use an external program.
> If not, is there a recommended external program that can do it?
But, you can use ConTeXt as the external program here.
Save as "imposition.cld":
local filename = document.getargument("filename")
local pdf = lpdf.epdf.image.open(filename)
local pages = pdf.nofpages
local max = math.ceil(pages / 4)
context.setuppapersize({ "A5" }, { "A3" })
context.setuppaper { nx = 2, ny = 2 }
context.setuparranging { "XY" }
local function insert_page(n)
context.startpagemakeup()
context.filterpages({ filename }, { n })
context.stoppagemakeup()
end
context.starttext()
for i = 1, max do
if i % 2 == 1 then
insert_page(i + 0 * max)
insert_page(i + 1 * max)
insert_page(i + 2 * max)
insert_page(i + 3 * max)
else
insert_page(i + 1 * max)
insert_page(i + 0 * max)
insert_page(i + 3 * max)
insert_page(i + 2 * max)
end
end
context.stoptext()
Then run:
context imposition.cld --filename=document.pdf
where "document.pdf" is replaced by your document name.
I'm not sure if I got your desired output quite right here, but
hopefully you can easily modify the script if something isn't quite
right.
Thanks,
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \setuparranging values for perfect bound A5 on A3?
2022-10-09 0:29 \setuparranging values for perfect bound A5 on A3? Bruce Horrocks via ntg-context
2022-10-09 1:58 ` Max Chernoff via ntg-context
@ 2022-10-09 8:35 ` Henning Hraban Ramm via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-10-09 8:35 UTC (permalink / raw)
To: Bruce Horrocks via ntg-context; +Cc: Henning Hraban Ramm
Am 09.10.22 um 02:29 schrieb Bruce Horrocks via ntg-context:
> I have a book to be perfect bound[1] and I'm trying to work out what imposition to use.
>
> The printer would like 4 A5 pages laid out on A3 e.g.
>
> +---+---+
> | | |
> | a | b |
> | | |
> +---+---+
> | | |
> | c | d |
> | | |
> +---+---+
>
> so that he can cut the paper and simply stack a, b, c, & d on top of each other and then put them in the binding machine[2].
>
> If the book is 40 pages long, say, then stack 'a' has page 1 on the top, page 2 on the reverse, then the next sheet has page 3 and 4, and so on down to the last sheet which has page 9 on the front and page 10 on the back. Stack 'b' would have page 11 on the front, 12 on the back and so on, so that each stack has a quarter of the book.
>
> Is this something LMTX can do and if so what combination of \setuplayout and \setuppaper do I need to use? If they can be printed in reverse order then great but I assume the printer can do that fairly easily. If not, is there a recommended external program that can do it?
>
> I've tried \setuplayout[4*2] and XY with 2x2 but neither output is what I need.
You meant \setuparranging, didn’t you?
https://wiki.contextgarden.net/Imposition
has an example on how to create your own scheme.
Good luck!
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \setuparranging values for perfect bound A5 on A3?
2022-10-09 1:58 ` Max Chernoff via ntg-context
@ 2022-10-09 18:24 ` Bruce Horrocks via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-10-09 18:24 UTC (permalink / raw)
To: Max Chernoff; +Cc: Bruce Horrocks, ntg-context mailing list
> On 9 Oct 2022, at 02:58, Max Chernoff <mseven@telus.net> wrote:
>
>
> Hi Bruce,
>
>> I have a book to be perfect bound[1] and I'm trying to work out what
>> imposition to use.
>>
>> The printer would like 4 A5 pages laid out on A3 e.g.
>>
>> +---+---+
>> | | |
>> | a | b |
>> | | |
>> +---+---+
>> | | |
>> | c | d |
>> | | |
>> +---+---+
>>
>> so that he can cut the paper and simply stack a, b, c, & d on top of
>> each other and then put them in the binding machine[2].
>>
>> If the book is 40 pages long, say, then stack 'a' has page 1 on the
>> top, page 2 on the reverse, then the next sheet has page 3 and 4, and
>> so on down to the last sheet which has page 9 on the front and page 10
>> on the back. Stack 'b' would have page 11 on the front, 12 on the back
>> and so on, so that each stack has a quarter of the book.
>>
>> Is this something LMTX can do and if so what combination of
>> \setuplayout and \setuppaper do I need to use? If they can be printed
>> in reverse order then great but I assume the printer can do that
>> fairly easily.
>
> I don't think that there's any way to do this from within a document
> run, so I think that you'll need to use an external program.
>
>> If not, is there a recommended external program that can do it?
>
> But, you can use ConTeXt as the external program here.
>
> Save as "imposition.cld":
>
> local filename = document.getargument("filename")
> local pdf = lpdf.epdf.image.open(filename)
> local pages = pdf.nofpages
> local max = math.ceil(pages / 4)
>
> context.setuppapersize({ "A5" }, { "A3" })
> context.setuppaper { nx = 2, ny = 2 }
> context.setuparranging { "XY" }
>
> local function insert_page(n)
> context.startpagemakeup()
> context.filterpages({ filename }, { n })
> context.stoppagemakeup()
> end
>
> context.starttext()
> for i = 1, max do
> if i % 2 == 1 then
> insert_page(i + 0 * max)
> insert_page(i + 1 * max)
> insert_page(i + 2 * max)
> insert_page(i + 3 * max)
> else
> insert_page(i + 1 * max)
> insert_page(i + 0 * max)
> insert_page(i + 3 * max)
> insert_page(i + 2 * max)
> end
> end
> context.stoptext()
>
> Then run:
>
> context imposition.cld --filename=document.pdf
>
> where "document.pdf" is replaced by your document name.
>
> I'm not sure if I got your desired output quite right here, but
> hopefully you can easily modify the script if something isn't quite
> right.
Thank-you Max - that is exactly what I wanted and your code worked first time. :)
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-09 18:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-09 0:29 \setuparranging values for perfect bound A5 on A3? Bruce Horrocks via ntg-context
2022-10-09 1:58 ` Max Chernoff via ntg-context
2022-10-09 18:24 ` Bruce Horrocks via ntg-context
2022-10-09 8:35 ` Henning Hraban Ramm 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).