Hi all, Recently I ran into the problem of having more than one page of prefatory material (a cover page and a table of contents), and I wanted to start showing page numbers on the first page of music (starting with 1).
Below is the solution I came up with, by borrowing and modifying a function from the LilyPond source code, shown with a version of the example in the docs here: http://lilypond.org/doc/v2.18/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-headers-and-footers Is this the best way to do this? If so would it make sense to add it to the LSR or possibly add the "on-page-greater-than" function to LilyPond? -Paul \version "2.18.0" % modified version of "on-page" from "titling-init.ly" in LilyPond source #(define ((on-page-greater-than nmbr) layout props arg) (if (> (chain-assoc-get 'page:page-number props -1) nmbr) (interpret-markup layout props arg) empty-stencil)) \book { \paper { print-page-number = ##t print-first-page-number = ##t first-page-number = -1 oddHeaderMarkup = \markup \null evenHeaderMarkup = \markup \null oddFooterMarkup = \markup { \fill-line { \on-the-fly #(on-page-greater-than 0) \fromproperty #'page:page-number-string } } evenFooterMarkup = \oddFooterMarkup } \markup "A prefatory page (cover page)" \pageBreak \markup "Another prefatory page (table of contents)" \pageBreak \markup "First page with a page number" \score { \new Staff { s1 \break s1 \break s1 } } } -- View this message in context: http://lilypond.1069038.n5.nabble.com/Start-showing-page-numbers-on-pages-greater-than-X-tp160445.html Sent from the User mailing list archive at Nabble.com. _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
