lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text spanner with middle text


From: James Worlton
Subject: Re: Text spanner with middle text
Date: Sun, 31 May 2020 15:15:42 -0700

Thanks Valentin! I think this will be able to do what I need.

James

> On May 30, 2020, at 23:23, Valentin Villenave <valentin@villenave.net> wrote:
> 
> On 5/31/20, James Worlton <jworlton@gmail.com> wrote:
>> Is there a way to do this using a single text spanner? I could probably
>> fake it with 2 spanners, but would rather not if I didn't have to, since
>> the positioning of the middle text would be trial and error.
> 
> Indeed.  But I think that if you’re looking for something simple, that
> remains the easiest way by far:
> 
> %%%%
> 
> \version "2.20.0"
> 
> insertTextSpan =
> #(define-music-function (txt) (markup?)
>   (make-music 'CrescendoEvent
>               ; 'tweaks (list (cons 'font-shape 'upright))
>               'span-direction START
>               'span-type 'text
>               'span-text txt))
> 
> {
>  b1\insertTextSpan "poco"
>  b
>  b\insertTextSpan "a"
>  b
>  b\insertTextSpan \markup \bold "poco"
>  b
>  b\!
> }
> 
> %%%%
> 
> Cheers,
> -- V.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]