bug-lilypond
[Top][All Lists]
Advanced

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

\context doesn't create requested context when it's aliased by another e


From: Valentin Villenave
Subject: \context doesn't create requested context when it's aliased by another existing context
Date: Wed, 13 Oct 2010 01:01:29 +0200

Just as a quick follow-up on this report by Eluze earlier this year (see below):
http://lists.gnu.org/archive/html/bug-lilypond/2010-04/msg00090.html

% Consider the following example.

\layout {
  \context {
    \Staff
    \alias "Staff"
    \name "AliasStaff"
  }
  \context {
    \Score
    \accepts "AliasStaff"
  }
}

% Here, two staves will be created (the expected behaviour)
<<
  \context Staff  c'1
  \context AliasStaff b1
>>

% Here only the first one is created:
<<
  \context AliasStaff c'1
  % The second is not, since it's aliased to the first one.
  \context Staff  b1
>>

%%

It is hardly an annoying bug (just use \new instead, and you're all
set), but nevertheless it *is* an inconsistency in the syntax. There
are numerous \aliased contexts, which can lead to unexpected behaviour
such as the one Eluze was encountering with TabStaff (see below).

IMHO, it deserves at least to be documented somewhere (for example in
NR 5.1.2 Creating contexts?).

About the syntax inconsistency, I'm opening
http://code.google.com/p/lilypond/issues/detail?id=1322 aka "\context
must die".

GLHF

On Sun, Apr 11, 2010 at 2:10 PM, -Eluze <address@hidden> wrote:
>
> hi
> i just stumbeled over this curiosity:
>
> \version "2.13.17"
> <<
>  \context TabStaff {e, e g b}
>  \context Staff    {\clef "G_8" e, e g b}
>>>
> http://old.nabble.com/file/p28208169/bug%2Btabvoice.png tabstaff & staff
>
> the normal staff is missing and the key of the tabstaff is not correct!
>
>
>
> % changing the order of the staffs works
> <<
>  \context Staff    {\clef "G_8" e, e g b}
>  \context TabStaff {e, e g b}
>>>
>
> % explicitly naming the contexts works also
> <<
>  \context TabStaff = "tab" {e, e g b}
>  \context Staff    = "notes" {\clef "G_8" e, e g b}
>>>



reply via email to

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