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: Trevor Daniels
Subject: Re: Text centralized above a TextSpan
Date: Tue, 22 Sep 2015 21:03:02 +0100

David Nalesnik wrote Monday, September 21, 2015 5:13 PM

> I'm attaching a rewrite of the code which allows an easy mix of 
> markups/strings and interprets hyphens as connectors.  
> Now there's no need for a TextSpanner.connectors property.

... 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
}

A function to split text at white space rather than having to surround
each word with quotes would make this quite useable, I think.
Certainly better than the way I did it in the NR.

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.

Trevor

reply via email to

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