lilypond-user
[Top][All Lists]
Advanced

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

Re: Subscripted text and centering of TextSpanner line


From: James Bailey
Subject: Re: Subscripted text and centering of TextSpanner line
Date: Fri, 8 Oct 2010 18:10:45 +0200

On Oct 8, 2010, at 7:25 AM, Nick Payne wrote:

> If I have text characters at the left end of a TextSpanner, and some of those 
> characters are subscripted, then the centering of the TextSpanner line seems 
> to be calculated using the total height of both the main and subscripted 
> text, which puts the line at the bottom of the main text rather than being 
> centered on it. While this makes some sort of sense, I think that asking for 
> the line to be centered means that I'm asking for it to be centered on the 
> main text.
> 
> %===========================================
> \version "2.13.35"
> 
> #(set-global-staff-size 30)
> 
> \relative c'' {
>    \once \override TextSpanner #'bound-details #'left #'text = \markup { 
> \concat { CII " " } }
>    \once \override TextSpanner #'style = #'line
>    \once \override TextSpanner #'font-shape = #'upright
>    \once \override TextSpanner #'direction = #UP
>    \once \override TextSpanner #'bound-details #'right #'text =
>        \markup { \draw-line #'(0 . -0.5) }
>    \once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = 
> #CENTER
>    gis16\startTextSpan b e b' e e, b' e\stopTextSpan
>    \once \override TextSpanner #'bound-details #'left #'text =
>        \markup { \concat { "CII" \sub 3 " " } }
>    \once \override TextSpanner #'style = #'line
>    \once \override TextSpanner #'font-shape = #'upright
>    \once \override TextSpanner #'direction = #UP
>    \once \override TextSpanner #'bound-details #'right #'text =
>        \markup { \draw-line #'(0 . -0.5) }
>    \once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = 
> #CENTER
>    gis,,\startTextSpan b e b' e e, b' e\stopTextSpan
> }
> %===========================================

Just an idea, but overriding the baseline may get what you want, but has the 
disadvantage of making knowing how much to override the baseline by difficult.


reply via email to

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