I have added your example to the Tips and Tricks document (i.e. to the input/test/ directory) in the CVS of the development version.
You can already find a number of examples in the Tips and Tricks section that involve defining new contexts. If you do a grep for "accepts" or "alias" in input/test/* or /input/regression/*, you will find them.
Also, I forgot to mention that the best place to learn more about these aspects is to read the engraver-init.ly. Of course, this is also briefly described in the manual, see http://lilypond.org/doc/v2.0/Documentation/user/out-www/lilypond/Defining-new-contexts.html#Defining and the other sections of same chapter.
/Mats
Ralph Little wrote:
Woooohoooo! That's just the ticket! Many thanks Mats!
I missed the meaning of \accepts in the doc and also that you could include existing contexts in a new context definition by mentioning it. I did try copying the ScoreContext definition from engraver-init.ly, which would have worked had it not been for the fact that I missed the \accepts for the ScoreContext. Also, you don't seem to need the StaffGroup context for this to work. It might cause me grief when I come to put the part into a score with other parts, but we'll see...
Here is the final example and is JUST what I'm after:
Han-Wen and Jan, would it be worth putting this in the Tips and Tricks section of the manual?
Lilypond just gets better and better!
Many thanks, Ralph
-----------------------8<-----------------------8<-----------------------8<- ---------
\score { \notes { \relative c' { \context Staff = One { c4 d e f } << {c d e f c d e f c c c c c c c c } \context SubStaff = Two { c4 d e f c d e f c c c c c c c c } >> c d e f } } \paper { \translator { \ScoreContext \consists Span_bar_engraver \remove System_start_delimiter_engraver \accepts "SubStaff" } \translator { \StaffContext \name "SubStaff" \alias "Staff" \remove "Clef_engraver" \remove "Time_signature_engraver" \remove "Key_engraver" } } }
-----------------------8<-----------------------8<-----------------------8<- ---------
---------- Our communications with you matter to us. This e-mail and any attachments
are confidential and are sent on the basis of our copyright, e-mail and
security policy which can be inspected by visiting
http://www.tribaldata.co.uk/contact_index.asp. and clicking on the print
friendly link. If you are not the intended recipient, please notify the
sender and delete this message. Thank you. ----------
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
-- ============================================= 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: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
