Am 18.07.2016 um 13:46 schrieb David Kastrup: > 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.
Thank you for the hint. > > If you really want to pass the paper block in yourself during > ly:book-process (rather than incorporating it in the \book explicitly), No, I didn't do that intentionally but was misled by the fact that I have to supply that default-paper and -layout arguments. Now I moved the \paper block inside \book (or rather at an earlier point I stored a paper block in the option tree and now call it from there), and it seems to work. Now to the \layout block ... Best Urs > 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. > _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
