]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/vertically-aligned-dynamics-and-textscripts.ly
Rerun scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / Documentation / snippets / vertically-aligned-dynamics-and-textscripts.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.17.6"
8
9 \header {
10   lsrtags = "spacing, tweaks-and-overrides, workaround"
11
12   texidoc = "
13 By setting the @code{'Y-extent} property to a suitable value, all
14 @code{DynamicLineSpanner} objects (hairpins and dynamic texts) can be
15 aligned to a common reference point, regardless of their actual extent.
16 This way, every element will be vertically aligned, thus producing a
17 more pleasing output.
18
19 The same idea is used to align the text scripts along their baseline.
20
21 "
22   doctitle = "Vertically aligned dynamics and textscripts"
23 } % begin verbatim
24
25
26 music = \relative c' {
27   a'2\p b\f
28   e4\p f\f\> g, b\p
29   c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
30 }
31
32 {
33   \music
34   \break
35   \override DynamicLineSpanner.staff-padding = #2.0
36   \override DynamicLineSpanner.Y-extent = #'(-1.5 . 1.5)
37   \override TextScript.Y-extent = #'(-1.5 . 1.5)
38   \music
39 }