lilypond-user
[Top][All Lists]
Advanced

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

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


From: Thomas Morley
Subject: How to get a book twice with different page-footers?
Date: Fri, 22 Mar 2013 02:05:21 +0100

Hi,

I'm trying to parse a book twice with different footers.
The function below
(thanks to Jan-Peter and Urs
http://lilypond.1069038.n5.nabble.com/Compile-twice-with-different-includes-td140953.html
)
below works quite nice so long as very simple footers are used.
As soon as I try something more elaborated, like \on-the-fly
#not-first-page <arg>, an error occurs.
Well, that's no surprise.

Though, how to do it?
Any hint would be appreciated.

-Harm



\version "2.16.2"

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]