]> git.donarmstrong.com Git - lilypond.git/commitdiff
LSR update.
authorGraham Percival <graham@percival-music.ca>
Sat, 16 Feb 2008 19:03:16 +0000 (11:03 -0800)
committerGraham Percival <graham@percival-music.ca>
Sat, 16 Feb 2008 19:03:16 +0000 (11:03 -0800)
input/lsr/spacing.snippet-list
input/lsr/tweaks-and-overrides.snippet-list
input/lsr/vertically-centered-dynamics-and-textscripts.ly [new file with mode: 0644]

index d9f5825d2e1e103ad235fda9f8ecc453a051ca18..1762bd4f7b006be693f1026f795ea61058ca2bd0 100644 (file)
@@ -1,5 +1,6 @@
-alignment-vertical-spacing.ly
 vertically-aligning-ossias-and-lyrics.ly
+adjusting-lyrics-vertical-spacing.ly
+alignment-vertical-spacing.ly
 page-label.ly
+vertically-centered-dynamics-and-textscripts.ly
 proportional-strict-notespacing.ly
-adjusting-lyrics-vertical-spacing.ly
index eb85822dcaec15d917f312ad901a462e32e4e5b7..f1322ee7d811ac3b10b22b1a0ea614aa46966450 100644 (file)
@@ -1,8 +1,8 @@
 altering-the-number-of-stems-in-a-beam.ly
 time-signature-in-parentheses.ly
-changing-the-default-text-font-family.ly
+vertically-centered-dynamics-and-textscripts.ly
 proportional-strict-notespacing.ly
-making-an-object-invisible-with-the-transparent-property.ly
+changing-the-default-text-font-family.ly
 transcription-of-ancient-music-with-incipit.ly
 alignment-vertical-spacing.ly
 manually-controlling-beam-positions.ly
@@ -10,6 +10,7 @@ custodes.ly
 drawing-boxes-around-grobs.ly
 move-specific-text.ly
 drawing-circles-around-various-objects.ly
+making-an-object-invisible-with-the-transparent-property.ly
 rest-styles.ly
 creating-text-spanners.ly
 using-the--tweak-command-to-tweak-individual-grobs.ly
diff --git a/input/lsr/vertically-centered-dynamics-and-textscripts.ly b/input/lsr/vertically-centered-dynamics-and-textscripts.ly
new file mode 100644 (file)
index 0000000..5d183b4
--- /dev/null
@@ -0,0 +1,38 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "tweaks-and-overrides, spacing"
+ texidoc = "
+By setting the Y-extent property to a fixed value (here -1.5 . 1.5), we
+force LilyPond to align every elements of the DynamicLineSpanner (text
+elements and dynamics) to a common reference point, regardless to the
+actual extent of these objects. This way, every element will be
+vertically centered, for a nicer output (you can compare the first and
+the second line in this example; the trick is only applied on the
+second line).
+
+The same idea is used to align the text scripts along their baseline.
+" }
+% begin verbatim
+\paper { indent = 0 line-width = 5\in }
+
+music = \relative c''
+{
+   c2\p^\markup { "gorgeous" } c\f^\markup { "fantastic" }
+   c4\p c \f \> c c \! \p
+}
+
+\score
+{
+   {
+       \music \break
+
+       \override DynamicLineSpanner #'staff-padding = #2.0
+       \override DynamicLineSpanner #'Y-extent = #'(-1.5 . 1.5)
+       \override TextScript #'Y-extent = #'(-1.5 . 1.5)
+       \music
+   }
+}
+