bug-lilypond
[Top][All Lists]
Advanced

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

Re: \tag can't follow \lyricsto


From: Trevor Daniels
Subject: Re: \tag can't follow \lyricsto
Date: Tue, 15 Jul 2008 20:02:36 +0100


Roman Stawski wrote

> The \tag command provokes a syntax error if it immediately follows a
> \lyricsto
> command. A work-around is to insert an empty expression {} between the
> two.
>
> \version "2.11.49"
> \paper{ ragged-right=##t }
> <<
>  \new Voice = "dirge" { c''1 }
>  \lyricsto "dirge" \new Lyrics { Whoops }
>  % {}    % <-- \tag provokes syntax error if this line is commented out
>  \tag #'harmony { a'1 }
>>>

The \tag command appears not to define a new Staff/Voice
implicitly, whereas {} does, so the command fails without
the {}.  However, this seems a poor structure for an
input file, as it is quite unclear whether the tagged
line should generate a new staff, generate a new voice,
or be part of "dirge".  So, not really a bug, just a bad
input file.

Trevor


I'm not sure that I understand your explanation. However, perhaps I overpruned my example. The following has explicit staves, yet it behaves exactly in the
same way. I _think_ that in this case the input file is unambiguous.
---
\version "2.11.49"
\paper{ ragged-right=##t }
<<
\new Staff { \new Voice = "dirge" { c''1 } }
\lyricsto "dirge" \new Lyrics { Whoops }
% {}    % <-- \tag provokes syntax error if this line is commented out
\tag #'harmony \new Staff { a'1 }

---

Thanks for your answer. Let me know if I'm still off the track.

This discussion should really be on -user, so I'm copying
it there.

OK, I see what you are trying to do.  The error is that
the order of the commands in the lyrics line is wrong,
and the \new Lyrics command should be followed by { .. }
just like \new Staff is.  Then it works fine, like this:

<<
\new Staff { \new Voice = "dirge" { c''1 } }
\new Lyrics { \lyricsto "dirge" { Whoops } }
\tag #'harmony \new Staff {a'1}


However, there is an easier way to include or exclude
the harmony, without using tags, like this:

harmony = { \new Staff {a'1} }
<<
\new Staff { \new Voice = "dirge" { c''1 } }
\lyricsto "dirge" \new Lyrics { Whoops }
%\harmony %uncomment to include harmony


Tags are usually used for short sections of music.

You might find section 3.3.2 Different editions
from one source in the most recent version of the
2.11 docs worth a read - it was recently rewritten.

Roman
Trevor





reply via email to

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