Folks,

two questions about the behaviour of textSpanners:

First question:

If a TextSpanner ends at the beginning at a bar which happens to be a line break, then

- with TextSpanner.to-barline = ##f, I get the left-broken.text and the right.text immediately after one another at the beginning of the second system,

- with TextSpanner.to-barline = ##t, I get no artifacts in the next line, but right.text is missing in the first system.

What I want: The text spanner should end at the last barline of the first system, but right.text should be printed.

Second question: Is it possible to let a TextSpanner end precisely at the end of a piece (last barline) with right.text being printed?

I can approximate the desired behaviour in both cases by letting the TextSpanner end a very short amount of time before the actual end of the bar, but that feels conceptually wrong and also does not yield the correct position of "R".

Lukas

\version "2.22"

spanTest = {
    \override TextSpanner.bound-details.right-broken.text = ##f
    \override TextSpanner.bound-details.right.text = "R"

    \override TextSpanner.bound-details.left.text = "L"
    \override TextSpanner.bound-details.left-broken.text = \markup\right-align "(L)"

    <>\startTextSpan
    s1
    \break
    <>\stopTextSpan
    s1
    <>\startTextSpan
    s1
    <>\stopTextSpan
  }

\new Staff {
  \spanTest
}

\new Staff {
  \override TextSpanner.to-barline = ##t
  % removes spurious "(L)__R", but fails to create "R"

  \spanTest

  s4 % makes last "right" appear (but extends piece)
}

Reply via email to