Compare commits
4 Commits
e382e00812
...
main
Author | SHA1 | Date | |
---|---|---|---|
f824b23311 | |||
5ef4ee78ae | |||
45e751fa24 | |||
9fb2d96765 |
@@ -121,16 +121,18 @@ override-stanza =
|
|||||||
#}
|
#}
|
||||||
)
|
)
|
||||||
|
|
||||||
stanza =
|
#(define (stanza . stanzanumbers)
|
||||||
#(define-music-function (parser location stanzanumber) (number?)
|
|
||||||
#{
|
#{
|
||||||
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
|
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
|
||||||
\applyContext
|
\applyContext
|
||||||
#(lambda (context)
|
#(lambda (context)
|
||||||
(let* ((stanzanumber (ly:assoc-get 'forced-spacing (ly:context-grob-definition context 'StanzaNumber) stanzanumber))
|
(let* ((stanzanumber-override (ly:assoc-get 'forced-spacing (ly:context-grob-definition context 'StanzaNumber) #f))
|
||||||
(stanzastyle (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
|
(stanza-style (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
|
||||||
(formattedStanzaNumber (format #f (if (eq? stanzastyle 'roman) romanStanzaFormat stanzaFormat) stanzanumber)))
|
(stanza-format (lambda (stanzanumber) (format #f (if (eq? stanza-style 'roman) romanStanzaFormat stanzaFormat) stanzanumber))))
|
||||||
(ly:context-set-property! context 'stanza formattedStanzaNumber)))
|
(ly:context-set-property! context 'stanza
|
||||||
|
(string-join (map stanza-format
|
||||||
|
(if stanzanumber-override (list stanzanumber-override) stanzanumbers))
|
||||||
|
", "))))
|
||||||
#}
|
#}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -192,12 +194,16 @@ alt =
|
|||||||
|
|
||||||
updown =
|
updown =
|
||||||
#(define-music-function (parser location word) (string?)
|
#(define-music-function (parser location word) (string?)
|
||||||
|
(let ((first-char (string-take word 1))
|
||||||
|
(rest (substring word 1 (string-length word))))
|
||||||
#{
|
#{
|
||||||
\lyricmode {
|
\lyricmode {
|
||||||
\tag #'up { \markup { #(string-capitalize word) } }
|
\markup {
|
||||||
\tag #'down { \markup { #(string-downcase word) } }
|
\tag #'up #(string-append (string-capitalize first-char) rest)
|
||||||
|
\tag #'down #(string-append (string-downcase first-char) rest)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#})
|
#}))
|
||||||
|
|
||||||
dottedExtender = {
|
dottedExtender = {
|
||||||
\override LyricExtender.style = #'dotted-line
|
\override LyricExtender.style = #'dotted-line
|
||||||
@@ -231,3 +237,19 @@ cue =
|
|||||||
(make-null-markup))
|
(make-null-markup))
|
||||||
}
|
}
|
||||||
#})
|
#})
|
||||||
|
|
||||||
|
#(define-markup-command (ruf-style layout props text) (string?)
|
||||||
|
(interpret-markup layout props
|
||||||
|
(markup #:italic (string-append "(" text ")"))))
|
||||||
|
rufWithMarkup =
|
||||||
|
#(define-music-function (text) (markup?)
|
||||||
|
#{
|
||||||
|
\lyricmode {
|
||||||
|
\once \override StanzaNumber.font-series = #'normal
|
||||||
|
\once \override StanzaNumber.direction = 1
|
||||||
|
\set stanza = #text
|
||||||
|
}
|
||||||
|
#})
|
||||||
|
ruf =
|
||||||
|
#(define-music-function (text) (string?)
|
||||||
|
(rufWithMarkup (make-ruf-style-markup text)))
|
Reference in New Issue
Block a user