lilypond-user
[Top][All Lists]
Advanced

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

Re: Setting paper for bookpart


From: Thomas Morley
Subject: Re: Setting paper for bookpart
Date: Wed, 2 Aug 2017 21:53:42 +0200

2017-08-02 19:09 GMT+02:00 Timothy Lanfear <address@hidden>:
> 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?

Hi Timothy,

thanks for your reply and code.
Though, it's exactly not what I'm after.
I'd like to create bookparts with _different_ paper-settings.

> 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

Thanks,
  Harm



reply via email to

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