Thomas Morley <thomasmorle...@gmail.com> writes: > 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
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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user