Dear ’Ponders,

Before I saw Lukas’s helpful message, it had never occurred to me that \tweak
self-alignment-X ##f might be possible.

On Thu, 28 May 2026, Lukas-Fabian Moser wrote:

> But this explains what Jean did in his very elegant code:
>
>      \tweak self-alignment-X ##f
>      \textEndMark \markup
>      \put-adjacent #X #LEFT
>      \put-adjacent #X #RIGHT
>      \general-align #X #CENTER " = "
>      right-stuff
>      left-stuff
>
> The = is centered (on the 0 coordinate of the stencil); the put-adjacent
> commands are designed to add something at one side without shifting the
> original content. Then switching off self-alignment-X means that the 0
> coordinate of the stencil gets used without shift (whereas self-alignment-X
> = 0 [= #CENTER] would calculate a shift in order to align the *center* of
> the markup to the anchor point).
>
> In short: His commands are designed in such a way as to center the = glyph
> above the grob's anchor point.
>
Source:
https://lists.gnu.org/archive/html/lilypond-user/2026-05/msg00209.html

Is there any LilyPond documentation explaining that it is possible to
switch off (set to ##f) the self-alignment-X property?

I checked …

https://lilypond.org/doc/v2.27/Documentation/notation/aligning-objects#using-the-self_002dalignment_002dinterface

https://lilypond.org/doc/v2.27/Documentation/internals/self_002dalignment_002dinterface

https://lilypond.org/doc/v2.27/Documentation/learning/the-self_002dalignment_002dx-property

… and I have not found anything.

If the answer is “no,” then I will draft some language about this topic,
since I’m already proposing broader edits to the documentation on aligning
objects.

Gabriel

Reply via email to