Generating whole scores (also book parts) in scheme without using the parser
…snippet also works for typesetting scores inside a \book {...} block as well as top-level scores. To achieve … …function called to process a book once a \book{...} block is closed) is modified to insert all collected scores so far to the book.
…lambda (score) (add-score score)) music)) #(define-public (toplevel-book-handler book) (map (lambda (score) (ly:book-add-score! book score)) (reverse! (ly:parser-lookup '… …#(define-music-function () () (add-one-note-score (*parser*)) (make-music 'Music 'void #t)) %%% \book { \oneNoteScore \paper { tagline = ##f } } \book { \oneNoteScore \oneNoteScore \paper { tagline = ##f } } % Top-level scores are …