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