lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling Twice on a Single Page


From: David Wright
Subject: Re: Compiling Twice on a Single Page
Date: Thu, 3 Mar 2016 00:35:19 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed 02 Mar 2016 at 23:50:00 (-0500), Sam Bivens wrote:

> My question is whether or not it's possible, with a single .ly file,
> to compile this twice on a single sheet of 8.5x11in letter paper;
> once on the top half, once on the bottom. Ideally both halves of the
> paper would include everything: header, footer, score (obviously),
> etc.
> 
> Obviously this is easy enough to do both at a copy machine and in
> something like Inkscape, but it'd be great to automate it. I've
> looked through the manual and archives, but I haven't found
> anything; hopefully I didn't miss anything obvious.

If you're generating PDF output, you can forget trying to do it in
LilyPond and use PDF-oriented tools instead; in this case
specifically, pdfjam. This will handle any sort of 2-up, 3-up, 4-up,
8-up (that's as small as I've gone) in any sort of orientation. I use
pdfjam for producing handbills from posters, collating programmes,
constructing pages like yours, with shifting and scaling
etc. Invaluable for scans too.

You can complement pdfjam with pdftk which does all the jobs that
pdfjam doesn't: bursting/recollating, masking and merging and
so on. With those two tools, you can do just about anything
with PDFs and you will wonder how you ever survived without them.

A quick demonstration with these two commands (each written on one
line) and an A6 page from a dance programme is attached.

$ pdfjam --trim '-8mm 0mm -8mm 0mm' --nup '2x1' --no-landscape
--noautoscale 'true' --scale 1 --papersize '{210mm,148.5mm}' --outfile
/tmp/sidebyside.pdf /tmp/a-page.pdf 1,1

$ pdfjam --trim '-8mm 0mm -8mm 0mm' --nup '1x2' --no-landscape
--noautoscale 'true' --scale 1 --papersize '{90mm,276mm}' --outfile
/tmp/topoverbottom.pdf /tmp/a-page.pdf 1,1

Cheers,
David.

Attachment: a-page.pdf
Description: Adobe PDF document

Attachment: sidebyside.pdf
Description: Adobe PDF document

Attachment: topoverbottom.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]