]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4524: NR Changing Defaults: document \etc
authorDavid Kastrup <dak@gnu.org>
Sun, 26 Jul 2015 14:26:33 +0000 (16:26 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 2 Aug 2015 08:32:09 +0000 (10:32 +0200)
Documentation/notation/changing-defaults.itely

index 01fc08bcc91caa679aea62070b7450eade0afadb..4c000c565d1720044dad9a7abc9cba82be099a2e 100644 (file)
@@ -4758,6 +4758,39 @@ custosNote =
 \relative { c'4 d e f \custosNote g }
 @end lilypond
 
+@funindex \etc
+Both of those functions are simple single expressions where only
+the last element of a function call or override is missing.  For
+those particular function definitions, there is a simpler
+alternative syntax, namely just writing out the constant part of
+the expression and replacing its final missing element with
+@code{\etc}:
+
+@lilypond[quote,verbatim,ragged-right]
+padText =
+  \once \override TextScript.padding = \etc
+
+\relative {
+  c''4^"piu mosso" b a b
+  \padText #1.8
+  c4^"piu mosso" b a b
+  \padText #2.6
+  c4^"piu mosso" b a b
+}
+@end lilypond
+
+@lilypond[quote,verbatim,ragged-right]
+custosNote =
+  \tweak NoteHead.stencil #ly:text-interface::print
+  \tweak NoteHead.text
+     \markup \musicglyph #"custodes.mensural.u0"
+  \tweak Stem.stencil ##f
+  \etc
+
+\relative { c'4 d e f \custosNote g }
+@end lilypond
+
+
 Substitution functions with multiple arguments can be defined:
 
 @lilypond[quote,verbatim,ragged-right]