lilypond-user
[Top][All Lists]
Advanced

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

Re: Text alignment center of note head


From: TiagoM
Subject: Re: Text alignment center of note head
Date: Sun, 17 Jun 2007 06:41:55 -0700 (PDT)



Mats Bengtsson-4 wrote:
> 
> TiagoM wrote:
> 
>> ...
>>
>>This is what I was looking for. But not yet all of it. I'd like to have
the
>>text centered on the note head only when the text itself is centered (when
>>using \hcenter or \center-align or \halign #0).
>>
>>Is it possible to add this \override property writen above inside a
>>\markup{}, just like when we change the font size: \markup {\override
>>#'(font-size . -5) "ABC"}?
>>  
>>
> You cannot do this setting from within a markup command,
> as far as I know, but you can easily define a macro
> centermarkup = {
> \once \override TextScript #'self-alignment-X = #CENTER
> \once \override TextScript #'X-offset =#(ly:make-simple-closure
>                      `(,+
>                        ,(ly:make-simple-closure (list 
> ly:self-alignment-interface::centered-on-x-parent))
>                        ,(ly:make-simple-closure (list 
> ly:self-alignment-interface::x-aligned-on-self))))
> }
> 
> that you can use like
> 
> c^"Left aligned" \centermarkup c^"Centered" c^"Left aligned again"
> 
> Of course you can change the macro name to something shorter
> if you want to save typing.
> 
>>  
>>
>>Anyway I think the centering commands should already center the text with
>>the center of the notehead. is there a reason why it isn't this way?
>>  
>>
> The alignment is done by aligning a reference point tied to the
> note with a reference point tied to the markup. As long as you
> have left aligned markups, I hope you agree that it makes sense
> to have them left aligned with the note head, i.e. the reference
> point of the note head is at the left edge, so that's why the
> reference point of the note is not at the center by default.
> 
> I agree that it would be a nice feature, though.
> 
>    /Mats
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 

What if there are 2 markup's on the same note, one centered aligned and the
other not? If you could \override the setting inside the markup it wouldn't
affect the non centered markup. Is there really no solution for this? Should
we ask a feature that \hcenter should be centered with the notehead's center
and not it's edge?

Tiago
-- 
View this message in context: 
http://www.nabble.com/Text-alignment-center-of-note-head-tf3923193.html#a11163281
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

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