lilypond-user
[Top][All Lists]
Advanced

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

Re: Moving a markup


From: Thomas Morley
Subject: Re: Moving a markup
Date: Thu, 26 Feb 2015 22:54:07 +0100

2015-02-26 15:00 GMT+01:00 Ralph Palmer <address@hidden>:
> Greetings -
>
> I'm running LilyPond 2.18.2 under Win7, with Frescobaldi 2.17.2.
>
> I'm trying to move a markup which has a \concat command, and I cannot figure
> out how to do it. As you can see from the snippet, I've tried a variety of
> solutions. Besides those commented out, I tried \null, but I may not have
> placed the command in the correct spot.
>
> I would greatly appreciate a nudge in the right direction.
>
> I appreciate your time and attention,
>
> Ralph
>
> %%%%%%%%%%% snippet %%%%%%%%%%%%
>
> \version "2.18.2"
>
> moveMarkupTest =
> \relative c'' {
>   \key c \major
>   \clef treble
>   \time 2/4
>
>
>   %\once \override TextScript.extra-offset = #'(-20 . -20)
>   R1*1/2
>   %\mark
>   ^\markup   {
>     %\left-align
>     %\halign #-20
>     \concat {
>       {
>         \large \bold
>         {
>           "Un poco Pi" \char ##x00F9 " lento, "
>         }
>       }
>       {
>         \tiny \note #"4" #UP " = 66"
>       }
>     }
>
>   } |
>   e4 b |
>   b4 c |
>   d4 a |
>   a4 c |
>   b4 f |
>   f4 g |
> }
>
> \score {
>   \moveMarkupTest
> }
>
>
> %%%%%%%%% end snippet %%%%%%%%%%%%
>
> --
> Ralph Palmer
> Brattleboro, VT
> USA
> address@hidden

In this thread a plethora of grobs in relation with MultiMeasureRest
is confused:  TextScript, MetronomeMark, RehearsalMark,
MultiMeasureRestText.

I'd recommend to (re-)read NR 1.2.2 Full measure rests
http://www.lilypond.org/doc/v2.19/Documentation/notation/writing-rests#full-measure-rests


Maybe the following demo-code maybe helpful as well:


\version "2.16.0" %% and higher
#(if (< (cadr (ly:version)) 16)
     (ly:error "Does not work before 2.16.0"))


\score{
  \relative c' {
    \tempo "I'm a \"MetronomeMark\"" 4 = 66
    R1
    \repeat unfold 12 c4
    \break
    R1^\markup {  "I'm a \"MultiMeasureRestText\"" \note #"4" #UP " = 66"}
    \repeat unfold 12 c4
    \break
    <>^\markup {  "I'm a \"TextScript\"" \note #"4" #UP " = 66"}
    R1
    \repeat unfold 12 c4
    \break
    \mark \markup {  "I'm a \"RehearsalMark\"" \note #"4" #UP " = 66"}
    R1
    \repeat unfold 12 c4
  }
  \layout {
        \override Score.MetronomeMark #'color = #blue
        \override MultiMeasureRestText #'color = #green
        \override TextScript #'color = #red
        \override Score.RehearsalMark #'color = #cyan

        indent = 30
        short-indent = 30
  }
  \header {
    piece =
      \markup
        \rounded-box
        \fontsize #1.5
        \fill-line {
          \column {
            "Showing different grobs in relation with a MultiMeasureRest"
            "No tweaks/overrides (apart from colors) are applied,
i.e. the default properties are valid"
            \line {
              "see also:"
              \with-url
              #(format #f "http://www.lilypond.org/doc/v~a.~a/Documentation/
notation/writing-rests#full-measure-rests"
                       (car (ly:version)) (cadr (ly:version)))
              \italic "NR 1.2.2 -> Full measure rests"
            }
            #(format #f "Compiled with LilyPond ~a" (lilypond-version))
          }
        }
  }
}


Btw, the \tweak, as suggested by Pierre, can happily ignore _which_
grob is tweaked, because it's always applied to the next grob (at
least in the suggested manner).
One could say, the user does not need to know, how the grob is called,
which he tweaks.
Is this an advantage? I doubt.

And I wouldn't use 'extra-offset, in general it's a last resort.
Use 'padding, 'X-offset, 'Y-offset, 'self-alignment-X, etc
'extra-offset is applied _after_ the spacing etc is done, think about it!

Cheers,
  Harm



reply via email to

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