lilypond-user
[Top][All Lists]
Advanced

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

Re: Setting paper for bookpart


From: Timothy Lanfear
Subject: Re: Setting paper for bookpart
Date: Wed, 2 Aug 2017 18:09:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 02/08/17 16:29, Thomas Morley wrote:
2017-08-02 15:46 GMT+02:00 David Kastrup <address@hidden>:

#(ly:output-def-set-variable! (ly:book-paper bkII) 'ragged-right #f)
This works fine, but only if the bookpart already has \paper

In the following example, I start with an empty bookpart and fill it
with a header and a score.
And I want to do the same with the paper.



How about creating a book with paper and adding the bookpart? I think the book is implicitly created when using LilyPond syntax if it is not there explicitly.


foo = #(define-void-function() ()
  (let* ((paper    #{ \paper {} #})
         (header   #{ \header {} #})
         (score    #{ \score { r1 } #})
         (bookpart (ly:make-book-part (list score)))
         (book     (ly:make-book paper header)))

    (module-define! header 'title "Second Title")
    (ly:output-def-set-variable! paper 'ragged-right #f)
    (ly:book-add-bookpart! book bookpart)
    (ly:book-process book paper $defaultlayout "tmp")))

\foo

--
Timothy Lanfear, Bristol, UK.




reply via email to

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