]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/displaying-grob-ancestry.ly
use trap to remove tmp directory on failure to avoid hiding mpost
[lilypond.git] / Documentation / snippets / displaying-grob-ancestry.ly
index 6871171cd1e01f69c1b675912a39b273c754f7c8..6bf2b805165aa7855dff81fe7310d9dcc11dad69 100644 (file)
@@ -1,14 +1,15 @@
-% 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.
-%% Note: this file works from version 2.13.36
-\version "2.13.36"
+%% 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.14.2"
 
 \header {
-%% Translation of GIT committish: 91eeed36c877fe625d957437d22081721c8c6345
+  lsrtags = "devel, tweaks-and-overrides, scheme-language"
+
+%% Translation of GIT committish: b482c3e5b56c3841a88d957e0ca12964bd3e64fa
 
   texidoces = "
 Al trabajar con los callbacks de un grob, puede ser de mucha ayuda
@@ -78,35 +79,21 @@ NoteHead X,Y: NoteColumn
 
   doctitlees = "Imprimir el árbol genealógico de un grob"
 
-  lsrtags = "tweaks-and-overrides"
-
   texidoc = "
 When working with grob callbacks, it can be helpful to understand a
-grob's @qq{ancestry}.  Most grobs have @qq{parents} which influence the
-positioning of the grob.  X- and Y-parents influence the horizontal and
-vertical positions for the grob, respectively.  Additionally, each
+grob's @qq{ancestry}. Most grobs have @qq{parents} which influence the
+positioning of the grob. X- and Y-parents influence the horizontal and
+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 that can
 lead to confusion:
 
-
-@itemize
-
-@item
-The types of parents a grob has may depend on context.
-
-@item
-For some grobs, the X- and Y-parents are the same.
-
-@item
-A particular @qq{ancestor} may be related to a grob in multiple ways.
-
-@item
-The concept of @qq{generations} is misleading.
-
-@end itemize
+* 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}
+may be related to a grob in multiple ways. * The concept of
+@qq{generations} is misleading.
 
 
 For example, the @code{System} grob can be both parent (on the Y-side)
@@ -120,18 +107,15 @@ ancestry.
 
 When called this way
 
-@example
+
 @{
-   \\once \\override NoteHead #'before-line-breaking = #display-ancestry
-   c4
-@}
-@end example
+ \\once \\override NoteHead #'before-line-breaking = #display-ancestry
+ c @}
 
 
 The following output is generated:
 
 
-@example
 ------------------------------------
 
 NoteHead X,Y: NoteColumn
@@ -144,14 +128,13 @@ NoteHead X,Y: NoteColumn
           X: NonMusicalPaperColumn
              X,Y: System
           Y: System
-@end example
+
 
 
 "
   doctitle = "Displaying grob ancestry"
 } % begin verbatim
 
-
 #(define (grob-name grob)
    (if (ly:grob? grob)
        (assoc-ref (ly:grob-property grob 'meta) 'name)
@@ -195,11 +178,10 @@ 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