bug-lilypond
[Top][All Lists]
Advanced

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

Re: Request: Print actual number of pages after compiling


From: Thomas Morley
Subject: Re: Request: Print actual number of pages after compiling
Date: Mon, 10 Jun 2019 00:50:27 +0200

Am Mo., 10. Juni 2019 um 00:07 Uhr schrieb Christopher Heckman
<address@hidden>:
>
> This isn't so much a bug as an annoyance.
>
> Frequently when I'm typesetting music, I'm trying to resize the output
> to fit on the minimum number of pages (while remaining readable, of
> course). When Lilypond is compiling, one of its messages is "Fitting
> music on 1 or 2 pages..." Obviously, in this situation, I want to know
> the exact number of pages without re-opening the .pdf file. Could
> someone add a one-line statement to print out the actual number of
> pages, near the "Success: compilation successfully completed" message?
>
> --- Christopher Heckman

A ly-file can contain multiple books or bookparts or a mix of it.
I don't know how to cover every case, but for the case of a single
book(part) you could do:

\paper {
  #(define (page-post-process layout pages)
    (format #t "\n\tCurrent book-(part) has ~a pages" (length pages)))
}

\score { { R1 \pageBreak R } }

Cheers,
  Harm



reply via email to

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