]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/displaying-grob-ancestry.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / Documentation / snippets / displaying-grob-ancestry.ly
index d26184ffb60a1704099dbd6d47675ced5dde662d..87d2da59f6294d002091b3067a93375b696d6f45 100644 (file)
@@ -1,10 +1,13 @@
-%% Do not edit this file; it is automatically
+%% DO NOT EDIT this file manually; it is automatically
 %% generated from LSR http://lsr.dsi.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
 %% This file is in the public domain.
-\version "2.13.10"
+\version "2.16.0"
 
 \header {
-  lsrtags = "tweaks-and-overrides"
+  lsrtags = "devel, scheme-language, tweaks-and-overrides"
 
   texidoc = "
 When working with grob callbacks, it can be helpful to understand a
@@ -14,8 +17,8 @@ vertical positions for the grob, respectively. Additionally, each
 parent may have parents of its own.
 
 
-Unfortunately, there are several aspects of a grob's ancestry can lead
-to confusion:
+Unfortunately, there are several aspects of a grob's ancestry that can
+lead to confusion:
 
 * The types of parents a grob has may depend on context. * For some
 grobs, the X- and Y-parents are the same. * A particular @qq{ancestor}
@@ -105,17 +108,15 @@ NoteHead X,Y: NoteColumn
     (format #f "~&")))
 
 #(define (display-ancestry grob)
-   (display
-    (string-append
-     (format #f "~3&~a~2%" (make-string 36 #\-))
-     (format-ancestry (get-ancestry grob) 0)
-     (format #f "~2&"))))
+   (format (current-error-port)
+      "~3&~a~2%~a~&"
+      (make-string 36 #\-)
+      (format-ancestry (get-ancestry grob) 0)))
 
 \relative c' {
   \once \override NoteHead #'before-line-breaking = #display-ancestry
-  f
+  f4
   \once \override Accidental #'before-line-breaking = #display-ancestry
   \once \override Arpeggio #'before-line-breaking = #display-ancestry
-  <f as c>\arpeggio
+  <f as c>4\arpeggio
 }
-