Hi, Does this help ?
\version "2.18.2"
bla = \markup{Bla}
melody = \relative c'' {
c4 d e f ^\bla
c4 d e f \tag #'a {<>^\bla} % (1)
c4 d e f \tag #'a {<>^\bla} % (2)
c4 d e f \tag #'a {<>^\bla} % (3)
}
\keepWithTag #'a \melody
\removeWithTag #'a \melody
Cheers,
Pierre
2018-07-15 14:29 GMT+02:00 <[email protected]>:
> Hello!
>
> Here on the list you showed me that I can better re-use my lilypond-code
> by using \tag s. Wonderful :) It's only - I don't understand how. given
> this very simple piece of code:
>
> \version "2.18.2"
>
> bla = \markup{Bla}
>
> melody = \relative c'' {
> c4 d e f ^\bla
> c4 d e f \tag #'a {^\bla} % (1)
> c4 d e f \tag #'a ^{\bla} % (2)
> c4 d e f ^\tag #'a {\bla} % (3)
> }
>
> \score {
> \new Staff { \melody }
> }
>
>
>
>
> I get these errors:
>
> Processing `/home/markus/chor/lilypond/tags.ly'
> Parsing...
> /home/markus/chor/lilypond/tags.ly:7:22: error: syntax error, unexpected
> '^'
> c4 d e f \tag #'a {
> ^\bla} % (1)
> /home/markus/chor/lilypond/tags.ly:7:23: warning: Ignoring non-music
> expression
> c4 d e f \tag #'a {^
> \bla} % (1)
> /home/markus/chor/lilypond/tags.ly:8:22: error: syntax error, unexpected
> '{'
> c4 d e f \tag #'a ^
> {\bla} % (2)
> /home/markus/chor/lilypond/tags.ly:8:23: warning: Ignoring non-music
> expression
> c4 d e f \tag #'a ^{
> \bla} % (2)
> /home/markus/chor/lilypond/tags.ly:9:23: warning: Ignoring non-music
> expression
> c4 d e f ^\tag #'a {
> \bla} % (3)
> /home/markus/chor/lilypond/tags.ly:9:13: error: post-event expected
> c4 d e f ^
> \tag #'a {\bla} % (3)
> /home/markus/chor/lilypond/tags.ly:13:5: error: errors found, ignoring
> music expression
>
> \new Staff { \melody }
> fatal error: failed files: "/home/markus/chor/lilypond/tags.ly"
>
>
> As you see, I'm more or less guessing around. I somehow expected (1) to
> work and really can't see what to do. Could you give me a hint, please?
>
> --
> Markus Grunwald
> https://www.the-grue.de/~markus/markus_grunwald.gpg
>
> _______________________________________________
> lilypond-user mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user