lilypond-user
[Top][All Lists]
Advanced

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

Re: Top-aligned and bottom-aligned markup with TextScript staff-padding


From: Trevor Bača
Subject: Re: Top-aligned and bottom-aligned markup with TextScript staff-padding
Date: Mon, 4 Sep 2006 17:37:01 -0500

On 9/4/06, Kieren MacMillan <address@hidden> wrote:
Hi, Trevor:

> Anyone have something handy to make the markup in this example
> *bottom-align* (instead of top-aligning)?

"NORM has ascenders, but "norm" doesn't.
Therefore, you need to add an invisible ascender letter (e.g.,
capital) to force it to have the same vertical extent as the other one.

%%% BEGIN TOP-ALIGNED MARKUP SNIPPET %%%
\version "2.9.15"
\paper { ragged-right = ##t }
\new Staff {
   \time 2/4
   \override TextScript #'staff-padding = #4
   c'1_\markup { "NORM" }
   c'1_\markup { "norm" \transparent "T" }
}
%%% END TOP-ALIGNED MARKUP SNIPPET %%%

Hi Kieren,

Thanks, as usual! The transparent text does indeed have the effect of
bottom-aligning the different pieces of markup. I pared my original
example down and hid the fact that markup in question also
center-align in the horizontal direction.

The transparency trick still works even with center-aligned stuff, so
long as there's a transparent fake both before and after the actual
text.  Here's an example for anyone else who happens upon the thread
later.

Thanks again.


%%% BEGIN BOTTOM- AND CENTER-ALIGNED MARKUP SNIPPET %%%

\version "2.9.16"

\new Staff {
  \override TextScript #'staff-padding = #4
  \override TextScript #'self-alignment-X = #center
  \time 2/4
  c'4_\markup { \transparent "A" "AAAA" \transparent "A" }
  c'4_\markup { \transparent "A" "aaaa" \transparent "A" }
}

\layout {
  ragged-right = ##t
}

%%% END BOTTOM- AND CENTER-ALIGNED MARKUP SNIPPET  %%%


--
Trevor Bača
address@hidden

reply via email to

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