lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatically add empty pages at the end of a book


From: Nick Payne
Subject: Re: Automatically add empty pages at the end of a book
Date: Wed, 10 Dec 2014 08:21:50 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 10/12/14 03:57, Urs Liska wrote:

Am 09.12.2014 17:47, schrieb Federico Bruni:
2014-12-09 17:38 GMT+01:00 Urs Liska <address@hidden>:
Hi all,

if I produce scores that are to be printed on double-sided, folded sheets (i.e. four A4 pages on one A3 sheet) I need to find a way to add empty pages to the end of the score.

I have one bookpart with two pages of front matter, then comes the score.
Then I need that flexible amount of 0-3 empty pages,
finally I have a last bookpart for the back cover.

How can I determine the number of pages a score has and add an appropriate number of pages to that?
(2 + 5 + N + 1) % 4 = 0
Examples:
Score has 5 pages: -> 0 empty pages necessary
Score has 7 pages: -> 2 empty pages necessary


You don't want to do this in LilyPond, right? If so, you already replied to yourself.
I did the same five years ago and the recommendation in this list was: work on A4 in LilyPond and use some external tool (can't remember which) to build the A3 pdf file. You already have the "pseudo code" to create that pdf.


Well, I don't want to do the imposition from within LilyPond, but I'd like to produce the score files directly from within LilyPond without having to run them through LaTeX first.
So I want to produce files with a number of pages that can be divided by four, and where the second-to-last page(s) are automatically inserted to make that possible.

Use pdfbook - it will do it all for you. Just feed it your a4 lilypond pdf containing whatever number of pages:

pdfbook --short-edge --paper a3paper file.pdf

will create a pdf named file-book.pdf correctly laid out for double-sided printing on a3 and folding to make an a4 booklet.

On Ubuntu you need to install the packages texlive-latex-recommended and texlive-extra-utils.

Nick



reply via email to

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