lilypond-user
[Top][All Lists]
Advanced

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

Re: book-predicate


From: Jan-Peter Voigt
Subject: Re: book-predicate
Date: Fri, 02 Mar 2012 10:04:48 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hello David, hello lists,

now, when we have a book-predicate, we are dealing with books in scheme. And then we might want to set a header after creating a book. There is a function ly:score-set-header!, which I copied and adapted for the Book-class.
This patch compiled and works with the following snippet.

--snip--
\version "2.15.32"

bk = \book {
  \score {
    \relative c' {
      c4 e g b
    }
  }
}

#(let ((bh (eval-string "(define-module (a b))")))
     (eval '(define title "Hallo") bh)
     (ly:book-set-header! bk bh))

\book { \bk }
--snip--

Is this helpful for lily-devel?
And is there another (better) way of creating a module (for header generation) on the fly in scheme?

Cheers,
Jan-Peter

On 27.02.2012 10:10, David Kastrup wrote:
Jan-Peter Voigt<address@hidden>  writes:

Am 24.02.2012 um 16:24 schrieb:

Jan-Peter Voigt<address@hidden>  writes:

Hello list,

when I use books or bookparts for (scheme-)function arguments, I
haven't found the predicate for it.
paper-book? is something else, or am I missing something?
Well, you can always use scheme? and file a feature request in the mean
time.
Thank you David,

the scheme?-solution is what I do right now. I will send a feature
request next days.
Don't bother.

commit 09814b549186893c265bcdf835edbe242f6354cf
Author: David Kastrup<address@hidden>
Date:   Sun Feb 26 11:23:39 2012 +0100

     Implement ly:book? and ly:context-def? predicates

Note that a bookpart _is_ a book as well, usually without a paper block
of its own.


Attachment: 0001-add-ly-book-set-header.patch
Description: Text Data


reply via email to

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