On 5/11/10 1:17 AM, "Nathan Reed" <nathaniel.r...@gmail.com> wrote: > > Here's my code as it stands. It produces a narration measure as shown in the > image linked in my previous message. > > narration = > #(define-music-function (parser location rest text1 text2) > (ly:music? string? string?) > (let ( > (fermata-event > (make-music > 'ArticulationEvent > 'tweaks (list '(outside-staff-priority . 0)) ; Force > fermata to be under the markup text > 'articulation-type "fermata")) > (text-event > (make-music > 'TextScriptEvent > 'direction 1 > 'tweaks (list '(baseline-skip . 2)) ; Fix > line spacing for text > 'text (markup #:center-align #:teeny #:column (text1 > text2)))) > (result (ly:music-deep-copy rest))) > (set! (ly:music-property result 'elements) > (append > (ly:music-property rest 'elements) > (list fermata-event text-event))) > #{ \textLengthOn $result \textLengthOff #} )) > > I call it like: > > \narration r1 #"On the branch..." #"...chirped the bird gaily." > > I'd like to expand the measure to be slightly wider than the text, so it > doesn't collide with rehearsal marks.
What if you changed text-event to (text-event (make-music 'TextScriptEvent 'direction 1 'tweaks (list '(baseline-skip . 2)) ;Fix line spacing for text 'text (markup :line (markup :hspace 3) (markup #:center-align #:teeny #:column (text1 text2))))) with the ("markup :hspace 3) being what is necessary for avoiding the rehearsal mark (rehearsal marks shouldn't change much in width).? I haven't tested the code. HTH, Carl > > Thanks, > Nathan Reed > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user