I am attempting to use a text spanner as an indicator for a repeated
section. I need it to stop at the barline, and not on the next note.
Shortening it by using padding on the right affects the first line as well,
which is not wanted. How does one do this properly?

And my usual question, is there a proper way to do this rather than trying
to bend a text spanner into it?

Sometimes I may want 17x or 5x, etc, not just twice, or 3x. And I want the
dashed line effect.

Andrew

%====
\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 #Y #CENTER \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
  \override TextSpanner.bound-details.right.padding = #11

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

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

%====
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to