Do you want both the default ChoirStaff and the BraceStaff in the same
score (or in the same .ly file)? Otherwise, the easiest solution is just to
redefine the ChoirStaff context in the files where you want the brace
instead of the bracket:
\layout{
\context{
\ChoirStaff
systemStartDelimiter = #'SystemStartBrace
}
}
Otherwise, I think you only included your new context type halfway into the
context hieararchy. You also have to tell which contexts are accepted
within
your new context.
Actually, instead of creating a new context from scratch, as you have
attempted to do, it's often easier to use an existing context type as a
starting point, for example
\layout{
\context {
\GrandStaff
\name "BraceStaff"
\alias "ChoirStaff"
\remove Span_bar_engraver
}
\context {
\Score
\accepts "BraceStaff"
}
}
(The default definition of ChoirStaff is a bit complicated, since there's an
extra context type InnerChoirStaff involved, for some technical reasons, so
it's a bit harder to use that as a starting point.) If you haven't
already looked
in the file ly/engraver-init.ly, I recommend you to do so. It's the best
way to
understand how these things really work.
/Mats
John Zaitseff wrote:
Dear LilyPonders,
Mats wrote:
The question is: how do I define a BraceStaff that is exactly like a
ChoirStaff, except that braces are used instead of brackets at the
start of systems? In particular, I tried to define the following in my
stylesheet (which gets included into all my documents):
\layout {
\context {
\type "Engraver_group"
\name "BraceStaff"
\alias "ChoirStaff"
% [...]
\consists "System_start_delimiter_engraver"
systemStartDelimiter = #'SystemStartBrace
}
}
It seems that you forgot to include your new context into the context
hieararchy, see section "Defining new contexts" in the manual for
instructions on how to do that using the \accepts keyword.
Oops! I've redefined it as:
\layout {
\context {
\name "BraceStaff"
\type "Engraver_group"
\alias "ChoirStaff"
\consists "System_start_delimiter_engraver"
systemStartDelimiter = #'SystemStartBrace
}
\context {
\Score
\accepts "BraceStaff"
}
}
LilyPond now finds the definition correctly, but it still doesn't use
SystemStartBrace. My main \score block is of the form:
\score {
\new BraceStaff <<
\new Staff = "upper" <<
% [...]
>>
\new Staff = "lower" <<
% [...]
>>
>>
\layout {
}
}
If I replace "BraceStaff" with "ChoirStaff \with { systemStartDelimiter =
#'SystemStartBrace }", it all just works. And putting the line containing
"\alias" to end of the context doesn't help.
What am I doing wrong? I can't help but think it must be fairly simple...
Thanks in advance!
Yours truly,
John Zaitseff
--
=============================================
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=============================================
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user