Request: Print actual number of pages after compiling

2019-06-09 Thread Christopher Heckman
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

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Request: Print actual number of pages after compiling

2019-06-09 Thread Thomas Morley
Am Mo., 10. Juni 2019 um 00:07 Uhr schrieb Christopher Heckman
:
>
> 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

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond