From d94703547c54cc7cb8434e599879d8930cb7e21f Mon Sep 17 00:00:00 2001 From: tux Date: Tue, 26 Nov 2024 18:02:09 +0100 Subject: [PATCH] allow break paged output * compatibilty to Liederbuchgenerator * apply standalone output directly to top level not wrapped in a book --- break_paged_output.ily | 2 ++ standalone_output.ly | 34 ++++++++++++---------------------- 2 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 break_paged_output.ily diff --git a/break_paged_output.ily b/break_paged_output.ily new file mode 100644 index 0000000..1e4d694 --- /dev/null +++ b/break_paged_output.ily @@ -0,0 +1,2 @@ +\include "lilypond-book-preamble.ly" +#(ly:set-option 'separate-page-formats "pdf") \ No newline at end of file diff --git a/standalone_output.ly b/standalone_output.ly index b8dfee6..eab2918 100644 --- a/standalone_output.ly +++ b/standalone_output.ly @@ -18,19 +18,19 @@ TEXT = \markuplist { \TEXT } -% nur Output wenn noStandaloneOutput auf false steht -output = #(if (not noStandaloneOutput) -#{ - \bookpart { - \HEADER - +#(if (not noStandaloneOutput) +(begin + (let ((header (ly:book-header HEADER)) (paper (ly:book-paper HEADER))) + (if header (set! $defaultheader header)) + (if paper (set! $defaultpaper paper)) + ) + (add-score #{ \score { \MUSIC \layout { \LAYOUT } - } - - \TEXT - + }#}) + (add-score TEXT) + (add-score #{ \score { \unfoldRepeats { \MUSIC \INLINESCOREMUSIC } \midi { @@ -40,15 +40,5 @@ output = #(if (not noStandaloneOutput) tempoWholesPerMinute = #(ly:make-moment midiQuarterNoteSpeed 4) } } - } - - - } -#} -) - -% if we don't want a standalone output, cause we compile a book, we just have an empty output here, -% so lilypond does not generate output for this song -\book { - \bookpart { \output } -} \ No newline at end of file + }#}) +)) \ No newline at end of file