Urs Liska <[email protected]> writes: > I am once more experimenting with ly:book-process. The background is > that I have managed to generate my complete score within a Scheme > function, but now I need the function to produce more than just one > \score (namely an alternation between multiple scores and top-level > markups). > > But it seems somewhat unpredictable how the \paper and \layout blocks > behave. > > In the following example the \paper block is not respected while the > \layout block is: > > \version "2.19.45" > > engrave = > #(define-void-function ()() > (let* > ((book > #{ > \book { > \markup "Movement title (to be generated)" > \score { > \new Staff { c' d' } > } > } > #})) > (ly:book-process > book > #{ > \paper { > indent = 0\cm > } > #} > #{ > \layout { > \context { > \Score { > \override NoteHead.color = #blue > } > } > } > #} > (ly:parser-output-name (*parser*))))) > > \engrave
The defaultpaper argument of ly:book-process is only consulted when the book argument does not already have a paper block of its own, and every \book block takes the global \paper block when nothing else is given. If you really want to pass the paper block in yourself during ly:book-process (rather than incorporating it in the \book explicitly), you need to use \bookpart instead of \book: in a \bookpart, the \paper block is indeed optional and (unless specified) will be left out instead of taking the global \paper block. If that sounds like I have any clue about how the hierarchy of books and bookparts is supposed to work, that would be misleading. That's basically just a report on what some code does. Why one would want it to do that, I have no idea. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
