]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly
Doc: run makelsr locally.
[lilypond.git] / Documentation / snippets / horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly
index a751f9ed334c30c50531ffb05f66a124aa285ef8..5a57a7a743795a4ff42fd4b41f832d68d0ec270b 100644 (file)
@@ -1,10 +1,13 @@
-%% Do not edit this file; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.13.4"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+\version "2.17.6"
 
 \header {
 
 \header {
-  lsrtags = "expressive-marks, tweaks-and-overrides"
+  lsrtags = "correction-wanted, expressive-marks, tweaks-and-overrides, version-specific"
 
   texidoc = "
 Some dynamic expressions involve additional text, like @qq{sempre pp}.
 
   texidoc = "
 Some dynamic expressions involve additional text, like @qq{sempre pp}.
@@ -14,16 +17,18 @@ displayed way after the note it applies to.
 To correctly align the @qq{sempre pp} horizontally, so that it is
 aligned as if it were only the \\pp, there are several approaches:
 
 To correctly align the @qq{sempre pp} horizontally, so that it is
 aligned as if it were only the \\pp, there are several approaches:
 
-* Simply use @code{\\once\\override DynamicText #'X-offset = #-9.2}
+* Simply use @code{\\once\\override DynamicText.X-offset = #-9.2}
 before the note with the dynamics to manually shift it to the correct
 position. Drawback: This has to be done manually each time you use that
 before the note with the dynamics to manually shift it to the correct
 position. Drawback: This has to be done manually each time you use that
-dynamic markup... * Add some padding (@code{#:hspace 7.1}) into the
+dynamic markup...
+
+* Add some padding (@code{#:hspace 7.1}) into the
 definition of your custom dynamic mark, so that after lilypond
 center-aligns it, it is already correctly aligned. Drawback: The
 padding really takes up that space and does not allow any other markup
 or dynamics to be shown in that position.
 
 definition of your custom dynamic mark, so that after lilypond
 center-aligns it, it is already correctly aligned. Drawback: The
 padding really takes up that space and does not allow any other markup
 or dynamics to be shown in that position.
 
-* Shift the dynamic script @code{\\once\\override ... #'X-offset = ..}.
+* Shift the dynamic script @code{\\once\\override ...X-offset = ..}.
 Drawback: @code{\\once\\override} is needed for every invocation!
 
 * Set the dimensions of the additional text to 0 (using
 Drawback: @code{\\once\\override} is needed for every invocation!
 
 * Set the dimensions of the additional text to 0 (using
@@ -46,10 +51,12 @@ not at the center of pp.
 
 
 "
 
 
 "
-  doctitle = "Horizontally aligning custom dynamics (e.g. \"sempre pp\", \"piu f\", \"subito p\")"
+  doctitle = "Horizontally aligning custom dynamics (e.g. \"sempre pp\" \"piu f\" \"subito p\")"
 } % begin verbatim
 
 } % begin verbatim
 
-\header { title = "Horizontally aligning custom dynamics" }
+
+\header { title = "Horizontally aligning custom dynamics" } % begin verbatim
+
 
 \paper { ragged-right = ##f }
 
 
 \paper { ragged-right = ##f }
 
@@ -59,14 +66,14 @@ not at the center of pp.
 semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" }
 
 % Solution 2: Using a dynamic script & shifting with
 semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" }
 
 % Solution 2: Using a dynamic script & shifting with
-%             \once \override ... #'X-offset = ..
+%             \once \override ...X-offset = ..
 % Drawback: \once \override needed for every invocation
 semppK =
 #(make-dynamic-script
   (markup #:line
 % Drawback: \once \override needed for every invocation
 semppK =
 #(make-dynamic-script
   (markup #:line
-         (#:normal-text
-          #:italic "sempre"
-          #:dynamic "pp")))
+          (#:normal-text
+           #:italic "sempre"
+           #:dynamic "pp")))
 
 % Solution 3: Padding the dynamic script so the center-alignment
 %             puts it at the correct position
 
 % Solution 3: Padding the dynamic script so the center-alignment
 %             puts it at the correct position
@@ -74,10 +81,10 @@ semppK =
 semppT =
 #(make-dynamic-script
   (markup #:line
 semppT =
 #(make-dynamic-script
   (markup #:line
-         (#:normal-text
-          #:italic "sempre"
-          #:dynamic "pp"
-          #:hspace 7.1)))
+          (#:normal-text
+           #:italic "sempre"
+           #:dynamic "pp"
+           #:hspace 7.1)))
 
 % Solution 4: Dynamic, setting the dimensions of the additional text to 0
 % Drawback: To lilypond "sempre" has no extent, so it might put
 
 % Solution 4: Dynamic, setting the dimensions of the additional text to 0
 % Drawback: To lilypond "sempre" has no extent, so it might put
@@ -86,26 +93,37 @@ semppT =
 %           same alignment as without the additional text
 semppM =
 #(make-dynamic-script
 %           same alignment as without the additional text
 semppM =
 #(make-dynamic-script
-  (markup #:line (#:with-dimensions '(0 . 0) '(0 . 0)
-   #:right-align #:normal-text #:italic "sempre" #:dynamic "pp")))
+  (markup #:line
+          (#:with-dimensions '(0 . 0) '(0 . 0)
+                             #:right-align
+                             #:normal-text
+                             #:italic "sempre"
+                             #:dynamic "pp")))
 
 % Solution 5: Dynamic with explicit shifting inside the scheme function
 semppG =
 #(make-dynamic-script
 
 % Solution 5: Dynamic with explicit shifting inside the scheme function
 semppG =
 #(make-dynamic-script
-  (markup
-    #:hspace 0 #:translate '(-18.85 . 0)
-    #:line( #:normal-text #:italic "sempre" #:dynamic "pp")))
-
-% Solution 6: Dynamic with explicit alignment. This has only effect, if one sets X-offset!
-% Drawback: One needs to set DynamicText #'X-offset!
-% Drawback: Aligned at the right edge of the additional text, not at the center of pp
+  (markup #:hspace 0
+          #:translate '(-18.85 . 0)
+          #:line (#:normal-text
+                  #:italic "sempre"
+                  #:dynamic "pp")))
+
+% Solution 6: Dynamic with explicit alignment. This has only effect
+%             if one sets X-offset!
+% Drawback: One needs to set DynamicText.X-offset!
+% Drawback: Aligned at the right edge of the additional text,
+%           not at the center of pp
 semppMII =
 semppMII =
-#(make-dynamic-script (markup #:line(#:right-align
-  #:normal-text #:italic "sempre" #:dynamic "pp")))
+#(make-dynamic-script
+  (markup #:line (#:right-align
+                  #:normal-text
+                  #:italic "sempre"
+                  #:dynamic "pp")))
 
 \context StaffGroup <<
   \context Staff = "s" <<
 
 \context StaffGroup <<
   \context Staff = "s" <<
-    \set Staff.instrumentName = "Normal"
+    \set Staff.instrumentName = #"Normal"
     \relative c'' {
       \key es \major
       c4\pp c\p c c | c\ff c c\pp c
     \relative c'' {
       \key es \major
       c4\pp c\p c c | c\ff c c\pp c
@@ -122,10 +140,10 @@ semppMII =
     \set Staff.instrumentName = \markup \column { Explicit shifting }
     \relative c'' {
       \key es \major
     \set Staff.instrumentName = \markup \column { Explicit shifting }
     \relative c'' {
       \key es \major
-      \once \override DynamicText #'X-offset = #-9.2
+      \once \override DynamicText.X-offset = #-9.2
       c4\semppK c\p c c
       c4\ff c
       c4\semppK c\p c c
       c4\ff c
-      \once \override DynamicText #'X-offset = #-9.2
+      \once \override DynamicText.X-offset = #-9.2
       c4\semppK c
     }
   >>
       c4\semppK c
     }
   >>
@@ -155,7 +173,7 @@ semppMII =
     \relative c'' {
       \key es \major
       % Setting to ##f (false) gives the same result
     \relative c'' {
       \key es \major
       % Setting to ##f (false) gives the same result
-      \override DynamicText #'X-offset = #0
+      \override DynamicText.X-offset = #0
       c4\semppMII c\p c c | c\ff c c\semppMII c
     }
   >>
       c4\semppMII c\p c c | c\ff c c\semppMII c
     }
   >>