[Top][All Lists]

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

Re: adding \lyricmode to \lyricsto triggers an error

From: David Kastrup
Subject: Re: adding \lyricmode to \lyricsto triggers an error
Date: Mon, 17 Feb 2014 05:16:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eluze <address@hidden> writes:

> \version "2.18.0"
> % this doesn't work since 2.19.2
> <<
>   \new Voice=A \relative c'{ c d e f g a }
>   \new Lyrics \lyricsto A \lyricmode { ahh b c d e f }
> the doc says: *The lyrics themselves follow the \lyricsto command. The
> \lyricsto command invokes lyric mode automatically, so the \lyricmode
> keyword may be omitted."

In this case, the documentation is wrong with "may be".  This has become
"must".  It is worth mentioning that convert-ly catches this usage and
removes \lyricmode.

> and indeed, omitting \lyricmode works and also putting braces after
> /\lyricsto A/ works - but I don't think this is an improvement in
> user-friendliness...

Yes and no.  The thing is that mode changing commands (\lyricmode,
\chordmode, \notemode ...) usually only accept an argument delimited
with either { } or << >>.  \lyricsto is another such mode changing
command.  Accepting arbitrary music here leads to problems since
arbitrary music often requires lookahead to figure out whether it
already ended, and lookahead scanned in the wrong mode is troublesome.

See <URL:http://code.google.com/p/lilypond/issues/detail?id=3815> for
the related issue also describing one actual bug caused by the previous

It also turns out, looking even at the LilyPond code base itself, that
there was not much of a clue how to use \lyricsto consistently, leading
to different music expressions, and consequently to possible differences
in behavior.

Making \lyricsto predictably similar to \lyricmode will hopefully help
to clear some of the confusion.

The documentation you quote definitely needs to get fixed, though.
While "this used to work" is somewhat catered for by convert-ly rules,
it is not the full Monty.

David Kastrup

reply via email to

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