]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/vertically-aligned-dynamics-and-textscripts.ly
Imported Upstream version 2.18.2
[lilypond.git] / Documentation / snippets / new / vertically-aligned-dynamics-and-textscripts.ly
1 \version "2.17.27"
2
3 \header {
4   lsrtags = "spacing, tweaks-and-overrides, workaround"
5
6   texidoc = "
7 All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
8 placed with their reference line at least @code{'staff-padding} from
9 the staff, unless other notation forces them to be farther.
10 Setting @code{'staff-padding} to a sufficiently large value aligns the
11 dynamics.
12
13 The same idea, together with @code{\\textLengthOn}, is used to align
14 the text scripts along their baseline.
15
16 "
17   doctitle = "Vertically aligned dynamics and textscripts"
18 }
19 \markup \vspace #1 %avoid LSR-bug
20
21 music = \relative c' {
22   a'2\p b\f
23   e4\p f\f\> g, b\p
24   c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
25 }
26
27 {
28   \music
29   \break
30   \override DynamicLineSpanner.staff-padding = #3
31   \textLengthOn
32   \override TextScript.staff-padding = #1
33   \music
34 }