|
From: | Curt McDowell |
Subject: | RE: Change page number during score |
Date: | Mon, 28 Oct 2013 19:57:21 -0700 |
Here's an example that numbers pages with prime numbers. ;-) Ok, that was just for fun. Here's also a version that skips a specific list of page numbers. (IMHO, it would still be better to figure out how to embed your graphic pages within Lilypond using eps!) -Curt From: address@hidden [mailto:address@hidden On Behalf Of David Nalesnik Hi,
Well, no simple way. It is possible to write a markup function to increment the page numbers at a certain point. I retooled a function which does Roman numeral page numbers here: http://www.mail-archive.com/address@hidden/msg73483.html The function below takes a range of "skipped pages." So, the example "skips" page numbers 2 through 5. Thus, the score will be numbered 1, 6, 7... Hope this helps, David %%%%% \version "2.17.29" % should work with 2.16 too #(define-markup-command (skip-page-number-range layout props arg) (number-list?) (let ((page-number (chain-assoc-get 'page:page-number props -1))) (interpret-markup layout props (if (>= page-number (car arg)) (number->string (+ page-number (1+ (- (cadr arg) (car arg))))) (chain-assoc-get 'page:page-number-string props -1))))) \paper { print-first-page-number = ##t print-page-number = ##t oddHeaderMarkup = \markup \fill-line { " " \on-the-fly #not-first-page \fromproperty #'header:instrument \on-the-fly #print-page-number-check-first \skip-page-number-range #'(2 5) } evenHeaderMarkup = \markup \fill-line { \on-the-fly #print-page-number-check-first \skip-page-number-range #'(2 5) \on-the-fly #not-first-page \fromproperty #'header:instrument " " } } \score { \new Staff { \repeat unfold 6 { s1 \pageBreak } } } |
prime.ly
Description: Text Data
skip.ly
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |