X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fusing-ly-grob-object-to-access-grobs-with--tweak.ly;h=c38ab0113e3ff17ef65c24b5b69bb2b8829f6015;hb=9d6de982fe5be4786a9bc8ff71d577042dbba61f;hp=39877305d60e1944f6bb0c0fc2bd293387c9f182;hpb=45b219221124f4d7b977a1a0b1e489c47bb3ac02;p=lilypond.git diff --git a/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly b/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly index 39877305d6..c38ab0113e 100644 --- a/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly +++ b/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly @@ -1,59 +1,18 @@ -% 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.14.0 -\version "2.14.0" +%% 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.17.25" \header { -%% Translation of GIT committish: 8b93de6ce951b7b14bc7818f31019524295b990f - - texidoces = " - -Se puede acceder @qq{lateralmente} a algunos grobs desde dentro de la -función de callback de otro grob. Éstos se encuentran relacionados -normalmente como @qq{layout objects} (objetos de presentación) en la -sección @qq{Internal properties} (propiedades internas) de un -interface de grob. Se usa la función @code{ly:grob-object} para -acceder a estos grobs. - - -Se presentan más abajo como ejemplo algunas formas de addecer a grobs -desde dentro de una función de callback de NoteHead, pero la técnica -no se limita a las cabezas de nota. Sin embargo, la función de -callback de NoteHead es especialmente importante, porque es la función -de callback implícita que utiliza la instrucción @code{\\tweak}. - - -La función de ejemplo que se define abajo (\"display-grobs\") no es -probablemente tan útil, pero muestra que se está accediendo -efectivamente a los grobs. - - -Salida de ejemplo de la consola: - - -@example --------------------- -#-Grob Accidental - -#-Grob Arpeggio - -#-Grob Stem - -@end example - - -" - - doctitlees = "Utilizar ly:grob-object para acceder a los grobs con \\tweak" - - - lsrtags = "tweaks-and-overrides" + lsrtags = "devel, scheme-language, tweaks-and-overrides" texidoc = " Some grobs can be accessed @qq{laterally} from within another grob's -callback. These are usually listed as @qq{layout objects} in the -@qq{Internal properties} section of a grob-interface. The function +callback. These are usually listed as @qq{layout objects} in the +@qq{Internal properties} section of a grob-interface. The function @code{ly:grob-object} is used to access these grobs. @@ -71,19 +30,14 @@ accessed. Example console output: -@example --------------------- -#-Grob Accidental - -#-Grob Arpeggio - -#-Grob Stem - -@end example +-------------------- #-Grob Accidental - #-Grob Arpeggio - #-Grob Stem - + " doctitle = "Using ly:grob-object to access grobs with \\tweak" } % begin verbatim - #(define (notehead-get-accidental notehead) ;; notehead is grob (ly:grob-object notehead 'accidental-grob)) @@ -107,17 +61,17 @@ Example console output: (let ((accidental (notehead-get-accidental notehead)) (arpeggio (notehead-get-arpeggio notehead)) (stem (notehead-get-stem notehead))) - (format #t "~2&~a\n" (make-string 20 #\-)) + (format (current-error-port) "~2&~a\n" (make-string 20 #\-)) (for-each - (lambda (x) (format #t "~a\n" x)) + (lambda (x) (format (current-error-port) "~a\n" x)) (list accidental arpeggio stem)))) \relative c' { %% display grobs for each note head: - %\override NoteHead #'before-line-breaking = #display-grobs + %\override NoteHead.before-line-breaking = #display-grobs 1\arpeggio }