]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix TODO with markup padding and fix buggy example in LM
authorPhil Holmes <mail@philholmes.net>
Mon, 6 Apr 2015 11:12:23 +0000 (12:12 +0100)
committerPhil Holmes <mail@philholmes.net>
Wed, 15 Apr 2015 08:48:17 +0000 (09:48 +0100)
Documentation/learning/fundamental.itely

index 108d200ca02a6298bb783ea019c07a25ebc58437..6aa80af8d344a81390f7089d5ac02668cca462ac 100644 (file)
@@ -3014,11 +3014,11 @@ violin = \new Staff {
 However, you can also use these variables (also known as
 macros, or user-defined commands) for tweaks:
 
-@c TODO Avoid padtext - not needed with skylining
 @lilypond[quote,verbatim,ragged-right]
 dolce = \markup { \italic \bold dolce }
 
-padText = { \once \override TextScript.padding = #5.0 }
+centreText = { \once \override TextScript.self-alignment-X = #CENTER }
+
 fthenp =_\markup {
   \dynamic f \italic \small { 2nd } \hspace #0.1 \dynamic p
 }
@@ -3026,9 +3026,9 @@ fthenp =_\markup {
 violin = \relative c'' {
   \repeat volta 2 {
     c4._\dolce b8 a8 g a b |
-    \padText
-    c4.^"hi there!" d8 e' f g d |
-    c,4.\fthenp b8 c4 c-. |
+    \centreText
+    c4.^"hi there!" d8 e f g d |
+    c4.\fthenp b8 c4 c-. |
   }
 }
 
@@ -3036,7 +3036,6 @@ violin = \relative c'' {
   {
     \violin
   }
-  \layout { ragged-right = ##t }
 }
 @end lilypond
 
@@ -3051,9 +3050,9 @@ the last line.
 violin = \relative c'' @{
   \repeat volta 2 @{
     c4._\markup @{ \italic \bold dolce @} b8 a8 g a b |
-    \once \override TextScript.padding = #5.0
-    c4.^"hi there!" d8 e' f g d |
-    c,4.\markup @{
+    \once \override TextScript.self-alignment-X = #CENTER
+    c4.^"hi there!" d8 e f g d |
+    c4._\markup @{
       \dynamic f \italic \small @{ 2nd @} \hspace #0.1 \dynamic p
     @}
     b8 c4 c-. |
@@ -3062,9 +3061,9 @@ violin = \relative c'' @{
 @end example
 
 So far we've seen static substitution -- when LilyPond
-sees @code{\padText}, it replaces it with the stuff that
+sees @code{\centreText}, it replaces it with the stuff that
 we've defined it to be (ie the stuff to the right of
-@code{padtext=}).
+@code{centreText=}).
 
 LilyPond can handle non-static substitution, too (you
 can think of these as functions).