* Documentation/user/changing-defaults.itely (Creating contexts): idem.
* Documentation/user/programming-interface.itely (Running a
function on all layout objects): idem.
* Documentation/user/introduction.itely (Automated engraving):
update \applyOutput syntax
2006-05-24 Han-Wen Nienhuys <hanwen@lilypond.org>
+ * Documentation/user/advanced-notation.itely (Balloon help): idem.
+
+ * Documentation/user/changing-defaults.itely (Creating contexts): idem.
+
+ * Documentation/user/programming-interface.itely (Running a
+ function on all layout objects): idem.
+
+ * Documentation/user/introduction.itely (Automated engraving):
+ update \applyOutput syntax
+
* lily/lyric-combine-music-iterator.cc (start_new_syllable):
remove debugging hook.
The following example demonstrates its use.
@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
-\new Voice {
- \applyOutput
- #(add-balloon-text 'NoteHead "heads, or tails?"
- '(1 . -3))
+\applyOutput #'Voice
+ #(add-balloon-text 'NoteHead "heads, or tails?"
+ '(1 . -3))
c8
-}
@end lilypond
@noindent
@code{\context}, it is usually applied to @context{Voice}
@example
-\applyOutput #@var{function} % apply to Voice
+\applyOutput #'@var{context} #@var{function} % apply to Voice
@end example
To have it interpreted at the @context{Score} or @context{Staff} level use
these forms
@example
-\context Score \applyOutput #@var{function}
-\context Staff \applyOutput #@var{function}
+\context \applyOutput #'Score #@var{function}
+\context \applyOutput #'Staff #@var{function}
@end example
@end itemize
<d f g>
\once \override NoteHead #'style = #'cross
<d f g>
- \applyOutput #mc-squared
+ \applyOutput #'Voice #mc-squared
<d f g>
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
>>
}
@end lilypond
The most versatile way of tuning an object is @code{\applyOutput}. Its
syntax is
@example
-\applyOutput @var{proc}
+\applyOutput @var{context} @var{proc}
@end example
@noindent
where @var{proc} is a Scheme function, taking three arguments.
When interpreted, the function @var{proc} is called for every layout
-object found in the context, with the following arguments:
+object found in the context @var{context}, with the following
+arguments:
@itemize @bullet
@item the layout object itself,
@item the context where the layout object was created, and