lilypond-user
[Top][All Lists]
Advanced

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

Re: centralising markups above notes


From: Jean Abou Samra
Subject: Re: centralising markups above notes
Date: Fri, 9 Apr 2021 16:36:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Le 09/04/2021 à 13:59, Gilberto Agostinho a écrit :

Hi David,

On 09/04/2021 12:32, David Kastrup wrote:
Where does the documentation suggest that \center-align (and similar)
does anything to a single item?  It aligns the things passed to it, not
their outside.

See the Text alignment section in http://lilypond.org/doc/v2.23/Documentation/notation/formatting-text it clearly makes use of a single item with \center-align.

Regardless of the documentation, would you be able to tell me what's the best approach to centre a markup on a note, please? The solution I found (last bar in my previous minimal example) seems very hacky to me as it's mixing two things (\center-align and parent-alignment-x) for the alignment.

Many thanks,
Gilberto

Hi,

What you are doing is more or less the proper
way. Objects have two parameters for alignment
because it should depend on both the extents of
the aligned object and its parent. This was
briefly discussed in this recent thread:

https://lists.gnu.org/archive/html/bug-lilypond/2021-02/msg00016.html

For what it's worth, you can do

center = \tweak parent-alignment-X 0 \tweak self-alignment-X 0 \etc

and then it's a matter of

{
    d''1\center ^"III."
}

Best,
Jean

reply via email to

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