X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fgregorian.ly;h=b268cb8e4851ec2aca884b522d935e638991bbe9;hb=85394d425536d267ed0cb71d17023849f1611180;hp=367dbbf16b62d8e323b3c50df749c95bf38e2a2d;hpb=8dd920d2143611a60bdaf82831613aae6342d2aa;p=lilypond.git diff --git a/ly/gregorian.ly b/ly/gregorian.ly index 367dbbf16b..b268cb8e48 100644 --- a/ly/gregorian.ly +++ b/ly/gregorian.ly @@ -3,7 +3,7 @@ $Id$ %} -\version "2.12.0" +\version "2.15.30" % % Declare memorable shortcuts for special unicode characters @@ -22,28 +22,18 @@ iij = \lyricmode { iij } % Given some music that represents lyrics, add a prefix to the first % lyric event. % -% TODO: Robustify this function. For example, this function works -% correctly for "\versus { some lyrics }", but it barfs with a wrong type -% argument error for e.g. "\versus some lyrics". -% #(define (add-prefix-to-lyrics prefix music) - (make-music - 'SequentialMusic - 'elements (append - (cons - (let* ((elems (car (ly:music-property music 'elements))) - (props (ly:music-mutable-properties elems)) - (events (filter (lambda (x) - (equal? (car x) 'elements)) - props)) - (first-evt (cadar events)) - (first-syllable (ly:prob-property first-evt 'text)) - (first-duration (ly:prob-property first-evt 'duration))) - (make-music - 'LyricEvent - 'duration first-duration - 'text (string-append prefix first-syllable))) - (cdr (ly:music-property music 'elements)))))) + (let ((found? #f)) + (map-some-music + (lambda (m) + (if found? m + (and (music-is-of-type? m 'lyric-event) + (begin + (set! (ly:music-property m 'text) + (string-append prefix (ly:music-property m 'text))) + (set! found? #t) + m)))) + music))) % Add unicode 2123 (versicle) as prefix to lyrics. versus = @@ -138,6 +128,7 @@ finalis = { % Workaround: add padding. Correct fix would be spacing engine handle this. \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0) + \once \override BreathingSign #'extra-spacing-height = #'(-0.5 . 0.5) \breathe } @@ -292,7 +283,7 @@ neumeDemoLayout = \layout { \override StaffSymbol #'transparent = ##t \remove "Time_signature_engraver" \remove "Bar_engraver" - \override VerticalAxisGroup #'minimum-Y-extent = ##f + \override VerticalAxisGroup #'staff-staff-spacing = #'() } \context { \Voice @@ -300,6 +291,7 @@ neumeDemoLayout = \layout { \consists Vaticana_ligature_engraver \override NoteHead #'style = #'vaticana.punctum \override Stem #'transparent = ##t + \override Flag #'transparent = ##t } }