[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Force text on line without using \textLengthOn
From: |
Thomas Morley |
Subject: |
Re: Force text on line without using \textLengthOn |
Date: |
Wed, 24 Oct 2018 18:25:53 +0200 |
Am Di., 23. Okt. 2018 um 08:28 Uhr schrieb Urs Liska <address@hidden>:
>
> Hi,
>
> I want to use TextScript.staff-padding to produce markup elements that
> are aligned to their baseline. In order to prevent the texts from moving
> vertically to avoid collisions I used \textLengthOn (or its spelled-out
> variant):
>
> \version "2.19.82"
>
> test =
> #(define-event-function (text)(markup?)
> #{
> -\tweak extra-spacing-width #(cons -0.0 0.4)
> -\tweak extra-spacing-height #(cons -inf.0 +inf.0)
> -\tweak staff-padding 3
> -\markup #text
> #})
>
> \relative {
> c''8 ^\test "foobar" d16 c
> c8 ^\test "foobar" d16 ^\test "John Doe" c
> }
>
> However, this does not only push the next notes when there actually is
> some neighboring text (as in the second beat of the following example)
> but also when it wouldn't be needed (see atttached image):
>
> Uncommenting the extra-spacing... tweaks will result in the texts moving
> vertically which is not desired.
>
> Is there another approach to make the following note columns move - but
> only if there *is* something in the way?
>
> Thanks
> Urs
Hi Urs,
from your description it sounds you need sort of a spanner with
adjustable length.
Attached some coding hacking TextSpanner.
What do you think?
Cheers,
Harm
atest-84.png
Description: PNG image
atest-84.ly
Description: Text Data
- Force text on line without using \textLengthOn, Urs Liska, 2018/10/23
- Re: Force text on line without using \textLengthOn, Aaron Hill, 2018/10/23
- Re: Force text on line without using \textLengthOn,
Thomas Morley <=
- Re: Force text on line without using \textLengthOn, Urs Liska, 2018/10/25
- Re: Force text on line without using \textLengthOn, Thomas Morley, 2018/10/25
- Re: Force text on line without using \textLengthOn, Urs Liska, 2018/10/26
- Re: Force text on line without using \textLengthOn, Davide Liessi, 2018/10/26
- Re: Force text on line without using \textLengthOn, Thomas Morley, 2018/10/26
- Re: Force text on line without using \textLengthOn, Urs Liska, 2018/10/26
- Re: Force text on line without using \textLengthOn, Kieren MacMillan, 2018/10/26
- Re: Force text on line without using \textLengthOn, Kieren MacMillan, 2018/10/26
- Re: Force text on line without using \textLengthOn, Thomas Morley, 2018/10/28