lilypond-user
[Top][All Lists]
Advanced

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

Re: \textLengthOn in polyphony and over MultiMeasureRests


From: Torsten Hämmerle
Subject: Re: \textLengthOn in polyphony and over MultiMeasureRests
Date: Sun, 29 Jul 2018 10:22:27 -0700 (MST)

Trevor Bača-2 wrote
> Torsten, how are you achieving the text centered above the pair of half
> notes in the original example (ie, in the measure top-headed with
> "Minima")? Try as I might, I can't get it!


Hi Trevor,

You've got me there! ;)

Standard \textLengthOn will push away neighbouring notes and you won't get
the markup text to neatly and symmetrically align with the barlines without
some tweaking.

\textLengthOn just sets the following two properties:

  \override TextScript.extra-spacing-width = #'(-0.0 . 0.4)
  \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)

By adapting extra-spacing-width, we can actually set the left and right
"margins" of the text. This way, we can attach the TextScript to the second
note and make it overlap the first note.

Finally (this is not necessary, though) I've shifted both notes to the right
by using extra-offset to better match the original.

<http://lilypond.1069038.n5.nabble.com/file/t3887/textlength-modified.png> 

%%%%%%%
{
  \override TextScript.self-alignment-X = #CENTER

% custom version of \textLengthOn:
  \override TextScript.extra-spacing-width = #'(2.6 . 0.4)    % default:
#'(-0.0 . 0.4)
  \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)

% Shift NoteHead and Stem to the right
  \override NoteHead.extra-offset = #'(5 . 0)
  \override Stem.extra-offset = #'(5 . 0)

  R1
  \bar "||"
  c''2 c''^\markup \line { \typewriter "#'extra-offset" "trickery" }
  \bar "||"
}
%%%%%%

HTH,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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