[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The exact semantics of the new \new command?
From: |
Mats Bengtsson |
Subject: |
The exact semantics of the new \new command? |
Date: |
Sun, 23 Apr 2006 11:50:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 |
Hi,
What, exactly, is the semantics of the \new <context> = <name> ...
syntax? As far as I understood the discussion leading to this
syntax, it should be equivalent to
\context <context> = <name>
if that context wasn't already created and it should
issue a warning if the context already existed.
As the following example shows (and the last example in
"More Stanzas", for example), what really happens is equivalent
to \new <context>, i.e. you get a new instance of the context
with some anonymous name. Also, no warning is issued.
\version "2.8.0"
\relative <<
\new Staff = FIRST \new Voice { c1^"in FIRST" }
% Should at least issue a warning:
\new Staff = FIRST \new Voice { e1 e^"2nd incarnation of FIRST" }
% Which of the above two will this one end up in?:
\context Staff = FIRST \new Voice { g1 g g^"back in FIRST" }
>>
It seems that whoever updated the examples such as the
last example in "More Stanzas" rather had the impression
that
\new <context> = <name> ...
will always be equivalent to
\context <context> = <name> ...
which clearly isn't the case, so this is a problem both
in the implementation and the documentation and example
files.
/Mats
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================
- The exact semantics of the new \new command?,
Mats Bengtsson <=