diff --git a/basic_format_and_style_settings.ly b/basic_format_and_style_settings.ly index c6f3b18..ccc6169 100644 --- a/basic_format_and_style_settings.ly +++ b/basic_format_and_style_settings.ly @@ -105,13 +105,21 @@ romanStanza = #(define-music-function (parser location) () #{ \override StanzaNumber.style = #'roman #}) +override-stanza = +#(define-music-function (parser location stanzanumber) (number?) +#{ + \once \override StanzaNumber.forced-spacing = #stanzanumber % misuse property "forced-spacing" to override the stanzanumber +#} +) + stanza = #(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 \applyContext #(lambda (context) - (let* ((stanzastyle (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber))) + (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))) #}