lilypond-user
[Top][All Lists]
Advanced

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

Re: Label placed at end of \book not recognised in \paper


From: Jean-Charles Malahieude
Subject: Re: Label placed at end of \book not recognised in \paper
Date: Wed, 22 Jan 2014 18:46:07 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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




reply via email to

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