lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I use \tag?


From: lyuser . thegrue
Subject: How do I use \tag?
Date: Sun, 15 Jul 2018 14:29:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]