2008/8/17 Mats Bengtsson <[EMAIL PROTECTED]>: > 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>>
<<attachment: lily-d988b573.png>>
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user