]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/changing-defaults.itely
* lily/main.cc (main_with_guile): switch debugging.
[lilypond.git] / Documentation / user / changing-defaults.itely
index 7940601ef3dde9788a6a0abcc9dada9e3e3f589c..861c9856a48baaa9b80350ed97e4dc095bce49b4 100644 (file)
@@ -8,16 +8,17 @@ quality as a default. Nevertheless, it may happen that you need to
 change that default layout.  The layout is controlled through a large
 number of proverbial ``knobs and switches.''  This chapter does not
 list each and every knob. Rather, it outlines what groups of controls
-are available, and how to tune them.
+are available, and it explains how to lookup which knob to use for a
+certain effect.
 
-Which controls are available for tuning is described in a separate
+The controls are available for tuning are described in a separate
 document, the @internalsref{Program reference} manual. This manual
 lists all different variables, functions and options available in
 LilyPond. It is available as a HTML document, which is available
 @uref{http://lilypond.org/doc/Documentation/user/out-www/lilypond-internals/,on-line},
 but is also included with the LilyPond documentation package.
 
-There are X areas where the default settings may be changed:
+There are three areas where the default settings may be changed:
 
 @itemize @bullet
 @item Output: changing the appearance of individual
@@ -49,7 +50,6 @@ entering numbers, lists, strings and symbols in Scheme.
 * Fonts::                       
 * Text markup::                 
 * Global layout::               
-* Font Size::                   
 * Output details::              
 @end menu
 
@@ -262,20 +262,22 @@ reference, see
 Translation @arrow{} Context.
 @end ifnothtml
 
+[TODO: describe propagation]
+
+
 @menu
 * Creating contexts::           
 * Changing context properties on the fly ::  
 * Modifying context plug-ins::  
 * Layout tunings within contexts::  
-* Defining context defaults ::  
+* Changing context default settings::  
+* Defining new  contexts::      
 * Which properties to change::  
 @end menu
 
 @node Creating contexts
 @subsection Creating contexts
 
-[TODO: propagation]
-
 For scores with only one voice and one staff, correct contexts are
 created automatically. For more complex scores, it is necessary to
 instantiate them by hand.  There are three commands to do this.
@@ -662,24 +664,227 @@ Cyclic references in Scheme values for properties can cause hangs
 and/or crashes.
 
 
-@node Defining context defaults 
-@subsection Defining context defaults
+@node Changing context default settings
+@subsection Changing context default settings
+
+The adjustments of the previous chapters can also be entered separate
+from the music, in the @code{\paper} block,
+
+@example
+  \paper @{
+     @dots{}
+     \context @{
+        \StaffContext
+
+        \set fontSize = #-2
+        \override Stem #'thickness
+        \remove "Time_signature_engraver"
+      @}
+   @}
+@end example
+
+This
+@example
+  \StaffContext
+@end example
+
+@noindent
+takes the existing definition @context{Staff} from the identifier
+@code{StaffContext}. This works analogously other contexts, so the
+existing definition  of @code{Voice} is in 
+@code{\VoiceContext}.
+
+The statements
+@example
+        \set fontSize = #-2
+        \override Stem #'thickness
+        \remove "Time_signature_engraver"
+@end example
+
+@noindent
+affect all staves in the score.
+
+The @code{\set} keyword is optional within the @code{\paper} block, so
+
+@example
+  fontSize = #-2
+@end example
+
+@noindent
+will also work.
+
+
+
+@refbugs
+
+It is not possible to collect changes in a variable, and apply them to
+one @code{\context} definition by referencing that variable.
+
+
+@node Defining new  contexts
+@subsection Defining new  contexts
+
+Specific contexts, like @context{Staff} and @code{Voice} are made of
+simple building blocks, and it is possible to compose engraver
+plug-ins in different combinations, thereby creating new types of
+contexts.
+
+The next example shows how to build a different type of
+@context{Voice} context from scratch.  It will be similar to
+@code{Voice}, but print centered slash noteheads only. It can be used
+to indicate improvisation in Jazz pieces,
+
+@lilypond[raggedright]
+  \paper { \context {
+    \name ImproVoice
+    \type "Engraver_group_engraver"
+    \consists "Note_heads_engraver"
+    \consists "Text_engraver"
+    \consists Pitch_squash_engraver
+    squashedPosition = #0
+    \override NoteHead #'style = #'slash
+    \override Stem #'transparent = ##t
+    \alias Voice
+  }
+  \context { \StaffContext
+    \accepts "ImproVoice"
+  }}
+  \score { \notes \relative c'' {
+    a4 d8 bes8 \new ImproVoice { c4^"ad lib" c 
+     c4 c^"undress" c_"while playing :)" c } 
+    a1 
+  }}
+@end lilypond
+
+
+These settings are again done within a @code{\context} block inside a
+@code{\paper} block,
+
+@example
+  \paper @{
+    \context @{
+      @dots{}
+    @}
+  @}
+@end example
+
+In the following discussion, the example input shown should go on the
+@dots{} of the previous fragment.
 
-Context properties can be set as defaults, within the
-@code{\paper} block. For example, 
+First, name the context gets a name. Instead of @context{Voice} it
+will be called @context{ImproVoice},
+
+@verbatim
+  \name ImproVoice
+@end verbatim
+
+Since it is similar to the @context{Voice}, we want commands that work
+on (existing) @context{Voice}s to remain working. This is achieved by
+giving the new context an alias @context{Voice},
+
+@verbatim
+  \alias Voice
+@end verbatim
+
+The context will print notes, and instructive texts
+
+@verbatim
+  \consists Note_heads_engraver
+  \consists Text_engraver
+@end verbatim
+
+but only on the center line,
+
+@verbatim
+  \consists Pitch_squash_engraver
+  squashedPosition = #0
+@end verbatim
+
+The @internalsref{Pitch_squash_engraver} modifies note heads (created
+by @internalsref{Note_heads_engraver}) and sets their vertical
+position to the value of @code{squashedPosition}, in this case
+@code{0}, the center line.
+
+The notes look like a  slash, without a stem,
+
+@verbatim
+    \override NoteHead #'style = #'slash
+    \override Stem #'transparent = ##t
+@end verbatim
+
+
+All these plug-ins have to cooperate, and this is achieved with a
+special plug-in, which must be marked with the keyword @code{\type}.
+This should always be @internalsref{Engraver_group_engraver},
+
+@example
+ \type "Engraver_group_engraver"
+@end example
+
+Put together, we get
 
 @verbatim
-\paper {
   \context {
-    \ScoreContext
-    skipBars = ##t
+    \name ImproVoice
+    \type "Engraver_group_engraver"
+    \consists "Note_heads_engraver"
+    \consists "Text_script_engraver"
+    \consists Pitch_squash_engraver
+    squashedPosition = #0
+    \override NoteHead #'style = #'slash
+    \override Stem #'transparent = ##t
+    \alias Voice
   }
-}
 @end verbatim
 
-@noindent
-will set skipBars default 
+Contexts form hierarchies. We want to hang the @context{ImproVoice}
+under @context{Staff}, just like normal @code{Voice}s. Therefore, we
+modify the @code{Staff} definition with the @code{\accepts}
+command,@footnote{The opposite of @code{\accepts} is @code{\denies},
+which is sometimes when reusing existing context definitions. }
+
+
+
+@verbatim
+  \context {
+    \StaffContext
+    \accepts ImproVoice    
+  }
+@end verbatim 
+
+Putting both into a @code{\paper} block, like
+
+@example
+  \paper @{
+    \context @{
+      \name ImproVoice
+      @dots{}
+    @}
+  \context @{
+    \StaffContext
+    \accepts "ImproVoice"
+  @}
+@}
+@end example
+
+Then the output at the start of this subsection can be entered as
+
+@verbatim
+\score {
+  \notes \relative c'' {
+     a4 d8 bes8
+     \new ImproVoice {
+       c4^"ad lib" c 
+       c4 c^"undress"
+       c c_"while playing :)"
+     }
+     a1 
+  }
+}
+@end verbatim
+  
 
+    
 @node Which properties to change
 @subsection Which properties to change
 
@@ -700,8 +905,21 @@ examples.
 @node Tuning output
 @section Tuning output
 
+In the previous section, we have already touched on a command that
+changes layout details, the @code{\override} command. In this section,
+we will look at in more detail how to use the command in practice.
+First, we will give a a few versatile commands, which are sufficient
+for many situations. The next section will discuss general use of
+@code{\override}.
+
 
 
+-nmost adjustments simply
+
+
+
+The commands changes 
+
 
 There are situations where default layout decisions are not
 sufficient.  In this section we discuss ways to override these
@@ -738,6 +956,9 @@ layout property name:
 @menu
 * Common tweaks::               
 * Constructing a tweak::        
+* Navigating the program reference::  
+* Layout interfaces::           
+* Determining the grob property::  
 @end menu
 
 
@@ -829,6 +1050,23 @@ discusses in depth how to figure out these statements for yourself.
 @node Constructing a tweak
 @subsection Constructing a tweak
 
+The general procedure of changing output, that is, entering
+a command like
+
+@example
+        \override Voice.Stem #'thickness = #3.0
+@end example
+
+@noindent
+means that we have to determine these bits of information:
+
+@itemize
+@item The context, here: @context{Voice}.
+@item The layout object, here @code{Stem}.
+@item The layout property, here @code{thickness}
+@item A sensible value, here @code{3.0}
+@end itemize  
+
 
 @cindex internal documentation
 @cindex finding graphical objects
@@ -838,26 +1076,27 @@ discusses in depth how to figure out these statements for yourself.
 @cindex @code{\set}
 @cindex internal documentation
 
+We demonstrate how to glean this information from the notation manual
+and the program reference.
 
+The program reference is a set of HTML pages, which is part of the
+documentation package. On Unix systems, it is is typically in
+@file{/usr/share/doc/lilypond}, if you have them, it is best to
+bookmark them in your webbrowser, because you will need them.  They
+are also available on the web: go to the
+@uref{http://lilypond.org,LilyPond website}, click ``Documentation'',
+select the correct version, and then click ``Program reference.''
 
-Three pieces of information are required to use @code{\override} and
-@code{\set}: the name of the layout object, the context and the name
-of the property.  We demonstrate how to glean this information from
-the notation manual and the program reference.
-
-The generated documentation is a set of HTML pages which should be
-included if you installed a binary distribution, typically in
-@file{/usr/share/doc/lilypond}.  They are also available on the web:
-go to the @uref{http://lilypond.org,LilyPond website}, click
-``Documentation'', select the correct version, and then click
-``Program reference.'' It is advisable to bookmark the local HTML
-files. They will load faster than the ones on the web and matches the
-version of LilyPond you are using.
+If you have them, use the local HTML files.  They will load faster,
+and they are exactly matched to LilyPond version installed.
  
 
 
 @c  [TODO: revise for new site.]
 
+@node Navigating the program reference
+@subsection Navigating the program reference
+
 Suppose we want to move the fingering indication in the fragment
 below:
 
@@ -873,47 +1112,171 @@ instructions}), you will notice that there is written:
 @quotation
 @seealso
 
-Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
+Program reference: @internalsref{FingerEvent} and @internalsref{Fingering}.
 
 @end quotation
 
-@separate
+This  fragments points to two parts of the program reference: a page
+on @code{FingerEvent} and @code{Fingering}.
+
+The page on  @code{FingerEvent} describes the properties of the  music
+expression for the input @code{-2}. The page contains many links
+forward.  For example, it says
+
+@quotation
+  Accepted by: @internalsref{Fingering_engraver},
+@end quotation 
 
 @noindent
-In other words, the fingerings once entered, are internally stored as
-@code{FingerEvent} music objects. When printed, a @code{Fingering}
-layout object is created for every @code{FingerEvent}.
+That link brings us to the documentation for the Engraver, the
+plug-in, which says
+
+@quotation
+  This engraver creates the following layout objects: @internalsref{Fingering}.
+@end quotation
+
+In other words, once the @code{FingerEvent}s are interpreted, the
+@code{Fingering_engraver} plug-in will process them.
+The @code{Fingering_engraver} is also listed to create
+@internalsref{Fingering} objects,
+
+
+  Lo and behold, that is also the
+second bit of information listed under @b{See also} in the Notation
+manual. By clicking around in the program reference, we can follow the
+flow of information within the program, either forward (like we did
+here), or backwards, following links like this:
+
+@itemize @bullet
 
-The Fingering object has a number of different functions, and each of
-those is captured in an interface. The interfaces are listed under
-@internalsref{Fingering} in the program reference.
+@item @internalsref{Fingering}:
+  @internalsref{Fingering} objects are created by:
+  @b{@internalsref{Fingering_engraver}}
 
+@item @internalsref{Fingering_engraver}:
+Music types accepted: @b{@internalsref{fingering-event}}
+@item @internalsref{fingering-event}:
+Music event type @code{fingering-event} is in Music objects of type
+@b{@internalsref{FingerEvent}}
+@end itemize
+
+This path goes against the flow of information in the program: it
+starts from the output, and ends at the input event.
+
+The program reference can also be browsed like a normal document.  It
+contains a chapter on @internalsref{Music definitions}, on
+@internalsref{Translation}, and the @internalsref{Backend}. Every
+ chapter lists all the definitions used, and all properties that may
+ be tuned. 
 
+@node Layout interfaces
+@subsection Layout interfaces
 
-The @code{Fingering} object has a fixed size
-(@internalsref{item-interface}), the symbol is a piece of text
-(@internalsref{text-interface}), whose font can be set
-(@internalsref{font-interface}).  It is centered horizontally
-(@internalsref{self-alignment-interface}), it is placed vertically
-next to other objects (@internalsref{side-position-interface}), and
-its placement is coordinated with other scripts
-(@internalsref{text-script-interface}).  It also has the standard
-@internalsref{grob-interface} (grob stands for Graphical object)
+@internalsref{Fingering} is a layout object. Such an object is a
+symbol within the score. It has properties, which store numbers (like
+thicknesses and directions), but also pointers to related objects.
+A layout object is also called @emph{grob},
 @cindex grob
-@cindex graphical object
-@cindex layout object
-@cindex object, layout 
-with all the variables that come with
-it.  Finally, it denotes a fingering instruction, so it has
-@internalsref{finger-interface}.
-
-For the vertical placement, we have to look under
-@code{side-position-interface}:
+which is short for Graphical Object.
+
+
+The page for @code{Fingering} lists the definitions for the
+@code{Fingering} object. For example, the page says
+
+@quotation
+  @code{padding} (dimension, in staff space):
+  
+  @code{0.6}
+@end quotation
+
+which means that the number will be kept at a distance of at least 0.6
+of the note head.
+
+
+Each layout object may have several functions as a notational or
+typographical element. For example, the Fingering object
+has the following aspects
+
+@itemize @bullet
+@item Its size is independent of the horizontal spacing, unlike slurs or beams
+
+@item It is a piece of text. Granted, it's usually  a very short text.
+
+@item That piece of text is set in a font, unlike slurs or beams.
+@item Horizontally, the center of the symbol should be aligned to the
+center of the notehead
+@item Vertically, the symbol is placed next to the note and the staff.
+
+@item The
+ vertical position is also coordinated with other super and subscript
+symbols
+@end itemize
+
+Each of these aspects is captured in a so-called @emph{interface},
+which are listed on the @internalsref{Fingering} page at the bottom
+
+@quotation
+This object supports the following interfaces:
+@internalsref{item-interface},
+@internalsref{self-alignment-interface},
+@internalsref{side-position-interface}, @internalsref{text-interface},
+@internalsref{text-script-interface}, @internalsref{font-interface},
+@internalsref{finger-interface} and @internalsref{grob-interface}
+@end quotation
+
+Clicking any of the links will take you to the page of the respective
+object interface.  Each interface has a number of properties.  Some of
+them are not user-serviceable (``Internal properties''), but others
+are.
+
+We have been talking of `the' @code{Fingering} object, but actually it
+does  not amount to much. The initialization file
+@file{scm/define-grobs.scm} shows the soul of the `object',
+
+@verbatim
+   (Fingering
+     . (
+       (print-function . ,Text_item::print)
+       (padding . 0.6)
+       (staff-padding . 0.6)
+       (self-alignment-X . 0)
+       (self-alignment-Y . 0)
+       (script-priority . 100)
+       (font-encoding . number)
+       (font-size . -5)
+       (meta . ((interfaces . (finger-interface font-interface
+               text-script-interface text-interface
+               side-position-interface self-alignment-interface
+               item-interface))))
+  ))
+@end verbatim
+
+as you can see, @code{Fingering} is nothing more than a bunch of
+variable settings, and the webpage is directly generated from this
+definition.
+
+@node Determining the grob property
+@subsection Determining the grob property
+
+
+Recall that we wanted to change the position of the @b{2} in 
+
+@lilypond[relative=2,verbatim]
+c-2
+\stemUp
+f
+@end lilypond
+
+Since the @b{2} is vertically positioned next to its note, we have to
+meddle with the interface associated with this positioning. This is
+done by @code{side-position-interface}. The page for this interface says
+
 @quotation
 @code{side-position-interface}
 
   Position a victim object (this one) next to other objects (the
-  support).  In this case, the property @code{direction} signifies where to put the
+  support).  The property @code{direction} signifies where to put the
   victim object relative to the support (left or right, up or down?)
 @end quotation
 
@@ -925,8 +1288,8 @@ below this description, the variable @code{padding} is described as
 @item padding
  (dimension, in staff space)
 
  add this much extra space between objects that are next to each
-other. Default value: @code{0.6}
+ add this much extra space between objects that are next to each
+  other. 
 @end table
 @end quotation
 
@@ -934,7 +1297,7 @@ By increasing the value of @code{padding}, we can move away the
 fingering.  The following command inserts 3 staff spaces of white
 between the note and the fingering:
 @example
-\once \override Fingering   #'padding = #3
+\once \override Fingering #'padding = #3
 @end example
 
 Inserting this command before the Fingering object is created,
@@ -948,35 +1311,16 @@ c-2
 f
 @end lilypond
 
-The context name @code{Voice} in the example above can be determined
-as follows. In the documentation for @internalsref{Fingering}, it says
-@quotation
-Fingering grobs are created by: @internalsref{Fingering_engraver} @c
-@end quotation
 
-Clicking @code{Fingering_engraver} shows the documentation of
-the module responsible for interpreting the fingering instructions and
-translating them to a @code{Fingering} object.  Such a module is called
-an @emph{engraver}.  The documentation of the @code{Fingering_engraver}
-says
-@example
-Fingering_engraver is part of contexts: Voice 
-@end example
-so tuning the settings for Fingering should be done with
-@example
-  \override Fingering @dots{}
-@end example
-
-Of course, the tweak may also done in a larger context than
-@code{Voice}, for example, @internalsref{Staff} or
-@internalsref{Score}.
+In this case, the context for this tweak is @context{Voice}, which
+does not have to be specified for @code{\override}.  This fact can
+also be deduced from the program reference, for the page for the
+@internalsref{Fingering_engraver} plug-in says
 
-@seealso
+@quotation
+  Fingering_engraver is part of contexts: @dots{} @b{@internalsref{Voice}}
+@end quotation
 
-Internals: the program reference also contains alphabetical lists of
-@internalsref{Contexts}, @internalsref{All-layout-objects} and
-@internalsref{Music-expressions}, so you can also find which objects
-to tweak by browsing the internals document.
 
 @node Fonts
 @section Fonts
@@ -986,6 +1330,8 @@ to tweak by browsing the internals document.
 * Font selection::              
 @end menu
 
+
+
 @node Selecting font sizes
 @subsection Selecting font sizes
 
@@ -1245,11 +1591,102 @@ are chosen whenever the page gets full.
 
 
 @menu
+* Setting global staff size::   
 * Vertical spacing::            
 * Horizontal spacing::          
+* Line breaking::               
+* Page layout::                 
 @end menu
 
 
+@node Setting global staff size
+@subsection Setting global staff size
+
+@cindex font size, setting
+@cindex staff size, setting
+@cindex @code{paper} file
+
+The Feta font provides musical symbols at eight  different
+sizes. Each font is tuned for a different staff size: at smaller sizes
+the font gets heavier, to match the relatively heavier staff lines.
+The recommended font sizes are listed in the following table:
+
+@multitable @columnfractions  .25 .25 .25 .25
+
+@item @b{font name}
+@tab @b{staff height (pt)}
+@tab @b{staff height (mm)}
+@tab @b{use}
+
+@item feta11
+@tab 11.22
+@tab 3.9 
+@tab pocket scores
+
+@item feta13
+@tab 12.60
+@tab 4.4
+@tab
+
+@item feta14
+@tab 14.14
+@tab 5.0
+@tab 
+
+@item feta16
+@tab 15.87
+@tab 5.6
+@tab 
+
+@item feta18
+@tab 17.82
+@tab 6.3
+@tab song books
+
+@item feta20
+@tab 17.82
+@tab 7.0
+@tab standard parts 
+
+@item feta23
+@tab 22.45 
+@tab 7.9
+@tab 
+
+@item feta20
+@tab 25.2 
+@tab 8.9
+@tab
+@c modern rental material  ?
+
+@end multitable
+
+These fonts are available in any sizes. The context property
+@code{fontSize} and the layout property @code{staff-space} (in
+@internalsref{StaffSymbol}) can be used to tune size for individual
+staves. The size of individual staves are relative to the global size,
+which can be set   in the following manner:
+
+@example
+  #(set-global-staff-size 14)
+@end example
+
+This sets the global default size to 14pt staff height, and scales all
+fonts accordingly.
+
+@seealso
+
+This manual: @ref{Selecting font sizes}.
+
+
+
+@menu
+* Vertical spacing::            
+* Horizontal spacing::          
+* Line breaking::               
+* Page layout::                 
+@end menu
+
 @node Vertical spacing
 @subsection Vertical spacing
 
@@ -1417,91 +1854,9 @@ There is no convenient mechanism to manually override spacing.
 
 
 
-@node Font Size
-@section Font size
-
-@cindex font size, setting
-@cindex staff size, setting
-@cindex @code{paper} file
-
-The Feta font provides musical symbols at eight  different
-sizes. Each font is tuned for a different staff size: at smaller sizes
-the font gets heavier, to match the relatively heavier staff lines.
-The recommended font sizes are listed in the following table:
-
-@multitable @columnfractions  .25 .25 .25 .25
-
-@item @b{font name}
-@tab @b{staff height (pt)}
-@tab @b{staff height (mm)}
-@tab @b{use}
-
-@item feta11
-@tab 11.22
-@tab 3.9 
-@tab pocket scores
-
-@item feta13
-@tab 12.60
-@tab 4.4
-@tab
-
-@item feta14
-@tab 14.14
-@tab 5.0
-@tab 
-
-@item feta16
-@tab 15.87
-@tab 5.6
-@tab 
-
-@item feta18
-@tab 17.82
-@tab 6.3
-@tab song books
-
-@item feta20
-@tab 17.82
-@tab 7.0
-@tab standard parts 
-
-@item feta23
-@tab 22.45 
-@tab 7.9
-@tab 
-
-@item feta20
-@tab 25.2 
-@tab 8.9
-@tab
-@c modern rental material  ?
-
-@end multitable
-
-These fonts are available in any sizes. The context property
-@code{fontSize} and the layout property @code{staff-space} (in
-@internalsref{StaffSymbol}) can be used to tune size for individual
-staves. The size of individual staves are relative to the global size,
-which can be set   in the following manner:
-
-@example
-  #(set-global-staff-size 14)
-@end example
-
-This sets the global default size to 14pt staff height, and scales all
-fonts accordingly.
-
-@seealso
-
-This manual: @ref{Selecting font sizes}.
-
-
 @menu
 * Line breaking::               
 * Page layout::                 
-* Defining contexts::           
-* Defining new contexts::       
 @end menu
 
 @node Line breaking
@@ -1639,112 +1994,6 @@ reliably choose page breaks in longer pieces.
 
 
 
-@node Defining contexts
-@subsection Defining contexts
-
-@cindex context definition
-@cindex translator definition
-
-The most common way to create a new context definition is by extending
-an existing one.  An existing context from the paper block is copied
-by referencing a context identifier:
-
-@example
-\paper @{
-  \context @{
-    @var{context-identifier}
-  @}
-@}
-@end example
-
-@noindent
-Every predefined context has a standard identifier. For example, the
-@code{Staff} context can be referred to as @code{\StaffContext}.
-
-The context can then be modified by setting or changing properties,
-e.g.
-@example
-\context @{
-  \StaffContext
-  Stem \set #'thickness = #2.0
-  defaultBarType = #"||"
-@}
-@end example
-These assignments happen before interpretation starts, so a property
-command will override any predefined settings.
-
-@cindex engraver
-
-@refbugs
-
-It is not possible to collect multiple property assignments in a
-variable, and apply to one @code{\context} definition by
-referencing that variable.
-
-
-
-@node Defining new contexts
-@subsection Defining new contexts
-
-
-It is also possible to define new contexts from scratch.  To do this,
-you must define give the new context a name.  In the following
-example, a very simple Staff context is created: one that will put
-note heads on a staff symbol.
-
-@example
-\context @{
-  \type "Engraver_group_engraver"
-  \name "SimpleStaff"
-  \alias "Staff"
-  \consists "Staff_symbol_engraver"
-  \consists "Note_head_engraver"
-  \consistsend "Axis_group_engraver"
-@}
-@end example
-
-@noindent
-The argument of @code{\type} is the name for a special engraver that
-handles cooperation between simple engravers such as
-@code{Note_head_engraver} and @code{Staff_symbol_engraver}.  This
-should always be  @code{Engraver_group_engraver} (unless you are
-defining a Score context from scratch, in which case
-@code{Score_engraver}   must be used).
-
-The complete list of context  modifiers is the following:
-@itemize @bullet
-@item @code{\alias} @var{alternate-name}:
-This specifies a different name.  In the above example,
-@code{\set Staff.X = Y} will also work on @code{SimpleStaff}s.
-
-@item @code{\consistsend} @var{engravername}:
-Analogous to @code{\consists}, but makes sure that
-@var{engravername} is always added to the end of the list of
-engravers.
-
-Engravers that group context objects into axis groups or alignments
-need to be at the end of the list. @code{\consistsend} insures that
-engravers stay at the end even if a user adds or removes engravers.
-
-@item @code{\accepts} @var{contextname}:
-This context can contains @var{contextname} contexts.  The first
-@code{\accepts} is created as a default context when events (e.g. notes
-or rests) are encountered.
-
-@item @code{\denies}:
-The opposite of @code{\accepts}.
-
-@item @code{\name} @var{contextname}:
-This sets the type name of the context, e.g. @code{Staff},
-@code{Voice}.  If the name is not specified, the translator will not
-do anything.
-@end itemize
-
-@c EOF
-
-
-
-
 @node Output details
 @section Output details