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

#(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.


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to