lilypond-user
[Top][All Lists]
Advanced

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

Re: Moving a markup


From: Ralph Palmer
Subject: Re: Moving a markup
Date: Thu, 26 Feb 2015 17:28:34 -0500

On Thu, Feb 26, 2015 at 4:54 PM, Thomas Morley <address@hidden> wrote:


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

Thank you to Harm and to everyone else who has responded to my plea. I'll have to take some time to digest the information. I *did* try to find an answer in both the Notation Reference and in the Snippet Repository. That usually works, but I was not successful this time. I was a little surprised that a search for "moving markups" or "positioning markups" returned no results (or perhaps no results that seemed pertinent to my difficulty).

Cheers,

Ralph

--
Ralph Palmer
Brattleboro, VT
USA
address@hidden

reply via email to

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