\ref can take a list of stanza numbers now
This commit is contained in:
@ -24,6 +24,11 @@
|
||||
markup-system-spacing = #'((basic-distance . 1))
|
||||
score-markup-spacing = #'((padding . 2))
|
||||
top-markup-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0))
|
||||
refMarkupFormatter = #(lambda (layout props stanzanumbers)
|
||||
(interpret-markup layout props
|
||||
(if (null? stanzanumbers)
|
||||
refString
|
||||
(ly:format refStringWithNumbers (string-join (map (lambda (stanzanumber) (ly:format "~a." stanzanumber)) stanzanumbers) ", ")))))
|
||||
}
|
||||
|
||||
generalLayout = \layout {
|
||||
@ -125,10 +130,15 @@ stanza =
|
||||
#}
|
||||
)
|
||||
|
||||
ref = {
|
||||
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
|
||||
\set stanza = \refString
|
||||
}
|
||||
ref =
|
||||
#(define-music-function (stanzanumbers lyrics) ((number-list? (list)) ly:music?)
|
||||
#{ \lyricmode {
|
||||
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
|
||||
\set stanza = #(make-on-the-fly-markup (lambda (layout props m) ((ly:output-def-lookup layout 'refMarkupFormatter) layout props stanzanumbers)) (make-null-markup))
|
||||
#lyrics
|
||||
}
|
||||
#}
|
||||
)
|
||||
|
||||
% prints a repStart Sign as stanza if the tag 'repeats is kept.
|
||||
% if there was a stanza already set by the stanza function with StanzaNumber.layer = 23 we set that also as stanza.
|
||||
|
Reference in New Issue
Block a user