Le 21/01/2014 19:14, Tom van der Hoeven disait :
below you will find an example. It is made such that on the first page
there is no room left.
As you can see I use the last page in order to get the number of pages
of a book.
I found this solution on the internet, it works but it is not straight
forward.
I should like to do something like : print number-of-book-pages
In the Internal Reference book I found the variable ly:paper-book-pages
But I have no idea how to use this function in the \paper context.
---------------------
\version "2.18.0"
\paper{
print-first-page-number = ##t
oddFooterMarkup = \markup {
\column {
\fill-line {
\line {
Blz
\on-the-fly #print-page-number-check-first
\fromproperty #'page:page-number-string
"van " \concat {\page-ref #'npages "0" "?"}
}
}
}
}
}
\header { title = "Example" }
\book {
\score {
{ \repeat unfold 18 {c''1 \break} }
replace with:
{ \repeat unfold 17 {c''1 \break} c''1\label #'npages }
\layout {
\context {
\Score
\override NonMusicalPaperColumn #'line-break-permission = ##f
\override NonMusicalPaperColumn #'page-break-permission = ##f
}
}
}
and suppress those next two lines (\label + \markup)
\label #'npages
\markup{}
}
Cheers,
Jean-Charles
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user