[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TextScript implements self-alignment interface
From: |
Trevor Baca |
Subject: |
Re: TextScript implements self-alignment interface |
Date: |
Sat, 27 Aug 2005 22:34:26 -0500 |
On 8/27/05, Han-Wen Nienhuys <address@hidden> wrote:
> Trevor Baca wrote:
> > TextScript layout objects implement the self-alignment interface quite
> > well. Here's an example:
> >
> > \override Staff.TextScript #'self-alignment-X = #-2
> > c'4^\markup {\italic {ten.}}
> > \override Staff.TextScript #'self-alignment-X = #-1.5
>
> Indeed, that's why I always write #-1 instead of #LEFT :-)
Good point, actually.
Question: the value ...
\override Staff.TextScript #'self-alignment-X = #center
\c'4^\markup {foo}
... centers the markup *relative to the left note-edge* (or possibly
NoteColumn??), while the combination ...
\override Staff.TextScript #'self-alignment-X = #center
\override Staff.TextScript #'extra-offset = #'(1.0 . 0.0)
\c'4^\markup {foo}
... seems to center the markup *relative to the notecenter* (probably
because 1 horizontal space in the cons passed to extra-offset pretty
nearly equals half the width of a notehead??).
So the question is: is the pair of self-alignment and extra-offset (in
the second example) the best way to center markup relative to
*notecenter* or is there a way to specify the
position-from-which-relative-measures-are-made (like extra-offset)
directly, possibly by referencing the parent grob?
Trevor Bača
address@hidden