lilypond-user
[Top][All Lists]
Advanced

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

Re: Some text formatting advice


From: Torsten Hämmerle
Subject: Re: Some text formatting advice
Date: Mon, 23 Jul 2018 05:58:48 -0700 (MST)

Urs Liska-3 wrote
>> In a combination with staff-padding it is possible to vertically align
>> TextScript markups by their baseline.
> 
> Well, this only works sort-of, namely when there's no music above the
> staff.
> 
> In this modified excerpt you can see that the text abvoe the first bar 
> is pushed upwards with no need:
> 
> I would like to be able to position text at a fixed distance from the 
> staff, regardless of any items in the "padding" area. Of course if that 
> would collide the text could be allowed to move (if the a'' were in the 
> second bar that would be the case). But if a solution would suppress 
> collision handling altogether it might be acceptable as well.

Hi Urs,

This can be accomplished by
  \override TextScript.outside-staff-priority = ##f
That way, TextScript is not treated as an outside-staff object and thus will
not be pushed away from the stave by music. Your example will work with just
this little additional override:


%%%%%%%%%%%%%
\version "2.19.82"

{
  \textLengthOn
  \override TextScript.self-alignment-X = #CENTER
  \override TextScript.baseline-skip = #2.3
  \override TextScript.staff-padding = #6
  \override TextScript.outside-staff-priority = ##f
  a''\longa*1/4^\markup \center-column {
    \bold "Longa."   "Eine lange Note." " "
  }
  c''\breve*1/2
    ^\markup \center-column {
      \bold "Breve." "Eine kurze" "Note."
    }
}
%%%%%%%%%%%%% 

Music even may overlap the markup (just try a''') and you'll have to
increase staff-padding to avoid collisions in these cases. But in the end,
TextScripts can be precisely positioned without any automatic (unwanted)
padding and shifting around.

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]