introduce TEXT_PAGES
This commit is contained in:
parent
c47ceb443e
commit
8d0ddcee06
@ -34,7 +34,8 @@
|
|||||||
LAYOUT = \layout { \generalLayout }
|
LAYOUT = \layout { \generalLayout }
|
||||||
HEADER = {}
|
HEADER = {}
|
||||||
MUSIC = {}
|
MUSIC = {}
|
||||||
TEXT = \markuplist {""}
|
TEXT = \markuplist {}
|
||||||
|
TEXT_PAGES = #f
|
||||||
|
|
||||||
verseChords = {}
|
verseChords = {}
|
||||||
firstVoice = {}
|
firstVoice = {}
|
||||||
|
@ -114,7 +114,7 @@ width may require additional tweaking.)"
|
|||||||
|
|
||||||
|
|
||||||
includeSong =
|
includeSong =
|
||||||
#(define-void-function (parser location textproc filename) ((procedure?) string?)
|
#(define-void-function (parser location filename) (string?)
|
||||||
#{
|
#{
|
||||||
\bookOutputName #filename
|
\bookOutputName #filename
|
||||||
#}
|
#}
|
||||||
@ -125,7 +125,15 @@ includeSong =
|
|||||||
(acons label additional-page-numbers additional-page-switch-label-list))
|
(acons label additional-page-numbers additional-page-switch-label-list))
|
||||||
(set! song-list
|
(set! song-list
|
||||||
(acons (string->symbol filename)
|
(acons (string->symbol filename)
|
||||||
(acons 'label label (acons 'header HEADER (acons 'music MUSIC (acons 'layout LAYOUT (acons 'text #{ \markuplist \setsongfilename $filename $(if textproc (textproc TEXT) TEXT) #} '())))))
|
(acons 'label label
|
||||||
|
(acons 'header HEADER
|
||||||
|
(acons 'music MUSIC
|
||||||
|
(acons 'layout LAYOUT
|
||||||
|
(acons 'text-pages
|
||||||
|
(map (lambda (text)
|
||||||
|
#{ \markuplist \setsongfilename $filename $text #})
|
||||||
|
TEXT_PAGES)
|
||||||
|
'())))))
|
||||||
song-list))
|
song-list))
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -184,14 +192,14 @@ songs =
|
|||||||
;(header (assq-ref songvars 'header))
|
;(header (assq-ref songvars 'header))
|
||||||
(music (assq-ref songvars 'music))
|
(music (assq-ref songvars 'music))
|
||||||
(layout (assq-ref songvars 'layout))
|
(layout (assq-ref songvars 'layout))
|
||||||
(text (assq-ref songvars 'text))
|
(text-pages (assq-ref songvars 'text-pages))
|
||||||
(label (assq-ref songvars 'label)))
|
(label (assq-ref songvars 'label)))
|
||||||
#{
|
#{
|
||||||
\bookpart {
|
\bookpart {
|
||||||
$header
|
$header
|
||||||
\headerToTOC #header #label
|
\headerToTOC #header #label
|
||||||
\score { $music \layout { $layout } }
|
\score { $music \layout { $layout } }
|
||||||
$text
|
$(add-text-pages text-pages)
|
||||||
}
|
}
|
||||||
#}))))))
|
#}))))))
|
||||||
(reverse song-list)
|
(reverse song-list)
|
||||||
|
@ -26,6 +26,34 @@ TEXT = \markuplist {
|
|||||||
\TEXT
|
\TEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#(define TEXT_PAGES
|
||||||
|
(map
|
||||||
|
(lambda (text) #{
|
||||||
|
\markuplist {
|
||||||
|
\override #`(transposition . ,TRANSPOSITION)
|
||||||
|
\override #`(verselayout . ,verselayout)
|
||||||
|
\override #`(verse-chords . ,#{ \chords { \verseChords } #})
|
||||||
|
\override #`(verse-reference-voice . ,#{ \global \firstVoice #})
|
||||||
|
#text
|
||||||
|
}
|
||||||
|
#})
|
||||||
|
(if
|
||||||
|
(and
|
||||||
|
(defined? 'TEXT_PAGES)
|
||||||
|
(pair? TEXT_PAGES))
|
||||||
|
TEXT_PAGES
|
||||||
|
(list TEXT))))
|
||||||
|
|
||||||
|
#(define (add-text-pages text-pages)
|
||||||
|
(if (pair? text-pages)
|
||||||
|
(begin
|
||||||
|
(add-score (car text-pages))
|
||||||
|
(for-each
|
||||||
|
(lambda (text)
|
||||||
|
(add-music (pageBreak))
|
||||||
|
(add-score text))
|
||||||
|
(cdr text-pages)))))
|
||||||
|
|
||||||
#(if (not noStandaloneOutput)
|
#(if (not noStandaloneOutput)
|
||||||
(begin
|
(begin
|
||||||
(let ((header (ly:book-header HEADER)) (paper (ly:book-paper HEADER)))
|
(let ((header (ly:book-header HEADER)) (paper (ly:book-paper HEADER)))
|
||||||
@ -37,7 +65,7 @@ TEXT = \markuplist {
|
|||||||
\MUSIC
|
\MUSIC
|
||||||
\layout { \LAYOUT }
|
\layout { \LAYOUT }
|
||||||
}#})
|
}#})
|
||||||
(add-score TEXT)
|
(add-text-pages TEXT_PAGES)
|
||||||
(add-score #{
|
(add-score #{
|
||||||
\score {
|
\score {
|
||||||
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user