lilypond-user
[Top][All Lists]
Advanced

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

Re: left-aligning grobs to other grobs


From: David Nalesnik
Subject: Re: left-aligning grobs to other grobs
Date: Sun, 13 Mar 2011 12:08:01 -0500

>>> Attached is a function . . .

Hi, all --

As a follow-up to my first email, I thought I would update the
function I posted.  It now will let you align a grob of your choice to
the nearest grob of a specified type in three ways (left-edge to
left-edge, center-to-center, and right-edge to right-edge).  I realize
that in some cases it could be used to duplicate functionality better
achieved by other means, but I believe it can do unique things, too.

One problem I can see is that the vertical position of the grob to be
aligned is taken from the grob to which it is attached, so the Y of
the ‘extra-offset has to be manipulated in sometimes unpredictable
ways.  Also there is the somewhat unwieldy syntax:

\alignGrob #”TextScript” #’StaffSymbol  #0 #1

will center-align a markup to the staff (-1 is left-align, 0 = center,
1 = right) with an extra-offset of 1 to its Y-position.

Any feedback -- suggestions for improvement, ideas for a use -- would
be much appreciated!

Best,
David

Attachment: alignGrob.ly
Description: Text Data

Attachment: alignGrob.png
Description: PNG image


reply via email to

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