]> git.donarmstrong.com Git - lilypond.git/commitdiff
convert-ly rule for annotate-foo, and snippet from NEWS.
authorGraham Percival <graham@percival-music.ca>
Sat, 10 Jun 2006 04:35:28 +0000 (04:35 +0000)
committerGraham Percival <graham@percival-music.ca>
Sat, 10 Jun 2006 04:35:28 +0000 (04:35 +0000)
ChangeLog
Documentation/user/programming-interface.itely
python/convertrules.py

index 8cce756d72353df1af787a7922070812d4b0647c..02dc0763f4473ec0f4100695b645e5c51fb979f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-10  Graham Percival  <gpermus@gmail.com>
+
+       * Documentation/user/programming-interfaces.itely: add
+       info from NEWS.
+
+       * python/convertrules.py: add annotatefoo -> annotate-foo
+       rules.
+
 2006-06-10  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * HACKING: trim outdated info.
@@ -14,7 +22,6 @@
        * input/regression/page-spacing.ly,
        input/regression/page-layout-manual-position.ly: idem
 
-
 2006-06-09  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * lily/line-spanner.cc: cleanup property list.
index e282f754f11a12da849dd431e1560f311f5e5571..9e149bd8a0112da7ca18d17cceef4869059d25bd 100644 (file)
@@ -12,6 +12,7 @@ not familiar with Scheme, you may wish to read our
 * Building complicated functions::  
 * Markup programmer interface::  
 * Contexts for programmers::    
+* Scheme procedures as properties::
 @end menu
 
 
@@ -1131,3 +1132,36 @@ note-heads on the center-line:
      (set! (ly:grob-property grob 'transparent) #t)))
 @end example
 
+
+@node Scheme procedures as properties
+@section Scheme procedures as properties
+
+Properties (like thickness, direction, etc.) can be set at fixed values
+with \override, e.g.
+
+@example
+\override Stem #'thickness = #2.0
+@end example
+
+Properties can also be set to a Scheme procedure,
+
+@lilypond[fragment,verbatim,quote,relative=2]
+\override Stem #'thickness = #(lambda (grob)
+    (if (= UP (ly:grob-property grob 'direction))
+        2.0
+        7.0))
+c b a g b a g b
+@end lilypond
+
+Procedures may also be combined like that with
+"grob closure".  Here is a setting from
+@code{AccidentalSuggestion},
+
+@example
+(X-offset . ,(ly:make-simple-closure
+             `(,+
+               ,(ly:make-simple-closure (list ly:self-alignment-interface::centered-on-x-parent))
+               ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
+@end example
+
+
index d535ae8ce96dda13cfe17e895b6e5e460b35ce81..ecf7532ceffda5165889cb58aa0fb940e99eb9ec 100644 (file)
@@ -2795,3 +2795,14 @@ def conv (str):
     return str
 
 conversions.append (((2, 9, 6), conv, """\context Foo \applyOutput #bla -> \applyOutput #'Foo #bla """))
+
+
+def conv (str):
+    str = re.sub ('annotatepage', 'annotate-page', str)
+    str = re.sub ('annotateheaders', 'annotate-headers', str)
+    str = re.sub ('annotatesystems', 'annotate-systems', str)
+    return str
+
+conversions.append (((2, 9, 9), conv, """annotatefoo -> annotate-foo"""))
+
+