lilypond-user
[Top][All Lists]
Advanced

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

centralising markups above notes


From: Gilberto Agostinho
Subject: centralising markups above notes
Date: Fri, 9 Apr 2021 11:34:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0

Hi everyone,

I'm trying to add centred string numbers to some notes in my composition using markup. Using only \center-align as the documentation suggests does not seem to do the trick, as the text is still not centralised. I am only able to get them properly centred when I set parent-alignment-X to zero AND use \center-align. Am I doing something incorrect or do I really need these two commands in order to get the text centred?

Minimal example: 4 bars, only last one seems to be properly centered

\version "2.23.0"
{
    % regular markup: left aligned
    d''1
    ^ \markup { III. }

    % \center-aligned: still not centered
    d''1
    ^ \markup { \center-align III. }

    % setting parent-alignment-X to 0: still not centered
    \once \override TextScript.parent-alignment-X = #0
    d''1
    ^ \markup { III. }

    % setting parent-alignment-X to 0 with \center-aligned: now it's properly centered
    \once \override TextScript.parent-alignment-X = #0
    d''1
    ^ \markup { \center-align III. }
}

Producing: https://i.postimg.cc/ZKVTyn6L/Screenshot-from-2021-04-09-11-30-58.png

Many thanks,
Gilberto



reply via email to

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