Vertical alignment of text and path in markup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Vertical alignment of text and path in markup

Andrew Bernard
What's the way to align the brackets here rendered as markup paths with the centre of the associated text, without hardcoding numbers. Is there a self-alignment-y property or similar?

I may change the size of the font, and the length and shape of the brackets, so I am after something generic.

Andrew

%===
\version "2.19.82"

leftBracketPath =
  #'((moveto 0 -1)
     (lineto 0 0)
     (lineto 2 0)
     )
 
rightBracketPath =
  #'((lineto 2 0)
     (lineto 2 -1)
     )

\markup {
  \path #0.25 #leftBracketPath "x3"
}

\markup {
  "x3"  \path #0.25 #rightBracketPath
}

%===


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Vertical alignment of text and path in markup

Lukas-Fabian Moser

Am 17.02.19 um 06:09 schrieb Andrew Bernard:
> What's the way to align the brackets here rendered as markup paths
> with the centre of the associated text, without hardcoding numbers. Is
> there a self-alignment-y property or similar?
>
> I may change the size of the font, and the length and shape of the
> brackets, so I am after something generic.

Applying \general-align #Y #CENTER to the associated text (not to the
brackets) seems to me to yield best results. Does this help you?

Lukas


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Vertical alignment of text and path in markup

Andrew Bernard
Hi Lukas,

Works like a charm.

Andrew


On Sun, 17 Feb 2019 at 23:57, Lukas-Fabian Moser <[hidden email]> wrote:

Applying \general-align #Y #CENTER to the associated text (not to the
brackets) seems to me to yield best results. Does this help you?


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user