|
From: | Jan-Peter Voigt |
Subject: | Re: columns in lyrics |
Date: | Thu, 24 Nov 2011 15:05:59 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Lightning/1.0b2 Thunderbird/3.1.15 |
Hey Mike, here's one, that splits up strings to columns. So its the other way round than your bonus point part. But it should save typing, because \markup \column { foo bar } \markup \column { who what } \markup \column { hello world } turns to \cols { "foo bar" "who what" "hello world" } --snip-- \version "2.14.2" #(define-public cols (define-music-function (parser location lyrics) (ly:music?) (music-map (lambda (m) (begin ;; catch every Lyric Event (if (equal? (ly:music-property m 'name) 'LyricEvent) ;; set text to column markup using string-split (and markup->string for safety) (let ((syl (string-split (markup->string (ly:music-property m 'text)) #\ ))) (ly:music-set-property! m 'text (make-center-column-markup syl)) ; you might want to use another one like make-column-markup )) m)) lyrics))) \relative c'' { c2 b a } \addlyrics { \cols { "foo bar" "who what" "hello world" } } --snip-- Am 23.11.2011 15:17, schrieb address@hidden: hey all, Why not just use << \new Lyrics \lyricmode { foo who hello } \new Lyrics \lyricmode { bar what world } >> Well, I'm sure, you have good reason. HTH and cheers, Jan-Peter
|
[Prev in Thread] | Current Thread | [Next in Thread] |