[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text spanner with middle text
From: |
Valentin Villenave |
Subject: |
Re: Text spanner with middle text |
Date: |
Sun, 31 May 2020 08:23:17 +0200 |
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.