]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/vertically-aligned-dynamics-and-textscripts.ly
Imported Upstream version 2.18.0
[lilypond.git] / Documentation / snippets / vertically-aligned-dynamics-and-textscripts.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.17.27
8 \version "2.17.27"
9
10 \header {
11   lsrtags = "spacing, tweaks-and-overrides, workaround"
12
13   texidoc = "
14 All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
15 placed with their reference line at least @code{'staff-padding} from
16 the staff, unless other notation forces them to be farther.
17 Setting @code{'staff-padding} to a sufficiently large value aligns the
18 dynamics.
19
20 The same idea, together with @code{\\textLengthOn}, is used to align
21 the text scripts along their baseline.
22
23 "
24   doctitle = "Vertically aligned dynamics and textscripts"
25 } % begin verbatim
26
27 \markup \vspace #1 %avoid LSR-bug
28
29 music = \relative c' {
30   a'2\p b\f
31   e4\p f\f\> g, b\p
32   c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
33 }
34
35 {
36   \music
37   \break
38   \override DynamicLineSpanner.staff-padding = #3
39   \textLengthOn
40   \override TextScript.staff-padding = #1
41   \music
42 }