lilypond-user
[Top][All Lists]
Advanced

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

Re: vcenter help


From: Neil Puttock
Subject: Re: vcenter help
Date: Sun, 17 Aug 2008 23:02:14 +0100

2008/8/17 Mats Bengtsson <address@hidden>:
> A practically relevant example of the use of \hcenter (to be renamed
> to something else), should rather contain a single markup.
> Within scores, markups are in principle always used for graphical
> objects, that do the horizontal alignment themselves, for the full
> markup.
> However, for markups at the top level of a file, the alignment point
> of the markup is placed relative to the left margin of the page, so
> this is a possibility to actually show what happens (unless
> lilypond-book plays some tricks within the documentation.
>
> So, instead of the current examples, where you may get confused
> by the use of column, I would rather propose the following example
> to illustrate the possibilities for horizontal alignment of a single
> markup.
> \version "2.11.50"
> \markup{ Default alignment is left. }
> \markup{ \left-align Left. }
> \markup{ \hcenter Center}
> \markup{ \right-align Right}
>
> and make sure to make the point that these commands set the
> alignment point of the full markup. You also needs a number of
> bells and whistles to explain why these commands don't have
> any effect, when used in a TextScript or RehearsalMark or
> most other situations.

I'm afraid this doesn't work too well, Mats; I've tried examples with
the second \markup centred or right-aligned, and they both shunt the
top markup to the right (see attached images).

> One final detail that I didn't fully understand until just now, is
> how the horizontal alignment point is used when a number of
> markups are combined on a single line.
> Let's start with the following example
> \version "2.11.50"
> \markup{\concat \left-align{ AAA BB C }}
> \markup{\concat \hcenter{ AAA BB C }}
> \markup{\concat \right-align{ AAA BB C }}
> First of all, note that the alignment commands are applied to all
> three markups because of the curly braces, so for example
> \right-align { AAA BB C } is equivalent to
> {\right-align {AAA } \right-align {BB } \right-align {C }}
> Then, if you look carefully at the resulting output, you will
> realize that it's the right end of first markup that's aligned
> with the alignment point of the second one, and similarly
> the right end of the second markup that's aligned with the
> alignment point of the third markup.

Cheers for clarifying this; it makes much more sense now, especially
the behaviour of \hcenter.

I notice that in the second example, "C" isn't perfectly centred on
"BB"; it's further right than you'd expect. Is this due to
letter-spacing?

Regards,
Neil

Attachment: lily-ab2a45ae.png
Description: PNG image

Attachment: lily-d988b573.png
Description: PNG image


reply via email to

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