lilypond-user
[Top][All Lists]
Advanced

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

Re: Text centralized above a TextSpan


From: David Nalesnik
Subject: Re: Text centralized above a TextSpan
Date: Tue, 22 Sep 2015 18:43:46 -0500

Hi Trevor,

On Tue, Sep 22, 2015 at 3:03 PM, Trevor Daniels <address@hidden> wrote:
 

... and hardly any need for the text-spanner-line-count, as it's easy
to split up the text by system (since manual breaks are needed
anyway to control the placement) like this:

music = \relative {
%  \override TextSpanner.text-spanner-line-count = #'(8 5)
  \addTextSpannerText \lyricmode {
    \markup \fontsize #1 \upright \smallCaps Abe:
    "Say" "this" "over" "measures" "one" "and" "two"
  }
  <>\startTextSpan
  a'4 a a a
  a4 a a a
  \stopTextSpan
  \break
  \addTextSpannerText \lyricmode {
    "and" "this" "over" "measure" "three"
  }
  <>\startTextSpan
  a4 a a a
  \stopTextSpan
}


 
[...]


One problem remains: the text overlaps if there is not enough room,
for example with ragged-right.  This would be a nuisance for the
examples in the manuals, but in real scores ragged-right is not usually
used.

Yes, this is really irksome, but it's a problem with ordinary text spanners too.  They don't avoid text overlaps automatically.  The only corrective for the problem is setting minimum-length.

{
  \override TextSpanner.bound-details.left.text = #"really long long text"
  \override TextSpanner.bound-details.right.text = #"overlapped"
  % gives 2 instances of strange error in 2.19.27; other versions?
  % programming error: mis-predicted force, 108.120472 ~= 139.065846
  %\override TextSpanner.minimum-length = 25
  %\override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
  c1\startTextSpan
  c1\stopTextSpan
}

In order to get independent line lengths for the musical theatre example, you'd have to use two spanners as you do above.  I don't think \alterBroken would work since minimum-length is set before line-breaking.

David


reply via email to

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