#### 3.14.10 Different editions from one source

The `\tag` command marks music expressions with a name. These tagged expressions can be filtered out later. With this mechanism it is possible to make different versions of the same music source.

In the following example, we see two versions of a piece of music, one for the full score, and one with cue notes for the instrumental part

           c1
           \relative c' <<
             \tag #'part <<
               R1 \\
               {
                 \set fontSize = #-1
                 c4_"cue" f2 g4 }
             >>
             \tag #'score R1
           >>
           c1

The same can be applied to articulations, texts, etc.: they are made by prepending

                 -\tag #your-tag

to an articulation, for example,

             c1-\tag #'part ^4

This defines a note with a conditional fingering indication.

By applying the `remove-tag` function, tagged expressions can be filtered. For example,

         \simultaneous {
           the music
           \apply #(remove-tag 'score) the music
           \apply #(remove-tag 'part) the music
         }

would yield

The argument of the `\tag` command should be a symbol, or a list of symbols, for example,

           \tag #'(original-part transposed-part) ...

##### See also

Examples: input/regression/tag-filter.ly.

Read comments on this page, or add one. This page is for LilyPond-2.2.5 (stable-branch).