lilypond-user
[Top][All Lists]
Advanced

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

Re: Setting paper for bookpart


From: David Kastrup
Subject: Re: Setting paper for bookpart
Date: Wed, 02 Aug 2017 18:27:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> 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

So use the LilyPond syntax variant instead?

What are you currently after?  Getting some task done or working out
where LilyPond's Scheme interfaces are having holes and getting them
filled?

Of course approaches differ then.

> 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.
>
> But how?
> The last command returns (not surprisingly):
>
> error: GUILE signaled an error for the expression beginning here
> #
>  (ly:output-def-set-variable! (ly:book-paper bkIII) 'ragged-right #f)
> Wrong type argument in position 1 (expecting Output_def): #f
>
>
> myHeader = \header { title = "TITLE III" }
> myScore = \score { { cis'1 } }
> myPaper = \paper { ragged-right = ##f }
> bkIII = \bookpart {}
>
> #(ly:book-set-header! bkIII myHeader)
> #(ly:book-add-score! bkIII myScore)

% Now insert
bkIII = \bookpart { \bkIII \paper {} }
% and continue...

% I think you don't need to test for preexisting \paper but to be
% honest, I'm not sure and haven't tried.

> #(ly:output-def-set-variable! (ly:book-paper bkIII) 'ragged-right #f)
>
> \bkIII


-- 
David Kastrup



reply via email to

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