On 9/18/06, Markus Schneider <[EMAIL PROTECTED]> wrote:
I forgot: more importantly, use \combine to print the markups on top of each other. That may take care of your horizontal space problem.Markus "Markus Schneider" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi Trevor, > > you may try to use the "fake" letter f. It has all the necessary ascenders > and descenders to fake the basline. I use this with dynamics. > > pX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" > #:line(#:hspace 0 #:dynamic "p" #:hspace 0))) > > HTH > Markus
Hi Markus, Thank you so much. The \combine command was precisely what I needed, and the fake "f" trick works, as well, resulting in cleaner input. Here're the results. %%% BEGIN EDGE TEXT ALIGNMENT SNIPPET 5 %%% \version "2.9.17" \new Staff \with { \override TextSpanner #'dash-fraction = #'() \override TextSpanner #'direction = #down \override TextSpanner #'bound-padding = #1 } << \time 3/8 \new Voice { c'8 c'8 c'8 } \new Voice \with { \override TextSpanner #'staff-padding = #3 } { \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "a") (markup #:combine #:transparent "f" " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "b") (markup #:combine #:transparent "f" "c")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan } \new Voice \with { \override TextSpanner #'staff-padding = #5.5 } { \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "d") (markup #:combine #:transparent "f" " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "d") (markup #:combine #:transparent "f" "f")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan } \new Voice \with { \override TextSpanner #'staff-padding = #8 } { \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "g") (markup #:combine #:transparent "f" " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:combine #:transparent "f" "h") (markup #:combine #:transparent "f" "i")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan }
%%% END EDGE TEXT ALIGNMENT SNIPPET 5 %%% There's a pic attached (baseline-aligned.png) with perfectly aligned spanners and a gamut of lowercase letters all magically baseline-aligned (thanks again, to the ascender- and descender-properties of the "f" glyph). Mats's and Han-Wen's suggestion to set the dimensions of each bit of edge text explicitly with the \with-dimensions command also works and, out of the box, gives *bottom-aligned* rather than *baseline-aligned* results. %%% BEGIN EDGE TEXT ALIGNMENT SNIPPET 6 %%% \version "2.9.17" \new Staff \with { \override TextSpanner #'dash-fraction = #'() \override TextSpanner #'direction = #down \override TextSpanner #'bound-padding = #1 } << \time 3/8 \new Voice { c'8 c'8 c'8 } \new Voice \with { \override TextSpanner #'staff-padding = #3 } { \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "a") (markup #:with-dimensions '(0 . 0) '(-2 . 2) " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "b") (markup #:with-dimensions '(0 . 0) '(-2 . 2) "c")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan } \new Voice \with { \override TextSpanner #'staff-padding = #5.5 } { \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "d") (markup #:with-dimensions '(0 . 0) '(-2 . 2) " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "e") (markup #:with-dimensions '(0 . 0) '(-2 . 2) "f")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan } \new Voice \with { \override TextSpanner #'staff-padding = #8 } { \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "g") (markup #:with-dimensions '(0 . 0) '(-2 . 2) " ")) s8 \startTextSpan \override TextSpanner #'edge-text = #(cons (markup #:with-dimensions '(0 . 0) '(-2 . 2) "h") (markup #:with-dimensions '(0 . 0) '(-2 . 2) "i")) s8 \stopTextSpan \startTextSpan s8 \stopTextSpan }
%%% END EDGE TEXT ALIGNMENT SNIPPET 6 %%% See bottom-aligned.png. Playing with the arguments passed into \with-dimensions will probably enable all sorts of interesting results (though I suspect that getting the appearance of baseline alignment will almost certainly be easier with the combined, transparent "f"). Thank you, everybody. This helps tremendously. -- Trevor Bača [EMAIL PROTECTED]
baseline-alignment.png
Description: PNG image
bottom-aligned.png
Description: PNG image
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user