Demonstrating the power and flexibility of the \markup function

Revision as of 22:38, 26 October 2025 by Jean Abou Samra (talk | contribs) (Import snippet from LSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Here are some examples of how various markup texts can be obtained with LilyPond syntax. You won't probably be needing all of them in a standard score, but hey, you never know...

\version "2.24.0"

%% http://lsr.di.unimi.it/LSR/Item?id=252


{
  f'1-\markup {
    foo
    \raise #0.2 \hbracket \bold bar

    \override #'(baseline-skip . 4)
    \bracket \column {
      baz
      bazr
      bla
    }
    \hspace #2.0
    \override #'(font-encoding . fetaMusic) {
      \lookup "noteheads-0"
    }
    \semiflat
    { }
    \combine "X" "+"
    \combine "o" "/"
  }
  g'1-\markup {
    %% \char-number #"abc1234abc"
    \box \column {
      \line { "string 1" }
      \line { "string 2" }
     %% \concat { "f" "i" }
    }
    " "
    \draw-circle #1 #0.3 ##f
    " "
    \draw-circle #1 #0.3 ##t
    " "
    \italic Norsk
    \super "2"
    " "
    \raise #3.0 \whiteout white-out
    \circle \dynamic p
    \with-color #green Green
    \dynamic sfzp
    \huge { "A" \smaller "A" \smaller \smaller "A"
	    \smaller \smaller \smaller "A" }
    \sub "alike"
  }	
  c''4
}