]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/changing-defaults.itely
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / Documentation / user / changing-defaults.itely
index 43bc836a69f08f53ff92471ea98304ea5a43da9a..c38bd2a2452da8640d62fc0d4ce0b5b514544cf7 100644 (file)
@@ -40,11 +40,11 @@ elements.  For example, changing the beaming rules.
 Output: changing the appearance of individual
 objects.  For example, changing stem directions or the location of
 subscripts.
-  
+
 @item
 Context: changing aspects of the translation from music events to
-notation.  For example, giving each staff a separate time signature. 
-  
+notation.  For example, giving each staff a separate time signature.
+
 @item
 Global layout: changing the appearance of the spacing, line
 breaks, and page dimensions.  These modifications are discussed
@@ -65,7 +65,7 @@ on entering numbers, lists, strings, and symbols in Scheme.}
 * The \override command::       
 @end menu
 
+
 @node Automatic notation
 @section Automatic notation
 
@@ -84,7 +84,7 @@ beams are automatically displayed.
 Common rules for typesetting accidentals have been placed in a
 function.  This function is called as follows
 
-@cindex @code{set-accidental-style}
+@findex set-accidental-style
 @example
 #(set-accidental-style 'STYLE #('CONTEXT#))
 @end example
@@ -132,7 +132,7 @@ used by one musician (e.g., a conductor) then
 should be used instead.
 
 @item modern
-@cindex @code{modern} style accidentals
+@findex modern style accidentals
 This rule corresponds to the common practice in the 20th century.  This rule
 prints the same accidentals as @code{default}, but temporary
 accidentals also are canceled in other octaves.  Furthermore,
@@ -145,7 +145,7 @@ cis' c'' cis'2 | c'' c'
 @end lilypond
 
 @item @code{modern-cautionary}
-@cindex @code{modern-cautionary}
+@findex modern-cautionary
 This rule is similar to @code{modern}, but the ``extra'' accidentals
 (the ones not typeset by @code{default}) are typeset as cautionary
 accidentals.  They are printed in reduced size or with parentheses
@@ -154,14 +154,14 @@ accidentals.  They are printed in reduced size or with parentheses
 cis' c'' cis'2 | c'' c'
 @end lilypond
 
-@cindex @code{modern-voice}
+@findex modern-voice
 @item modern-voice
 This rule is used for multivoice accidentals to be read both by musicians
 playing one voice and musicians playing all voices.  Accidentals are
 typeset for each voice, but they @emph{are} canceled across voices in
 the same @internalsref{Staff}.
 
-@cindex @code{modern-voice-cautionary}
+@findex modern-voice-cautionary
 @item modern-voice-cautionary
 This rule is the same as @code{modern-voice}, but with the extra
 accidentals (the ones not typeset by @code{voice}) typeset
@@ -170,19 +170,19 @@ as cautionaries.  Even though all accidentals typeset by
 some of them are typeset as cautionaries.
 
 @item piano
-@cindex @code{piano} accidentals
+@findex piano accidentals
 This rule reflects 20th century practice for piano notation.  Very similar to
 @code{modern} but accidentals also get canceled
 across the staves in the same @internalsref{GrandStaff} or
 @internalsref{PianoStaff}.
 
 @item piano-cautionary
-@cindex @code{#(set-accidental-style 'piano-cautionary)}
+@findex #(set-accidental-style 'piano-cautionary)
 Same as @code{#(set-accidental-style 'piano)} but with the extra
 accidentals typeset as cautionaries.
 
 @item no-reset
-@cindex @code{no-reset} accidental style
+@findex no-reset accidental style
 This is the same as @code{default} but with accidentals lasting
 ``forever'' and not only until the next measure
 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
@@ -224,9 +224,9 @@ problematic notes.
 @node Setting automatic beam behavior
 @subsection Setting automatic beam behavior
 
-@cindex @code{autoBeamSettings}
-@cindex @code{(end * * * *)}
-@cindex @code{(begin * * * *)}
+@findex autoBeamSettings
+@findex (end * * * *)
+@findex (begin * * * *)
 @cindex automatic beams, tuning
 @cindex tuning automatic beaming
 
@@ -258,7 +258,7 @@ have this apply to any beam.
 this rule should apply.  Set @code{n} and @code{m} to @code{'*'}
 to have this apply in any time signature.
 
-@item @code{a/b} is the position in the bar at which the beam should 
+@item @code{a/b} is the position in the bar at which the beam should
 begin/end.
 
 @item @code{context} is optional, and it specifies the context at which
@@ -357,7 +357,7 @@ In 4/4 time signature, this means that automatic beams could end only on
 
 @cindex automatic beam generation
 @cindex autobeam
-@cindex @code{autoBeaming}
+@findex autoBeaming
 @cindex lyrics
 
 If beams are used to indicate melismata in songs, then automatic
@@ -366,9 +366,9 @@ beaming should be switched off with @code{\autoBeamOff}.
 
 @refcommands
 
-@cindex @code{\autoBeamOff}
+@findex \autoBeamOff
 @code{\autoBeamOff},
-@cindex @code{\autoBeamOn}
+@findex \autoBeamOn
 @code{\autoBeamOn}.
 
 
@@ -424,7 +424,7 @@ example: a @context{Staff} can contain many @context{Voice}s, and a
 @context{Score} can contain many @context{Staff} contexts.
 
 @quotation
-@image{context-example,1600%,,eps}
+@image{context-example,5cm,,}
 @end quotation
 
 Each context has the responsibility for enforcing some notation rules,
@@ -453,7 +453,7 @@ reference, see
 @ifhtml
 @internalsref{Contexts}.
 @end ifhtml
-@ifnothtml 
+@ifnothtml
 Translation @arrow{} Context.
 @end ifnothtml
 
@@ -473,7 +473,7 @@ create them by hand.  There are three commands that do this.
 The easiest command is @code{\new}, and it also the quickest to type.
 It is prepended to a music expression, for example
 
-@cindex @code{\new}
+@findex \new
 @cindex new contexts
 @cindex Context, creating
 
@@ -487,7 +487,7 @@ where @var{type} is a context name (like @code{Staff} or
 interpreting the @var{music expression} with that.
 
 A practical application of @code{\new} is a score with many
-staves.  Each part that should be on its own staff, is preceded with 
+staves.  Each part that should be on its own staff, is preceded with
 @code{\new Staff}.
 
 @lilypond[quote,verbatim,relative=2,ragged-right,fragment]
@@ -506,7 +506,7 @@ However, this user specified name is only used if there is no other
 context already earlier with the same name.
 
 
-@cindex @code{\context}
+@findex \context
 
 @item
 Like @code{\new}, the @code{\context} command also directs a music
@@ -531,7 +531,7 @@ setting lyrics the melody is in a named context
 so the texts can be properly aligned to its notes,
 
 @example
-\new Lyrics \lyricsto "@b{tenor}" @var{lyrics} 
+\new Lyrics \lyricsto "@b{tenor}" @var{lyrics}
 @end example
 
 @noindent
@@ -585,15 +585,15 @@ several levels.  For example, the @code{\applyOutput} command (see
 @code{\context}, it is usually applied to @context{Voice}
 
 @example
-\applyOutput #@var{function}   % apply to Voice
+\applyOutput #'@var{context} #@var{function}   % apply to Voice
 @end example
 
 To have it interpreted at the @context{Score} or @context{Staff} level use
 these forms
 
 @example
-\context Score \applyOutput #@var{function}
-\context Staff \applyOutput #@var{function}
+\context \applyOutput #'Score #@var{function}
+\context \applyOutput #'Staff #@var{function}
 @end example
 
 @end itemize
@@ -603,7 +603,7 @@ these forms
 @subsection Changing context properties on the fly
 
 @cindex properties
-@cindex @code{\set}
+@findex \set
 @cindex changing properties
 
 Each context can have different @emph{properties}, variables contained
@@ -616,7 +616,7 @@ This is achieved by inserting the @code{\set} command in the music,
 
 For example,
 @lilypond[quote,verbatim,relative=2,fragment]
-R1*2 
+R1*2
 \set Score.skipBars = ##t
 R1*2
 @end lilypond
@@ -644,7 +644,7 @@ property (of the bottom-most context, in this case @code{Voice}) will
 have no effect.
 
 @lilypond[quote,verbatim,relative=2,fragment]
-R1*2 
+R1*2
 \set skipBars = ##t
 R1*2
 @end lilypond
@@ -655,7 +655,7 @@ example @context{Staff}, then the change would also apply to all
 `on-the-fly', during the music, so that the setting only affects the
 second group of eighth notes.
 
-@cindex @code{\unset} 
+@findex \unset
 
 There is also an @code{\unset} command,
 @example
@@ -691,9 +691,9 @@ Like @code{\set}, the @var{context} argument does not have to be
 specified for a bottom context, so the two statements
 
 @example
-\set Voice.autoBeaming = ##t 
-\set autoBeaming = ##t 
-@end example 
+\set Voice.autoBeaming = ##t
+\set autoBeaming = ##t
+@end example
 
 @noindent
 are equivalent.
@@ -733,7 +733,7 @@ elements.  For example, the @code{Voice} context contains a
 @code{Note_head_engraver} and the @code{Staff} context contains a
 @code{Key_signature_engraver}.
 
-For a full a description of each plug-in, see 
+For a full a description of each plug-in, see
 @ifhtml
 @internalsref{Engravers}.
 @end ifhtml
@@ -744,7 +744,7 @@ Every context described in
 @ifhtml
 @internalsref{Contexts}
 @end ifhtml
-@ifnothtml 
+@ifnothtml
 Program reference @arrow Translation @arrow{} Context.
 @end ifnothtml
 lists the engravers used for that context.
@@ -754,7 +754,7 @@ It can be useful to shuffle around these plug-ins.  This is done by
 starting a new context with @code{\new} or @code{\context}, and
 modifying it,
 
-@cindex @code{\with}
+@findex \with
 
 @example
 \new @var{context} \with @{
@@ -835,7 +835,7 @@ Each context is responsible for creating certain types of graphical
 objects.  The settings used for printing these objects are also stored by
 context.  By changing these settings, the appearance of objects can be
 altered.
+
 The syntax for this is
 
 @example
@@ -852,7 +852,7 @@ tweak} explains what to fill in for @var{name}, @var{property}, and
 The command
 
 @verbatim
-\override Staff.Stem #'thickness = #4.0 
+\override Staff.Stem #'thickness = #4.0
 @end verbatim
 
 @noindent
@@ -863,7 +863,7 @@ appearance.  Here we see the command in action:
 
 @lilypond[quote,verbatim,relative=2,fragment]
 c4
-\override Staff.Stem #'thickness = #4.0 
+\override Staff.Stem #'thickness = #4.0
 c4
 c4
 c4
@@ -875,13 +875,13 @@ all stems are thickened.
 
 Analogous to @code{\set}, the @var{context} argument may be left out,
 causing it to default to @context{Voice}, and adding @code{\once} applies
-the change during one timestep only 
+the change during one timestep only
 
 @lilypond[quote,fragment,verbatim,relative=2]
 c4
-\once \override Stem #'thickness = #4.0 
+\once \override Stem #'thickness = #4.0
+c4
 c4
-c4 
 @end lilypond
 
 The @code{\override} must be done before the object is
@@ -893,7 +893,7 @@ when the object is created.  In this example,
 \override Slur #'thickness = #3.0
 c8[( c
 \override Beam #'thickness = #0.6
-c8 c]) 
+c8 c])
 @end lilypond
 
 @noindent
@@ -962,7 +962,7 @@ from the music in the @code{\layout} block,
 @end example
 
 Here @code{\Staff} takes the existing definition for context @context{Staff} from the
-identifier @code{\Staff}. 
+identifier @code{\Staff}.
 
 The statements
 @example
@@ -1039,9 +1039,9 @@ to indicate improvisation in jazz pieces,
 }}
 
 \relative c'' {
-  a4 d8 bes8 \new ImproVoice { c4^"ad lib" c 
-   c4 c^"undress" c_"while playing :)" c } 
-  a1 
+  a4 d8 bes8 \new ImproVoice { c4^"ad lib" c
+   c4 c^"undress" c_"while playing :)" c }
+  a1
 }
 @end lilypond
 
@@ -1125,7 +1125,7 @@ Put together, we get
 @}
 @end example
 
-@cindex @code{\accepts}
+@findex \accepts
 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}
@@ -1134,11 +1134,11 @@ command,
 @example
 \context @{
   \Staff
-  \accepts ImproVoice    
+  \accepts ImproVoice
 @}
 @end example
 
-@cindex @code{\denies}
+@findex \denies
 The opposite of @code{\accepts} is @code{\denies},
 which is sometimes needed when reusing existing context definitions.
 
@@ -1163,16 +1163,16 @@ Then the output at the start of this subsection can be entered as
 \relative c'' @{
   a4 d8 bes8
   \new ImproVoice @{
-    c4^"ad lib" c 
+    c4^"ad lib" c
     c4 c^"undress"
     c c_"while playing :)"
   @}
   a1
 @}
 @end example
-  
 
-    
+
+
 
 @node The \override command
 @section The \override command
@@ -1211,7 +1211,7 @@ This means that we must determine these bits of information:
 @item the layout object: here @code{Stem}.
 @item the layout property: here @code{thickness}.
 @item a sensible value: here @code{3.0}.
-@end itemize  
+@end itemize
 
 Some tweakable options are called ``subproperties'' and reside inside
 properties.  To tweak those, use commands in the form
@@ -1222,9 +1222,9 @@ properties.  To tweak those, use commands in the form
 
 @cindex internal documentation
 @cindex finding graphical objects
-@cindex graphical object descriptions 
+@cindex graphical object descriptions
 @cindex tweaking
-@cindex @code{\override}
+@findex \override
 @cindex internal documentation
 
 We demonstrate how to glean this information from the notation manual
@@ -1265,7 +1265,7 @@ forward.  For example, it says
 
 @quotation
 Accepted by: @internalsref{Fingering_engraver},
-@end quotation 
+@end quotation
 
 @noindent
 That link brings us to the documentation for the Engraver, the
@@ -1306,14 +1306,14 @@ flow of information within the program, following links like this:
 
 @item @internalsref{Fingering}:
 @internalsref{Fingering} objects are created by:
-@b{@internalsref{Fingering_engraver}}
+@internalsref{Fingering_engraver}
 
 @item @internalsref{Fingering_engraver}:
-Music types accepted: @b{@internalsref{fingering-event}}
+Music types accepted: @internalsref{fingering-event}
 
 @item @internalsref{fingering-event}:
 Music event type @code{fingering-event} is in Music expressions named
-@b{@internalsref{FingerEvent}}
+@internalsref{FingerEvent}
 @end itemize
 
 This path goes against the flow of information in the program: it
@@ -1333,7 +1333,7 @@ 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
 
@@ -1353,7 +1353,7 @@ The page for @code{Fingering} lists the definitions for the
 
 @quotation
 @code{padding} (dimension, in staff space):
-  
+
 @code{0.5}
 @end quotation
 
@@ -1442,7 +1442,7 @@ 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 
+Recall that we wanted to change the position of the @b{2} in
 
 @lilypond[quote,fragment,relative=2,verbatim]
 c-2
@@ -1452,7 +1452,7 @@ f
 
 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 using @code{side-position-interface}.  The page for this interface 
+done using @code{side-position-interface}.  The page for this interface
 says
 
 @quotation
@@ -1472,7 +1472,7 @@ 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. 
+Add this much extra space between objects that are next to each other.
 @end table
 @end quotation
 
@@ -1500,14 +1500,14 @@ fact can also be deduced from the program reference, for the page for
 the @internalsref{Fingering_engraver} plug-in says
 
 @quotation
-Fingering_engraver is part of contexts: @dots{} @b{@internalsref{Voice}}
+Fingering_engraver is part of contexts: @dots{} @internalsref{Voice}
 @end quotation
 
 
 @node Objects connected to the input
 @subsection Objects connected to the input
 
-@cindex @code{\tweak}
+@findex \tweak
 
 In some cases, it is possible to take a short-cut for tuning graphical
 objects. For objects that result directly from a piece of the input,
@@ -1519,7 +1519,7 @@ you can use the @code{\tweak} function, for example
   \tweak #'color #red d
   g
   \tweak #'duration-log #1  a
->4-\tweak #'padding #10 -. 
+>4-\tweak #'padding #10 -.
 @end lilypond
 
 As you can see, properties are set directly in the objects directly,
@@ -1562,7 +1562,7 @@ Contexts can have properties, which are usually named in
 @code{studlyCaps}.  They mostly control the translation from
 music to notatino, eg. @code{localKeySignature} (for determining
 whether to print accidentals), @code{measurePosition} (for
-determining when to print a barline).  Context properties can 
+determining when to print a barline).  Context properties can
 change value over time while interpreting a piece of music;
 @code{measurePosition} is an obvious example of
 this.  Context properties are modified with @code{\set}.
@@ -1605,7 +1605,7 @@ property (modified with @code{\set}) was created.
 @node Difficult tweaks
 @subsection Difficult tweaks
 
-There are a few classes of difficult adjustments.  
+There are a few classes of difficult adjustments.
 
 @itemize @bullet
 
@@ -1629,7 +1629,7 @@ objects have been split over different systems.
 
 In the following example, we define a procedure
 @code{my-callback}.  This procedure
+
 @itemize @bullet
 @item
 determines if we have been split across line breaks
@@ -1647,7 +1647,7 @@ of the broken tie is translated up.
 @lilypond[quote,verbatim,ragged-right]
 #(define (my-callback grob)
   (let* (
-         ; have we been split? 
+         ; have we been split?
          (orig (ly:grob-original grob))
 
          ; if yes, get the split pieces (our siblings)
@@ -1658,7 +1658,7 @@ of the broken tie is translated up.
              (eq? (car (last-pair siblings)) grob))
      (ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))
 
-\relative c'' { 
+\relative c'' {
   \override Tie #'after-line-breaking =
   #my-callback
   c1 ~ \break c2 ~ c
@@ -1678,10 +1678,10 @@ and @code{PaperColumn}.  They can be changed with the
 @code{\outputProperty} function, which works similar to @code{\once
 \override}, but uses a different syntax,
 
-@example 
+@example
 \outputProperty
 #"Score.NonMusicalPaperColumn"  % Grob name
-#'line-break-system-details     % Property name  
+#'line-break-system-details     % Property name
 #'((next-padding . 20))         % Value
 @end example