[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

External sites
lilypond.org/stable
lilypond.org/development
savannah.gnu.org
ftp.lilypond.org
Mutopia
Other music online

Changing context definitions

The most common way to define a context is by extending an existing context. You can change an existing context from the paper block by first initializing a translator with an existing context identifier:

     \paper {
       \translator {
         context-identifier
       }
     }
     

Then you can add and remove engravers using the following syntax:

     \remove engravername
     \consists engravername
     

Here engravername is a string, the name of an engraver in the system.

     \score {
       \notes {
         c'4 c'4
       }
       \paper {
         \translator {
           \StaffContext
           \remove Clef_engraver
         }
       }
     }
     
[picture of music]

You can also set properties in a translator definition. The syntax is as follows:

     propname = value
     propname \set grob-propname = pvalue
     propname \override grob-propname = pvalue
     propname \revert grob-propname
     

propname is a string, grob-propname a symbol, value and pvalue are Scheme expressions. These types of property assignments happen before interpretation starts, so a \property command will override any predefined settings.

To simplify editing translators, all standard contexts have standard identifiers called nameContext, e.g. StaffContext, VoiceContext; see ly/engraver-init.ly.

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to (address unknown)

Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.7.14 (development-branch) by

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.