lilypond-user
[Top][All Lists]
Advanced

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

Re: Text spanner padding


From: David Kastrup
Subject: Re: Text spanner padding
Date: Thu, 28 Feb 2019 23:10:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Trevor Bača <address@hidden> writes:

> On Fri, Feb 22, 2019 at 2:58 AM Andrew Bernard <address@hidden>
> wrote:
>
>> Solved. It's right-broken-padding set to false that does the trick.
>>
>>   \override TextSpanner.bound-details.right-broken.padding = ##f
>>   \override TextSpanner.bound-details.right.padding = #11
>>
>
>
> As a note for posterity (whenever the time comes to finally equip text
> spanners with their remaining missing features), it would be fantastic to
> allow text spanners to start (and stop) nonmusical items, like bar lines.
>
> Then magic numbers (like 11, in the example here) can be replaced by
> something semantic that says "stop text span on bar line", which seems to
> be what Andrew is actually engraving in this excerpt.

So?  There is the to-barline property.

\version "2.19.82"

leftBracketPath =
#'((moveto 0 -1)
   (lineto 0 0)
   (lineto 2 0)
   )

rightBracketPath =
#'((lineto 2 0)
   (lineto 2 -1)
   )

treble = {
  \time 2/4

  \once \override TextSpanner.dash-period = #1
  \once \override TextSpanner.bound-details.left.text =
  \markup {
    \path #0.25 #leftBracketPath \general-align #Y #CENTER \sans \upright "
x3"
  }
  \once \override TextSpanner.bound-details.right.text =
  \markup {
    \general-align #X #RIGHT
    \general-align #Y #CENTER \line { \sans \upright " x3" \path #0.25
#rightBracketPath }
  }
  \once \override TextSpanner.bound-details.left-broken.text = ##f
  \once \override TextSpanner.bound-details.right-broken.text = ##f
  \once \override TextSpanner.to-barline = ##t
  \override TextSpanner.bound-details.right.padding = #0

  f'''1\startTextSpan f''' f'''
  \break
  f'''
  \bar "."
  f'''\stopTextSpan
  \bar "||"
}

\score {
  \new Staff { \treble }
  \layout {}
}

-- 
David Kastrup

reply via email to

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