If the book only has a single score, the @code{\header} block may be
placed inside or outside of the @code{\score} block.
-The default behavior, when the @code{\header} has been defined inside
-the @code{\score} block, is to print only the @code{piece} and
-@code{opus} fields:
-
-@lilypond[papersize=a5,quote,verbatim,noragged-right]
-\score {
- { c'4 }
- \header {
- title = "title" % not printed
- piece = "piece"
- opus = "opus"
- }
-}
-@end lilypond
-
-@funindex print-all-headers
-@noindent
-You may change this behavior (and print all the headers when defining
-@code{\header} inside @code{\score}) by using
-
-@example
-\paper@{
- print-all-headers = ##t
-@}
-@end example
-
@warning{Remember when adding a @bs{}@code{header} block inside a
@bs{}@code{score} block, that the music expression must come before the
@bs{}@code{header} block.}
{ s1 }
\header {
piece = \markup { \fontsize #4 \bold "PRAELUDIUM I" }
- opus = \markup { \italic "(Excerpt)" }
+ subtitle = \markup { \italic "(Excerpt)" }
}
}
@end lilypond
Variables are perhaps most useful for combining lengthy sections
of music and/or annotation in various ways, while tags are more
useful for selecting one from several alternative shorter sections
-of music. Whichever method is used, separating the notation from
+of music. You can also employ tags for splicing pieced of music
+together at several places.
+
+Whichever method is used, separating the notation from
the structure of the score will make it easier to change the
structure while leaving the notation untouched.
@funindex \tag
@funindex \keepWithTag
@funindex \removeWithTag
+@funindex \pushToTag
+@funindex \appendToTag
@cindex tag
@cindex keep tagged music
@cindex remove tagged music
+@cindex splice into tagged music
The @code{\tag #'@var{partA}} command marks a music expression
with the name @var{partA}.
the first filter will remove all tagged sections except the one
named, and the second filter will remove even that tagged section.
+Sometimes you want to splice some music at a particular place in an
+existing music expression. You can use @code{\pushToTag} and
+@code{\appendToTag} for adding material at the front or end of the
+@code{elements} of an existing music construct. Not every music
+construct has @code{elements}, but sequential and simultaneous music are
+safe bets:
+
+@lilypond[verbatim,quote]
+test = { \tag #'here { \tag #'here <<c''>> } }
+
+{
+ \pushToTag #'here \pushToTag #'here
+ \pushToTag #'here \test g' e' c'
+ \appendToTag #'here \appendToTag #'here
+ \appendToTag #'here \test g' e' c'
+}
+@end lilypond
+
+Both commands get a tag, the tagged expression, and finally the material
+you want to splice in at every given tag. The commands make sure to
+copy everything that they change so that the original @code{\test}
+retains its meaning.
@seealso
Learning Manual:
@snippets
-@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{changing-midi-output-to-one-channel-per-voice.ly}
@knownissues