lilypond-user
[Top][All Lists]
Advanced

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

Re: How to get a book twice with different page-footers?


From: Jan-Peter Voigt
Subject: Re: How to get a book twice with different page-footers?
Date: Fri, 22 Mar 2013 13:41:36 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

Hello Harm,

I don't have a solution, but I found, that not-first-page is not defined in the global space. You can't access it with $(display not-first-page). If you (re-)define a procedure #(define (not-first-page layout props arg) (interpret-markup layout props arg)) the example compiles. So propably there is a way to expose the needed functions/vars to another scope?

Cheers,
Jan-Peter

Am 22.03.2013 02:05, schrieb Thomas Morley:
myname = #(ly:parser-output-name parser)

oddFooterMarkupI =
   \markup \fill-line { "XYZ" }

oddFooterMarkupII =
   \markup {
           %\on-the-fly #not-first-page
           \fill-line { "123" }
   }

writeBookTwice =
#(define-void-function (parser location book)
    (ly:book?)

    ; process with oddFooterMarkupI
    (ly:output-def-set-variable!
       (ly:book-paper book)
       'oddFooterMarkup
       oddFooterMarkupI)
    (ly:book-process
       book
       $defaultpaper
       $defaultlayout
       myname)

    ; process with oddFooterMarkupII
    (ly:output-def-set-variable!
       (ly:book-paper book)
       'oddFooterMarkup
       oddFooterMarkupII)
    (ly:book-process
       book
       $defaultpaper
       $defaultlayout
       (format "~a-other-footer" myname)))


\writeBookTwice
   \book {
     \bookpart { \repeat unfold 2 { c''1 \pageBreak } }
     \bookpart { \repeat unfold 2 { cis''1 \pageBreak } }
   }




reply via email to

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