]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/vertically-centered-dynamics-and-textscripts.ly
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / input / lsr / vertically-centered-dynamics-and-textscripts.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.38"
4
5 \header {
6   lsrtags = "tweaks-and-overrides, spacing"
7  texidoc = "
8 By setting the @code{Y-extent} property to a fixed value, all
9 @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
10 aligned to a common reference point, regardless of their actual extent.
11 This way, every element will be vertically centered, for a nicer output
12 (you can compare the first and the second line in this example; the
13 trick is only applied on the second line).
14
15 The same idea is used to align the text scripts along their baseline.
16 " }
17 % begin verbatim
18 music = \relative c'' {
19   c2\p^\markup { "gorgeous" } c\f^\markup { "fantastic" }
20   c4\p c\f\> c c\!\p
21 }
22
23 {
24   \music \break
25   \override DynamicLineSpanner #'staff-padding = #2.0
26   \override DynamicLineSpanner #'Y-extent = #'(-1.5 . 1.5)
27   \override TextScript #'Y-extent = #'(-1.5 . 1.5)
28   \music
29 }