[icon]

GNU LilyPond

Welcome to the home of the GNU Music Typesetter

What is LilyPond
General information
Simple examples
Complex examples
Download
GNU/Linux binaries
Windows
Source code
Documentation
Tutorial
Manual
Glossary
other ...

Support
Mailing lists
Search
WikiWiki
FAQs

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

Node:Changing context definitions, Next:, Previous:Engravers and performers, Up:Interpretation context



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 type 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.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 lilypond@packages.debian.org

Copyright (c) 1997--2001 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.4.12 (stable-branch) by

Anthony Fok <lilypond@packages.debian.org>, Tue Mar 12 01:35:39 2002 HKT.