lilypond-user
[Top][All Lists]
Advanced

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

Re: hspace in markup cancels other directives


From: Aaron Hill
Subject: Re: hspace in markup cancels other directives
Date: Sat, 30 Jul 2022 20:39:34 -0700

On 2022-07-30 8:12 pm, Jim Cline wrote:
I am trying to use \hspace to adjust the horizontal position of a text
markup.

\hspace is probably not the best tool. Consider \tweaking the text script:

  bes-\tweak self-alignment-X #RIGHT
     ^\markup \smaller \with-color #blue text

  bes-\tweak X-offset #-3
     ^\markup \smaller \with-color #blue text


  In addition I want the text to be colored and smaller.  But
the \hspace directive somehow disables the others, as in this example.

\version "2.20.0"
lower =
  \relative c {
   \time 3/4
  \clef bass
  bes^\markup{\smaller  \with-color #blue \hspace #-3 text} r4
bes^\markup{\smaller  \with-color #blue  text}
}

The effects of markup commands only apply to their specific markup arguments.

What you have effectively done is this:

  \markup {
    \smaller { \with-color #blue { \hspace #-3 } }
    text
  }

You could explicitly group the space and text:

  \markup \smaller \with-color #blue { \hspace #-3 text }

Alternately, move the space outside the other commands:

  \markup { \hspace #-3 \smaller \with-color #blue text }


-- Aaron Hill



reply via email to

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