[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange TextScript behaviour?
From: |
Mats Bengtsson |
Subject: |
Re: Strange TextScript behaviour? |
Date: |
Wed, 11 Apr 2007 10:40:48 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070221) |
I don't follow exactly what you try to do. However, the vertical position is
determined based on one of a number of different rules, depending on which
one sets the strictest limits. In your case,
- The staff-padding detemines the minimum distance to the stave.
- The padding determines the minimum distance to the closest
object (stem or stave or note head or whatever). In your particular
example the stem is the closest object.
- The slur-padding determines the minimum distance to the slur,
if the text script extends above the slur. In your example, the difference
between "1" and "11" is that LilyPond thinks that the former is only
above the stem, not the slur, whereas "11" extends so far to the right
that it's considered to be above the slur.
If you want a fixed distance to the stave, just set a large enough value
of staff-padding, so that this setting dominates the other ones.
Also, instead of using the extra-offset to change the horizontal position,
you may want to set
\override TextScript #'self-alignment-X = #RIGHT
As you will notice, this setting changes many of your conclusions, for
example
since LilyPond will no longer think that any of the text scripts is
above any slur.
I recommend you to remove all your other \override:s as a starting point.
Note also, that your score will look different if you upgrade to the latest
development version (or when you upgrade to version 2.12 when it will
be released some time in the future).
/Mats
Dmytro O. Redchuk wrote:
Hello,
I found that TextScript requires some extra-offset when set above
slurred note AND has more than one symbol. Just take a look:
% ---------------------------------------------------------------------
%
%
%
\version "2.10.20"
soprano = \relative c'' {
%
\voiceOne
%
% Text would be 7 units below it's original position...
\override TextScript #'padding = #-7
%
% ... but this padding forces the same position
% for all TextScripts above Staff:
\override TextScript #'staff-padding = #1.0
%
% Shift them a bit left:
\override TextScript #'extra-offset = #'(-3.0 . 0)
%
%
% Markup (two symbols -- no slur) -- no problem,
% as expected:
e4 f ^ \markup { \bold 11 }
g a
%
% Two symbols, slurred note -- 'staff-padding is "ignored":
e4 f( ^ \markup { \bold 11 }
g a)
%
\break
%
% Well, 'slur-padding is ignored too?
\once \override TextScript #'slur-padding = #-7
%
e4 f( ^ \markup { \bold 11 }
g a)
%
% But _one symbol_ markup _with slur_ is great,
% with no 'slur-padding :
e4 f( ^ \markup { \bold 1 }
g a)
%
}
{ \soprano }
\paper {
indent = 0
}
% ---------------------------------------------------------------------
Very probably, I have missed something important -- please, tell me.
And, btw, is there other way to get all TextScripts positioned at the
same distance from staff?
Thanks,
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================