]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/tweaks.itely
lilypond-book robustness: ensure EOL at the end of @verbatim
[lilypond.git] / Documentation / user / tweaks.itely
index 44a977e173440a8273fa6d9046bc93d6430ba6a0..304fe5aa75dd4f5424f9d3347e0f5adb1f09881f 100644 (file)
@@ -7,7 +7,7 @@
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@c \version "2.11.51"
+@c \version "2.12.0"
 
 @node Tweaking output
 @chapter Tweaking output
@@ -17,22 +17,22 @@ configurable; virtually every fragment of output may be changed.
 
 
 @menu
-* Tweaking basics::             
-* The Internals Reference manual::  
-* Appearance of objects::       
-* Placement of objects::        
-* Collisions of objects::       
-* Further tweaking::            
+* Tweaking basics::
+* The Internals Reference manual::
+* Appearance of objects::
+* Placement of objects::
+* Collisions of objects::
+* Further tweaking::
 @end menu
 
 @node Tweaking basics
 @section Tweaking basics
 
 @menu
-* Introduction to tweaks::      
-* Objects and interfaces::      
-* Naming conventions of objects and properties::  
-* Tweaking methods::            
+* Introduction to tweaks::
+* Objects and interfaces::
+* Naming conventions of objects and properties::
+* Tweaking methods::
 @end menu
 
 @node Introduction to tweaks
@@ -40,16 +40,16 @@ configurable; virtually every fragment of output may be changed.
 
 @q{Tweaking} is a LilyPond term for the various methods available
 to the user for modifying the actions taken during interpretation
-of the input file and modifying the appearance of the printed 
-output.  Some tweaks are very easy to use; others are more 
-complex.  But taken together the methods available for tweaking 
-permit almost any desired appearance of the printed music to be 
+of the input file and modifying the appearance of the printed
+output.  Some tweaks are very easy to use; others are more
+complex.  But taken together the methods available for tweaking
+permit almost any desired appearance of the printed music to be
 achieved.
 
 In this section we cover the basic concepts required to understand
 tweaking.  Later we give a variety of ready-made commands which can
 simply be copied to obtain the same effect in your own scores, and
-at the same time we show how these commands may be constructed so 
+at the same time we show how these commands may be constructed so
 that you may learn how to develop your own tweaks.
 
 Before starting on this Chapter you may wish to review the section
@@ -60,14 +60,19 @@ and constructing Tweaks.
 @node Objects and interfaces
 @subsection Objects and interfaces
 
-@cindex objects
-@cindex grobs
-@cindex spanners
-@cindex interfaces
+@cindex object
+@cindex grob
+@cindex spanner
+@cindex interface
+@cindex properties, object
+@cindex object properties
+@cindex layout object
+@cindex object, layout
+@cindex interface
 
 Tweaking involves modifying the internal operation and structures
 of the LilyPond program, so we must first introduce some terms
-which are used to describe those internal operations and 
+which are used to describe those internal operations and
 structures.
 
 The term @q{Object} is a generic term used to refer to the
@@ -85,13 +90,13 @@ notational elements such as bar lines,
 note heads, ties, dynamics, etc.  Every object has its own set of
 property values.
 
-Some types of object are given special names.  Objects which
-represent items of notation on the printed output such as
- note heads, stems, slurs, ties, fingering, clefs, etc are called
-@q{Layout objects}, often known as @q{Graphical Objects}, or
-@q{Grobs} for short.  These are still objects in the generic sense
-above, and so they too all have properties associated with them,
-such as their position, size, color, etc.
+Some types of object are given special names.  Objects which represent
+items of notation on the printed output such as note heads, stems,
+slurs, ties, fingering, clefs, etc are called @q{Layout objects},
+often known as @q{Graphical Objects}, or @q{Grobs} for short.  These
+are still objects in the generic sense above, and so they too all have
+properties associated with them, such as their position, size, color,
+etc.
 
 Some layout objects are still more specialized.  Phrasing slurs,
 crescendo hairpins, ottava marks, and many other grobs are not
@@ -100,39 +105,42 @@ ending point, and maybe other properties concerned with their
 shape.  Objects with an extended shape like these are called
 @q{Spanners}.
 
-It remains to explain what @q{Interfaces} are.  Many objects,
-even though they are quite different, share common features 
-which need to be processed in the same way.
-For example, all grobs have a color, a size, a position, etc,
-and all these properties are processed in the same way during
-LilyPond's
-interpretation of the input file.  To simplify these internal
-operations these common actions and properties are grouped 
-together in an object called a @code{grob-interface}.  There
-are many other groupings of common properties like this, each 
-one given a name ending in @code{interface}.  In total there
-are over 100 such interfaces.  We shall see later why this is
-of interest and use to the user.
-
-These, then, are the main terms relating to objects which we 
+It remains to explain what @q{Interfaces} are.  Many objects, even
+though they are quite different, share common features which need to
+be processed in the same way.  For example, all grobs have a color, a
+size, a position, etc, and all these properties are processed in the
+same way during LilyPond's interpretation of the input file.  To
+simplify these internal operations these common actions and properties
+are grouped together in an object called a @code{grob-interface}.
+There are many other groupings of common properties like this, each
+one given a name ending in @code{interface}.  In total there are over
+100 such interfaces.  We shall see later why this is of interest and
+use to the user.
+
+These, then, are the main terms relating to objects which we
 shall use in this chapter.
 
 @node Naming conventions of objects and properties
 @subsection Naming conventions of objects and properties
 
-We met some object naming conventions previously, in 
+@cindex naming conventions for objects
+@cindex naming conventions for properties
+@cindex objects, naming conventions
+@cindex properties, naming conventions
+
+We met some object naming conventions previously, in
 @ref{Contexts and engravers}.  Here for reference is a list
-of the most common object and property types together with 
-the conventions for naming them and a couple of examples of 
-some real names.  We have used A to stand for any capitalized
-alphabetic character and aaa to stand for any number of
+of the most common object and property types together with
+the conventions for naming them and a couple of examples of
+some real names.  We have used @q{A} to stand for any capitalized
+alphabetic character and @q{aaa} to stand for any number of
 lower-case alphabetic characters.  Other characters are used
-verbatim. 
+verbatim.
 
 @multitable @columnfractions .33 .33 .33
-@headitem Object/property type           
+@headitem Object/property type
   @tab Naming convention
-  @tab Example
+  @tab Examples
 @item Contexts
   @tab Aaaa or AaaaAaaaAaaa
   @tab Staff, GrandStaff
@@ -144,7 +152,7 @@ verbatim.
   @tab Clef_engraver, Note_heads_engraver
 @item Interfaces
   @tab aaa-aaa-interface
-  @tab grob-interface, break-aligned-interface 
+  @tab grob-interface, break-aligned-interface
 @item Context Properties
   @tab aaa or aaaAaaaAaaa
   @tab alignAboveContext, skipBars
@@ -153,7 +161,7 @@ verbatim.
   @tab direction, beam-thickness
 @end multitable
 
-As we shall see shortly, the properties of different types of 
+As we shall see shortly, the properties of different types of
 object are modified by different commands, so it is useful to
 be able to recognize the type of object from the names of its
 properties.
@@ -162,22 +170,26 @@ properties.
 @node Tweaking methods
 @subsection Tweaking methods
 
+@cindex tweaking methods
+
 @strong{\override command}
 
 @cindex override command
+@cindex override syntax
+
 @funindex \override
+@funindex override
 
-We have already met the commands @code{\set} and @code{\with},
-used to change the properties of @strong{contexts} and to remove
-and add @strong{engravers}, in
-@ref{Modifying context properties} and @ref{Adding
-and removing engravers}.  We now must meet some more important
-commands.
+We have already met the commands @code{\set} and @code{\with}, used to
+change the properties of @strong{contexts} and to remove and add
+@strong{engravers}, in @ref{Modifying context properties}, and
+@ref{Adding and removing engravers}.  We must now introduce some more
+important commands.
 
 The command to change the properties of @strong{layout objects} is
 @code{\override}.  Because this command has to modify
 internal properties deep within LilyPond its syntax is not
-as simple as the commands you have met so far.  It needs to
+as simple as the commands you have used so far.  It needs to
 know precisely which property of which object in which context
 has to be modified, and what its new value is to be.  Let's see
 how this is done.
@@ -185,17 +197,16 @@ how this is done.
 The general syntax of this command is:
 
 @example
-\override @emph{context}.@emph{layout_object} 
-  #'@emph{layout_property} = #@emph{value}
+\override @var{Context}.@var{LayoutObject} #'@var{layout-property} =
+#@var{value}
 @end example
 
 @noindent
-This will set the property with the name @emph{layout_property}
-of the layout object with the name
-@emph{layout_object}, which is a member of the @emph{context}
-context, to the value @emph{value}.
+This will set the property with the name @var{layout-property} of the
+layout object with the name @var{LayoutObject}, which is a member of
+the @var{Context} context, to the value @var{value}.
 
-The @emph{context} can be omitted (and usually is) when the
+The @var{Context} can be omitted (and usually is) when the
 required context is unambiguously implied and is one of lowest
 level contexts, i.e., @code{Voice}, @code{ChordNames} or
 @code{Lyrics}, and we shall omit it in many of the following
@@ -214,6 +225,9 @@ this chapter will be directed to presenting examples of how it is
 used.  Here is a simple example to change the color of the
 note head:
 
+@cindex color property, example
+@cindex NoteHead, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 c d
 \override NoteHead #'color = #red
@@ -225,7 +239,9 @@ a b c
 @strong{\revert command}
 
 @cindex revert command
+
 @funindex \revert
+@funindex revert
 
 Once overridden, the property retains its new value until it is
 overridden again or a @code{\revert} command is encountered.
@@ -235,14 +251,17 @@ value; note, not its previous value if several @code{\override}
 commands have been issued.
 
 @example
-\revert @emph{context}.@emph{layout_object} #'@emph{layout_property}
+\revert @var{Context}.@var{LayoutObject} #'@var{layout-property}
 @end example
 
-Again, just like @emph{context} in the @code{\override} command,
-@emph{context} is often not needed.  It will be omitted
+Again, just like @var{Context} in the @code{\override} command,
+@var{Context} is often not needed.  It will be omitted
 in many of the following examples.  Here we revert the color
 of the note head to the default value for the final two notes:
 
+@cindex color property, example
+@cindex NoteHead, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 c d
 \override NoteHead #'color = #red
@@ -255,6 +274,9 @@ b c
 
 @strong{\once prefix}
 
+@funindex \once
+@funindex once
+
 Both the @code{\override} and the @code{\set} commands may be
 prefixed by @code{\once}.  This causes the following
 @code{\override} or @code{\set} command to be effective only
@@ -262,6 +284,9 @@ during the current musical moment before the property reverts
 back to its default value.  Using the same example, we can
 change the color of a single note like this:
 
+@cindex color property, example
+@cindex NoteHead, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 c d
 \once \override NoteHead #'color = #red
@@ -273,7 +298,9 @@ a b c
 @strong{\overrideProperty command}
 
 @cindex overrideProperty command
+
 @funindex \overrideProperty
+@funindex overrideProperty
 
 There is another form of the override command,
 @code{\overrideProperty}, which is occasionally required.
@@ -284,7 +311,9 @@ We mention it here for completeness, but for details see
 @strong{\tweak command}
 
 @cindex tweak command
+
 @funindex \tweak
+@funindex tweak
 
 The final tweaking command which is available is @code{\tweak}.
 This should be used to change the properties of objects which
@@ -294,9 +323,12 @@ within a chord, whereas @code{\tweak} affects just the following
 item in the input stream.
 
 Here's an example.  Suppose we wish to change the size of the
-middle note (the E) in a C major chord.  Let's first see what
+middle note head (the E) in a C major chord.  Let's first see what
 @code{\once \override} would do:
 
+@cindex font-size property, example
+@cindex NoteHead, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
   <c e g>4
   \once \override NoteHead #'font-size = #-3
@@ -304,7 +336,7 @@ middle note (the E) in a C major chord.  Let's first see what
   <c e g>
 @end lilypond
 
-We see the override affects @emph{all} the notes in the chord.
+We see the override affects @emph{all} the note heads in the chord.
 This is because all the notes of a chord occur at the same
 @emph{musical moment}, and the action of @code{\once} is to
 apply the override to all layout objects of the type specified
@@ -314,9 +346,9 @@ command itself.
 The @code{\tweak} command operates in a different way.  It acts
 on the immediately following item in the input stream.  However,
 it is effective only on objects which are created directly from
-the input stream, essentially note heads and articulations.
-(Objects such as stems and accidentals are created later and
-cannot be tweaked in this way).  Furthermore, when it is applied
+the input stream, essentially note heads and articulations;
+objects such as stems and accidentals are created later and
+cannot be tweaked in this way.  Furthermore, when it is applied
 to note heads these @emph{must} be within a chord, i.e., within
 single angle brackets, so to tweak a single note the @code{\tweak}
 command must be placed inside single angle brackets with the
@@ -325,6 +357,9 @@ note.
 So to return to our example, the size of the middle note of
 a chord would be changed in this way:
 
+@cindex font-size property, example
+@cindex @code{\tweak}, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
   <c e g>4
   <c \tweak #'font-size #-3 e g>4
@@ -334,34 +369,41 @@ Note that the syntax of @code{\tweak} is different from that
 of the @code{\override} command.  Neither the context nor the
 layout object should be specified; in fact, it would generate
 an error to do so.  These are both implied by the following
-item in the input stream.  So the general syntax of the
-@code{\tweak} command is simply:
+item in the input stream.  Note also that an equals sign should
+not be present.  So the general syntax of the
+@code{\tweak} command is simply
 
 @example
-\tweak #'@emph{layout_property} = #@emph{value}
+\tweak #'@var{layout-property} #@var{value}
 @end example
 
 A @code{\tweak} command can also be used to modify just one in
 a series of articulations, as shown here:
 
+@cindex color property, example
+@cindex @code{\tweak}, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 a ^Black
   -\tweak #'color #red ^Red
   -\tweak #'color #green _Green
 @end lilypond
 
+@noindent
 Note that the @code{\tweak} command must be preceded by an
 articulation mark as if it were an articulation itself.
 
 @cindex tuplets, nested
 @cindex triplets, nested
 @cindex bracket, tuplet
+@cindex bracket, triplet
 @cindex tuplet bracket
 @cindex triplet bracket
+
 @funindex TupletBracket
 
-The @code{\tweak} command must also be used to change the 
-appearance of one of a set of nested tuplets which begin at the 
+The @code{\tweak} command must also be used to change the
+appearance of one of a set of nested tuplets which begin at the
 same musical moment.  In the following example, the long tuplet
 bracket and the first of the three short brackets begin at the
 same musical moment, so any @code{\override} command would apply
@@ -371,6 +413,10 @@ specifies that the long tuplet bracket is to be placed above the
 notes and the second one specifies that the tuplet number is to be
 printed in red on the first short tuplet bracket.
 
+@cindex @code{\tweak}, example
+@cindex direction property, example
+@cindex color property, example
+
 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
 \tweak #'direction #up
 \times 4/3 {
@@ -381,13 +427,15 @@ printed in red on the first short tuplet bracket.
 }
 @end lilypond
 
-You can find more details of the @code{\tweak} command in
-@ruser{Objects connected to the input}.
-
-If nested tuplets do not begin at the same moment their
+If nested tuplets do not begin at the same moment, their
 appearance may be modified in the usual way with
 @code{\override} commands:
 
+@cindex text property, example
+@cindex tuplet-number function, example
+@cindex transparent property, example
+@cindex TupletNumber, example of overriding
+
 @c NOTE Tuplet brackets collide if notes are high on staff
 @c See issue 509
 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
@@ -404,15 +452,20 @@ appearance may be modified in the usual way with
 @end lilypond
 
 
+@seealso
+Notation Reference:
+@ruser{The tweak command}.
+
+
 @node The Internals Reference manual
 @section The Internals Reference manual
 
 @cindex Internals Reference
 
 @menu
-* Properties of layout objects::  
-* Properties found in interfaces::  
-* Types of properties::         
+* Properties of layout objects::
+* Properties found in interfaces::
+* Types of properties::
 @end menu
 
 @node Properties of layout objects
@@ -422,6 +475,7 @@ appearance may be modified in the usual way with
 @cindex properties of grobs
 @cindex grobs, properties of
 @cindex layout objects, properties of
+@cindex Internals Reference manual
 
 Suppose you have a slur in a score which, to your mind,
 appears too thin and you'd like to draw it a little heavier.
@@ -429,7 +483,7 @@ How do you go about doing this?  You know from the statements
 earlier about the flexibility of LilyPond that such a thing
 should be possible, and you would probably guess that an
 @code{\override} command would be needed.  But is there a
-heaviness property for a slur, and if there is, how might it 
+heaviness property for a slur, and if there is, how might it
 be modified?  This is where the Internals Reference manual
 comes in.  It contains all the information you might need to
 construct this and all other @code{\override} commands.
@@ -445,11 +499,12 @@ yourself with just a little practice.
 
 @cindex override example
 @cindex Internals Reference, example of using
+@cindex @code{\addlyrics} example
 
 Let's use a concrete example with a simple fragment of real
 music:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@lilypond[quote,verbatim,relative=2]
 {
   \time 6/8
   {
@@ -461,7 +516,7 @@ music:
     The man who feels love's sweet e -- mo -- tion
   }
 }
-@end lilypond 
+@end lilypond
 
 Suppose now that we decide we would like the slurs to be a
 little heavier.  Is this possible?  The slur is certainly a
@@ -472,31 +527,30 @@ this we must look in the Internals Reference, or IR for short.
 The IR for the version of LilyPond you are using may be found
 on the LilyPond website at @uref{http://lilypond.org}.  Go to the
 documentation page and click on the Internals Reference link.
-For learning purposes you should use the standard html version,
+For learning purposes you should use the standard HTML version,
 not the @q{one big page} or the PDF.  For the next few
 paragraphs to make sense you will need to actually do this
 as you read.
 
 Under the heading @strong{Top} you will see five links.  Select
 the link to the @emph{Backend}, which is where information about
-layout objects is to be found.  There, under the heading 
+layout objects is to be found.  There, under the heading
 @strong{Backend}, select the link to @emph{All layout objects}.
 The page that appears lists all the layout objects used in your
 version of LilyPond, in alphabetic order.  Select the link to
 Slur, and the properties of Slurs are listed.
 
-(An alternative way of finding this page is from the Notation
-Reference.  On one of the pages that deals with slurs you may
-find a link to the Internals Reference.  This link will
-take you directly to this page, but often it is easier to go
-straight to the IR and search there.)
+An alternative way of finding this page is from the Notation
+Reference.  On one of the pages that deals with slurs you may find a
+link to the Internals Reference.  This link will take you directly to
+this page, but if you have an idea about the name of the layout object
+to be tweaked, it is easier to go straight to the IR and search there.
 
-This Slur page in the IR tells us first that Slur objects are 
-created by the 
-Slur_engraver.  Then it lists the standard settings.  Note
-these are @strong{not} in alphabetic order.  Browse down
-them looking for a property that might control the heaviness
-of slurs, and you should find
+This Slur page in the IR tells us first that Slur objects are created
+by the Slur_engraver.  Then it lists the standard settings.  Note
+these are @strong{not} in alphabetic order.  Browse down them looking
+for a property that might control the heaviness of slurs, and you
+should find
 
 @example
 @code{thickness} (number)
@@ -511,29 +565,32 @@ in another property called @code{line-thickness}.
 
 As we said earlier, there are few to no explanations in the IR,
 but we already have enough information to try changing the
-slur thickness.  We see that the name of the layout object 
+slur thickness.  We see that the name of the layout object
 is @code{Slur}, that the name of the property to change is
 @code{thickness} and that the new value should be a number
 somewhat larger than 1.2 if we are to make slurs thicker.
 
 We can now construct the @code{\override} command by simply
 substituting the values we have found for the names, omitting
-the context.  Let's use a very large value for the thickness 
+the context.  Let's use a very large value for the thickness
 at first, so we can be sure the command is working.  We get:
 
 @example
 \override Slur #'thickness = #5.0
-@end example 
+@end example
 
 Don't forget the @code{#'} preceding the
-property name and and @code{#} preceding the new value!
+property name and a @code{#} preceding the new value!
 
 The final question is, @q{Where should this command be
-placed?}  While you are unsure and learning, the best 
+placed?}  While you are unsure and learning, the best
 answer is, @q{Within the music, before the first slur and
 close to it.}  Let's do that:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex Slur example of overriding
+@cindex thickness property, example
+
+@lilypond[quote,verbatim,relative=2]
 {
   \time 6/8
   {
@@ -547,7 +604,7 @@ close to it.}  Let's do that:
     The man who feels love's sweet e -- mo -- tion
   }
 }
-@end lilypond 
+@end lilypond
 
 @noindent
 and we see that the slur is indeed heavier.
@@ -560,9 +617,11 @@ still need some practice.  This is provided in the examples
 which follow.
 
 @subheading Finding the context
+
 @cindex context, finding
+@cindex context, identifying correct
 
-But first, what if we had needed to specify the Context?  
+But first, what if we had needed to specify the Context?
 What should it be?  We could guess that slurs are in
 the Voice context, as they are clearly closely associated
 with individual lines of music, but can we be sure?  To
@@ -574,30 +633,32 @@ the @code{Slur_engraver} is in.  Follow the link to the
 us that @code{Slur_engraver} is part of five Voice contexts,
 including the standard voice context, @code{Voice}, so our
 guess was correct.  And because @code{Voice} is one of the
-lowest level contexts which is implied unambiguously by 
-the fact that we are entering notes, we can omit it in this 
+lowest level contexts which is implied unambiguously by
+the fact that we are entering notes, we can omit it in this
 location.
 
 @subheading Overriding once only
 
 @cindex overriding once only
 @cindex once override
-@funindex \once
 
-As you can see, @emph{all} the slurs are thicker in the
-final example above.  But what if we
-wanted just the first slur to be thicker?  This is achieved
-with the @code{\once} command.  Placed immediately before
-the @code{\override} command it causes it to change only the
-slur which begins on the @strong{immediately following} note.
-If the
-immediately following note does not begin a slur the command
-has no effect at all -- it is not remembered until a slur
-is encountered, it is simply discarded.  So the command with
-@code{\once} must be
+@funindex \once
+@funindex once
+
+As you can see, @emph{all} the slurs are thicker in the final example
+above.  But what if we wanted just the first slur to be thicker?  This
+is achieved with the @code{\once} command.  Placed immediately before
+the @code{\override} command it causes it to change only the slur
+which begins on the @strong{immediately following} note.  If the
+immediately following note does not begin a slur the command has no
+effect at all -- it is not remembered until a slur is encountered, it
+is simply discarded.  So the command with @code{\once} must be
 repositioned as follows:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex Slur, example of overriding
+@cindex thickness property, example
+
+@lilypond[quote,verbatim,relative=2]
 {
   \time 6/8
   {
@@ -612,7 +673,7 @@ repositioned as follows:
     The man who feels love's sweet e -- mo -- tion
   }
 }
-@end lilypond 
+@end lilypond
 
 @noindent
 Now only the first slur is made heavier.
@@ -623,15 +684,20 @@ command.
 @subheading Reverting
 
 @cindex revert
-@cindex default properties, reverting
+@cindex default properties, reverting to
+
 @funindex \revert
+@funindex revert
 
 Finally, what if we wanted just the first two slurs to be
 heavier?  Well, we could use two commands, each preceded by
 @code{\once} placed immediately before each of the notes where
 the slurs begin:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex Slur, example of overriding
+@cindex thickness property, example
+
+@lilypond[quote,verbatim,relative=2]
 {
   \time 6/8
   {
@@ -648,15 +714,17 @@ the slurs begin:
     The man who feels love's sweet e -- mo -- tion
   }
 }
-@end lilypond 
+@end lilypond
 
 @noindent
-or we could omit the @code{\once} command and use the
-@code{\revert} command
-to return the @code{thickness} property to its default value
+or we could omit the @code{\once} command and use the @code{\revert}
+command to return the @code{thickness} property to its default value
 after the second slur:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex Slur, example of overriding
+@cindex thickness property, example
+
+@lilypond[quote,verbatim,relative=2]
 {
   \time 6/8
   {
@@ -684,87 +752,88 @@ You may use whichever method best suits what you want to do.
 That concludes our introduction to the IR, and the basic
 method of tweaking.  Several examples follow in the later
 sections of this Chapter, partly to introduce you to some of the
-additional features of the IR, and partly to give you more 
+additional features of the IR, and partly to give you more
 practice in extracting information from it.  These examples will
-contain progressively fewer words of guidance and explanation. 
+contain progressively fewer words of guidance and explanation.
+
 
 @node Properties found in interfaces
 @subsection Properties found in interfaces
 
+@cindex interface
 @cindex interface properties
 @cindex properties in interfaces
 
-Suppose now that we wish to print the lyrics in italics.  What
-form of @code{\override} command do we need to do this?
-We first look in the IR page listing @q{All layout objects}, as
-before, and look for an object that might control lyrics.  We
-find @code{LyricText}, which looks right.  Clicking on this shows
-the settable properties for lyric text.  These include the 
-@code{font-series} and @code{font-size}, but nothing that might
-give an italic shape.   
-This is because the shape property is one that is common to all
-font objects, so, rather than including it in every layout
-object, it is grouped together with other similar common
-properties and placed in an @strong{Interface}, the
+Suppose now that we wish to print the lyrics in italics.  What form of
+@code{\override} command do we need to do this?  We first look in the
+IR page listing @q{All layout objects}, as before, and look for an
+object that might control lyrics.  We find @code{LyricText}, which
+looks right.  Clicking on this shows the settable properties for lyric
+text.  These include the @code{font-series} and @code{font-size}, but
+nothing that might give an italic shape.  This is because the shape
+property is one that is common to all font objects, so, rather than
+including it in every layout object, it is grouped together with other
+similar common properties and placed in an @strong{Interface}, the
 @code{font-interface}.
 
 So now we need to learn how to find the properties of interfaces,
 and to discover what objects use these interface properties.
 
-Look again at the IR page which describes LyricText.  At the
-bottom of the page is a list of clickable (in the html versions
-of the IR) interfaces which LyricText supports.  The list has 
-seven items, including @code{font-interface}.
-Clicking on this brings up the properties associated
-with this interface, which are also properties of all the objects
-which support it, including LyricText.
+Look again at the IR page which describes LyricText.  At the bottom of
+the page is a list of clickable interfaces which LyricText supports.
+The list has several items, including @code{font-interface}.  Clicking
+on this brings up the properties associated with this interface, which
+are also properties of all the objects which support it, including
+LyricText.
 
 Now we see all the user-settable properties which control fonts,
 including @code{font-shape(symbol)}, where @code{symbol} can be
 set to @code{upright}, @code{italics} or @code{caps}.
 
-You will notice that @code{font-series} and @code{font-size}
-are also listed there.
-This immediately raises the question: Why are the common font
-properties @code{font-series} and @code{font-size} listed under
-@code{LyricText} as well as under the interface
-@code{font-interface} but @code{font-shape} is not?  The answer
-is that @code{font-series} and @code{font-size} are changed
-from their global default values when a @code{LyricText} object
-is created, but @code{font-shape} is not.  The entries in
-@code{LyricText} then tell you the values for those two
-properties which apply to @code{LyricText}.  Other objects
-which support @code{font-interface} will set these
-properties differently when they are created.
+You will notice that @code{font-series} and @code{font-size} are also
+listed there.  This immediately raises the question: Why are the
+common font properties @code{font-series} and @code{font-size} listed
+under @code{LyricText} as well as under the interface
+@code{font-interface} but @code{font-shape} is not?  The answer is
+that @code{font-series} and @code{font-size} are changed from their
+global default values when a @code{LyricText} object is created, but
+@code{font-shape} is not.  The entries in @code{LyricText} then tell
+you the values for those two properties which apply to
+@code{LyricText}.  Other objects which support @code{font-interface}
+will set these properties differently when they are created.
 
 Let's see if we can now construct the @code{\override} command
 to change the lyrics to italics.  The object is @code{LyricText},
 the property is @code{font-shape} and the value is
 @code{italic}.  As before, we'll omit the context.
 
-As an aside, although it is an important one, note that because 
-the values of
-@code{font-shape} are symbols they must be introduced with a
-single apostrophe, @code{'}.  That is why apostrophes
-are needed before @code{thickness} in the earlier example
-and @code{font-shape}.  These are both symbols too.
-Symbols are special names which are known internally to 
-LilyPond.  Some of them are the names of properties,
-like @code{thickness} or @code{font-shape}, others are in
-effect special values that can be given to properties, like
-@code{italic}.  Note the distinction from arbitrary
-text strings, which would appear as @code{"a text string"}.
-
-Ok, so the @code{\override} command we need to print the lyrics
-in italics should be
+As an aside, although it is an important one, note that because the
+values of @code{font-shape} are symbols they must be introduced with a
+single apostrophe, @code{'}.  That is why apostrophes are needed
+before @code{thickness} in the earlier example and @code{font-shape}.
+These are both symbols too.  Symbols are then read internally by
+LilyPond.  Some of them are the names of properties, like
+@code{thickness} or @code{font-shape}, others are used as values that
+can be given to properties, like @code{italic}.  Note the distinction
+from arbitrary text strings, which would appear as @code{"a text
+string"}; for more details about symbols and strings, see @ref{Scheme
+tutorial}.
+
+So we see that the @code{\override} command needed to print the lyrics
+in italics is:
 
 @example
 \override LyricText #'font-shape = #'italic
 @end example
 
 @noindent
-and this should be placed just in front of and close to the
-lyrics which it should affect, like this:
+This should be placed just in front of the lyrics we wish to affect,
+like so:
+
+@cindex font-shape property, example
+@cindex italic, example
+@cindex LyricText, example of overriding
+@cindex @code{\addlyrics}, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
@@ -785,12 +854,14 @@ lyrics which it should affect, like this:
 and the lyrics are all printed in italics.
 
 @subheading Specifying the context in lyric mode
+
 @cindex context, specifying in lyric mode
+@cindex lyric mode, specifying context
 
-In the case of lyrics, if you try specifying the context in the 
+In the case of lyrics, if you try specifying the context in the
 format given earlier the command will fail.  A syllable
 entered in lyricmode is terminated by either a space,
-a newline or a digit.  All other characters are included 
+a newline or a digit.  All other characters are included
 as part of the syllable.  For this reason a space or newline
 must appear before the terminating @code{@}} to prevent it being
 included as part of the final syllable.  Similarly,
@@ -809,23 +880,28 @@ syllable and the terminating brace.}
 @warning{In overrides in lyrics always place spaces around
 the dot between the context name and the object name.}
 
+
+@seealso
+Learning Manual: @ref{Scheme tutorial}.
+
+
 @node Types of properties
 @subsection Types of properties
 
-@cindex Property types
+@cindex property types
 
 So far we have seen two types of property: @code{number} and
 @code{symbol}.  To be valid, the value given to a property
 must be of the correct type and obey the rules for that type.
 The type of property is always shown in brackets after the
-property name in the IR.  Here is a list of the types you may 
+property name in the IR.  Here is a list of the types you may
 need, together with the rules for that type, and some examples.
 You must always add a hash symbol, @code{#}, of course,
-to the front of these values when they are entered in the 
+to the front of these values when they are entered in the
 @code{\override} command.
 
 @multitable @columnfractions .2 .45 .35
-@headitem Property type           
+@headitem Property type
   @tab Rules
   @tab Examples
 @item Boolean
@@ -835,22 +911,23 @@ to the front of these values when they are entered in the
   @tab A positive decimal number (in units of staff space)
   @tab @code{2.5}, @code{0.34}
 @item Direction
-  @tab A valid direction constant or its numerical equivalent
+  @tab A valid direction constant or its numerical equivalent (decimal
+values between -1 and 1 are allowed)
   @tab @code{LEFT}, @code{CENTER}, @code{UP},
        @code{1}, @code{-1}
 @item Integer
   @tab A positive whole number
   @tab @code{3}, @code{1}
 @item List
-  @tab A bracketed set of items separated by spaces,
-preceded by an apostrophe
+  @tab A set of values separated by spaces, enclosed in parentheses
+and preceded by an apostrophe
   @tab @code{'(left-edge staff-bar)}, @code{'(1)},
        @code{'(1.0 0.25 0.5)}
 @item Markup
   @tab Any valid markup
   @tab @code{\markup @{ \italic "cresc." @}}
 @item Moment
-  @tab A fraction of a whole note constructed with the 
+  @tab A fraction of a whole note constructed with the
 make-moment function
   @tab @code{(ly:make-moment 1 4)},
        @code{(ly:make-moment 3 8)}
@@ -866,26 +943,31 @@ in brackets preceded by an apostrophe
 preceded by an apostrophe
   @tab @code{'italic}, @code{'inside}
 @item Unknown
-  @tab A procedure or @code{#f} (to cause no action)
+  @tab A procedure, or @code{#f} to cause no action
   @tab @code{bend::print}, @code{ly:text-interface::print},
        @code{#f}
 @item Vector
-  @tab A list of three items enclosed in brackets and preceded
+  @tab A list of three items enclosed in parentheses and preceded
 by apostrophe-hash, @code{'#}.
   @tab @code{'#(#t #t #f)}
 @end multitable
 
+
+@seealso
+Learning Manual: @ref{Scheme tutorial}.
+
+
 @node Appearance of objects
 @section Appearance of objects
 
 Let us now put what we have learned into practice with a few
-examples which show how tweaks may be used to change the 
+examples which show how tweaks may be used to change the
 appearance of the printed music.
 
 @menu
-* Visibility and color of objects::  
-* Size of objects::             
-* Length and thickness of objects::  
+* Visibility and color of objects::
+* Size of objects::
+* Length and thickness of objects::
 @end menu
 
 @node Visibility and color of objects
@@ -894,45 +976,46 @@ appearance of the printed music.
 In the educational use of music we might wish to print a score
 with certain elements omitted as an exercise for the student,
 who is required to supply them.  As a simple example,
-let us suppose the exercise is to supply the missing bar lines 
+let us suppose the exercise is to supply the missing bar lines
 in a piece of music.  But the bar lines are normally inserted
 automatically.  How do we prevent them printing?
 
-Before we tackle this, let us remember that object properties
-are grouped in what are called @emph{interfaces} -- see
-@ref{Properties found in interfaces}.  This is simply to
-group together those properties that are commonly required
-together -- if one of them is required for an object, so are
-the others.  Some objects then need the properties in some
-interfaces, others need them from other interfaces.  The
-interfaces which contain the properties required by a 
-particular grob are listed in the IR at the bottom of the
-page describing that grob, and those properties may be
-viewed by looking at those interfaces.
-
-We explained how to find information about grobs in 
-@ref{Properties of layout objects}.  Using the same approach,
-we go to the IR to find the layout object which prints
-bar lines.  Going via @emph{Backend} and @emph{All layout objects}
-we find there
-is a layout object called @code{BarLine}.  Its properties include
-two that control its visibility: @code{break-visibility} and
-@code{stencil}.  Barline also supports a number of interfaces,
-including the @code{grob-interface}, where we find the
-@code{transparent} and the @code{color} properties.  All
-of these can affect the visibility of bar lines (and, of course,
-by extension, many other layout objects too.)  Let's consider
-each of these in turn.
+Before we tackle this, let us remember that object properties are
+grouped in what are called @emph{interfaces} -- see @ref{Properties
+found in interfaces}.  This is simply to group together those
+properties that may be used together to tweak a graphical object -- if
+one of them is allowed for an object, so are the others.  Some objects
+then use the properties in some interfaces, others use them from other
+interfaces.  The interfaces which contain the properties used by a
+particular grob are listed in the IR at the bottom of the page
+describing that grob, and those properties may be viewed by looking at
+those interfaces.
+
+We explained how to find information about grobs in @ref{Properties of
+layout objects}.  Using the same approach, we go to the IR to find the
+layout object which prints bar lines.  Going via @emph{Backend} and
+@emph{All layout objects} we find there is a layout object called
+@code{BarLine}.  Its properties include two that control its
+visibility: @code{break-visibility} and @code{stencil}.  Barline also
+supports a number of interfaces, including the @code{grob-interface},
+where we find the @code{transparent} and the @code{color} properties.
+All of these can affect the visibility of bar lines (and, of course,
+by extension, many other layout objects too.)  Let's consider each of
+these in turn.
 
 @subheading stencil
+
 @cindex stencil property
 
 This property controls the appearance of the bar lines by specifying
 the symbol (glyph) which should be printed.  In common
-with many other properties, it can be set to print nothing by 
+with many other properties, it can be set to print nothing by
 setting its value to @code{#f}.  Let's try it, as before, omitting
 the implied Context, @code{Voice}:
 
+@cindex BarLine, example of overriding
+@cindex stencil property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -943,19 +1026,20 @@ the implied Context, @code{Voice}:
 }
 @end lilypond
 
-The bar lines are still printed.  What is wrong?  Go back to the
-IR and look again at the page giving the properties of BarLine.
-At the top of the page it says @qq{Barline objects are created
-by: Bar_engraver}.  Go to the @code{Bar_engraver} page.
-At the bottom
-it gives a list of Contexts in which the bar engraver operates.
-All of them are of the type @code{Staff}, so the reason the
-@code{\override} command failed to work as expected is because
-@code{Barline} is not in the default @code{Voice} context.
-If the context
-is specified wrongly, the command simply does not work.  No
-error message is produced, and nothing is logged in the log
-file.  Let's try correcting it by adding the correct context:
+The bar lines are still printed.  What is wrong?  Go back to the IR
+and look again at the page giving the properties of BarLine.  At the
+top of the page it says @qq{Barline objects are created by:
+Bar_engraver}.  Go to the @code{Bar_engraver} page.  At the bottom it
+gives a list of Contexts in which the bar engraver operates.  All of
+them are of the type @code{Staff}, so the reason the @code{\override}
+command failed to work as expected is because @code{Barline} is not in
+the default @code{Voice} context.  If the context is specified
+incorrectly, the command simply does not work.  No error message is
+produced, and nothing is logged in the log file.  Let's try correcting
+it by adding the correct context:
+
+@cindex BarLine, example of overriding
+@cindex stencil property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
@@ -969,23 +1053,40 @@ file.  Let's try correcting it by adding the correct context:
 
 Now the bar lines have vanished.
 
+Note, though, that setting the @code{stencil} property to @code{#f}
+will cause errors when the dimensions of the object are required for
+correct processing.  For example, errors will be generated if the
+@code{stencil} property of the @code{NoteHead} object is set to
+@code{#f}.  If this is the case, you can instead use the
+@code{point-stencil} function, which sets the stencil to a object
+with zero size:
+
+@lilypond[quote,verbatim,relative=2]
+{
+  c c
+  \once \override NoteHead #'stencil = #point-stencil
+  c c
+}
+@end lilypond
+
 @subheading break-visibility
 
 @cindex break-visibility property
 
 We see from the @code{BarLine} properties in the IR that the
-@code{break-visibility} property requires a vector of three
-booleans.
-These control respectively whether bar lines are printed at
-the end of a line, in the middle of lines, and at the beginning
-of lines.  For our example we want all bar lines to be suppressed,
-so the value we need is @code{'#(#f #f #f)}.
-Let's try that, remembering
-to include the @code{Staff} context.  Note also that in writing
-this value we have @code{#'#} before the opening bracket.
-The @code{'#} is required as part of the value to introduce a
-vector, and the first @code{#} is required, as always, to precede
-the value itself in the @code{\override} command.
+@code{break-visibility} property requires a vector of three booleans.
+These control respectively whether bar lines are printed at the end of
+a line, in the middle of lines, and at the beginning of lines.  For
+our example we want all bar lines to be suppressed, so the value we
+need is @code{'#(#f #f #f)}.  Let's try that, remembering to include
+the @code{Staff} context.  Note also that in writing this value we
+have @code{#'#} before the opening bracket.  The @code{'#} is required
+as part of the value to introduce a vector, and the first @code{#} is
+required, as always, to precede the value itself in the
+@code{\override} command.
+
+@cindex BarLine, example of overriding
+@cindex break-visibility property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
@@ -1000,23 +1101,25 @@ the value itself in the @code{\override} command.
 And we see this too removes all the bar lines.
 
 @subheading transparent
-@cindex transparent property
 
-We see from the properties specified in the @code{grob-interface}
-page in the IR that the @code{transparent} property is a boolean.
-This
-should be set to @code{#t} to make the grob transparent.
-In this next example let us make the time signature invisible 
-rather than the bar lines.  
-To do this we need to find the grob name for the time signature.
-Back to
-the @q{All layout objects} page in the IR to find the properties
-of the @code{TimeSignature} layout object.  This is produced by
-the @code{Time_signature_engraver} which you can check also lives
-in the @code{Staff} context and also supports the
+@cindex transparent property
+@cindex transparency
+
+We see from the properties specified in the @code{grob-interface} page
+in the IR that the @code{transparent} property is a boolean.  This
+should be set to @code{#t} to make the grob transparent.  In this next
+example let us make the time signature invisible rather than the bar
+lines.  To do this we need to find the grob name for the time
+signature.  Back to the @q{All layout objects} page in the IR to find
+the properties of the @code{TimeSignature} layout object.  This is
+produced by the @code{Time_signature_engraver} which you can check
+also lives in the @code{Staff} context and also supports the
 @code{grob-interface}.  So the command to make the time signature
 transparent is:
 
+@cindex TimeSignature, example of overriding
+@cindex transparent property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1028,13 +1131,16 @@ transparent is:
 @end lilypond
 
 @noindent
-The time signature is gone, but this command leaves a gap where 
+The time signature is gone, but this command leaves a gap where
 the time signature should be.  Maybe this is what is wanted for
-an exercise for the student to fill it in, but in other 
-circumstances a gap might be undesirable.  To remove it, the 
+an exercise for the student to fill it in, but in other
+circumstances a gap might be undesirable.  To remove it, the
 stencil for the time signature should be set to @code{#f}
 instead:
 
+@cindex TimeSignature, example of overriding
+@cindex stencil property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1051,10 +1157,19 @@ removes the object entirely; making the object @code{transparent}
 leaves it where it is, but makes it invisible.
 
 @subheading color
+
 @cindex color property
 
-Finally we could make the bar lines invisible by coloring
-them white.  The @code{grob-interface} specifies that the
+Finally let us try making the bar lines invisible by coloring
+them white.  (There is a difficulty with this in that the
+white bar line may or may not blank out the staff lines where
+they cross.  You may see in some of the examples below that this
+happens unpredictably.  The details of why this is so and how to
+control it are covered in @ruser{Painting objects white}.  But at
+the moment we are learning about color, so please just accept this
+limitation for now.)
+
+The @code{grob-interface} specifies that the
 color property value is a list, but there is no
 explanation of what that list should be.  The list it
 requires is actually a list of values in internal units,
@@ -1064,6 +1179,9 @@ of the @q{normal} colors listed in the first table in
 @ruser{List of colors}.  To set the bar lines to white
 we write:
 
+@cindex BarLine, example of overriding
+@cindex color property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1080,19 +1198,24 @@ and again, we see the bar lines are not visible.  Note that
 a symbol, but a @emph{function}.  When called, it provides
 the list of internal values required to set the color to
 white.  The other colors in the normal list are functions
-too.  To convince yourself this is working you might like 
+too.  To convince yourself this is working you might like
 to change the color to one of the other functions in the
 list.
 
 @cindex color, X11
 @cindex X11 colors
 
+@funindex x11-color
+
 The second way of changing the color is to use the list of
 X11 color names in the second list in @ruser{List of colors}.
 However, these must be preceded by another function, which
 converts X11 color names into the list of internal values,
 @code{x11-color}, like this:
 
+@cindex BarLine, example of overriding
+@cindex color property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1111,13 +1234,18 @@ an apostrophe and the two enclosed in brackets.
 @cindex rgb colors
 @cindex color, rgb
 
+@funindex rgb-color
+
 There is yet a third function, one which converts RGB values into
 internal colors -- the @code{rgb-color} function.  This takes
-three arguments giving the intensities of the red, green and 
+three arguments giving the intensities of the red, green and
 blue colors.  These take values in the range 0 to 1.  So to
 set the color to red the value should be @code{(rgb-color 1 0 0)}
 and to white it should be @code{(rgb-color 1 1 1)}:
 
+@cindex BarLine, example of overriding
+@cindex color property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1134,6 +1262,15 @@ to white, @code{'grey100}, in steps of 1.  Let's illustrate
 this by setting all the layout objects in our example to
 various shades of grey:
 
+@cindex StaffSymbol, example of overriding
+@cindex TimeSignature, example of overriding
+@cindex Clef, example of overriding
+@cindex NoteHead, example of overriding
+@cindex Stem, example of overriding
+@cindex BarLine, example of overriding
+@cindex color property, example
+@cindex x11-color, example of using
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 {
   \time 12/16
@@ -1156,17 +1293,25 @@ work!  Remember, the context is the one in which the appropriate
 engraver is placed.  The default context for engravers can be
 found by starting from the layout object, going from there to
 the engraver which produces it, and on the engraver page in the
-IR it tells you in which context the engraver will normally be 
-found.  
+IR it tells you in which context the engraver will normally be
+found.
 
 
 @node Size of objects
 @subsection Size of objects
 
-Let us begin by looking again at the earlier example 
+@cindex changing size of objects
+@cindex size of objects
+@cindex objects, size of
+@cindex objects, changing size of
+
+Let us begin by looking again at the earlier example
 see @ref{Nesting music expressions}) which showed
 how to introduce a new temporary staff, as in an @rglos{ossia}.
 
+@cindex alignAboveContext property, example
+@cindex @code{\with}, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \new Staff ="main" {
        \relative g' {
@@ -1175,7 +1320,7 @@ how to introduce a new temporary staff, as in an @rglos{ossia}.
          <<
            { f c c }
            \new Staff \with {
-             alignAboveContext = "main" }
+             alignAboveContext = #"main" }
            { f8 f c }
          >>
          r4 |
@@ -1188,6 +1333,12 @@ are usually printed slightly smaller than the main staff.  We
 already know now how to remove the clef and time signature --
 we simply set the stencil of each to @code{#f}, as follows:
 
+@cindex alignAboveContext property, example
+@cindex @code{\with}, example
+@cindex stencil property, example
+@cindex Clef, example of overriding
+@cindex TimeSignature, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \new Staff ="main" {
   \relative g' {
@@ -1196,7 +1347,7 @@ we simply set the stencil of each to @code{#f}, as follows:
     <<
       { f c c }
       \new Staff \with {
-        alignAboveContext = "main"
+        alignAboveContext = #"main"
       }
       {
         \override Staff.Clef #'stencil = ##f
@@ -1214,9 +1365,9 @@ where the extra pair of braces after the @code{\with} clause are
 required to ensure the enclosed overrides and music are applied
 to the ossia staff.
 
-But what is the difference between modifying the staff context by 
+But what is the difference between modifying the staff context by
 using @code{\with} and modifying the stencils of the clef and the
-time signature with \override?  The main difference is that 
+time signature with \override?  The main difference is that
 changes made in a @code{\with} clause are made at the time the
 context is created, and remain in force as the @strong{default}
 values for the duration of that context, whereas
@@ -1224,17 +1375,16 @@ values for the duration of that context, whereas
 music are dynamic -- they make changes synchronized with
 a particular point in the music.  If changes are unset or
 reverted using @code{\unset} or @code{\revert} they return to
-their default values, which will be the ones set in the 
+their default values, which will be the ones set in the
 @code{\with} clause, or if none have been set there, the normal
 default values.
 
-Some context properties
-can be modified only in @code{\with} clauses.  These are those
-properties which cannot sensibly be changed after the context 
-has been created.  @code{alignAboveContext} and its partner,
-@code{alignBelowContext}, are two such properties -- once the
-staff has been created its alignment is decided and it would
-make no sense to try to change it later.
+Some context properties can be modified only in @code{\with} clauses.
+These are those properties which cannot sensibly be changed after the
+context has been created.  @code{alignAboveContext} and its partner,
+@code{alignBelowContext}, are two such properties -- once the staff
+has been created its alignment is decided and it would make no sense
+to try to change it later.
 
 The default values of layout object properties can also be set
 in @code{\with} clauses.  Simply use the normal @code{\override}
@@ -1245,6 +1395,11 @@ in this location.
 
 So we could replace the example above with
 
+@cindex alignAboveContext property, example
+@cindex @code{\with}, example
+@cindex Clef, example of overriding
+@cindex TimeSignature, example of overriding
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \new Staff ="main" {
   \relative g' {
@@ -1253,7 +1408,7 @@ So we could replace the example above with
     <<
       { f c c }
       \new Staff \with {
-        alignAboveContext = "main"
+        alignAboveContext = #"main"
         % Don't print clefs in this staff
         \override Clef #'stencil = ##f
         % Don't print time signatures in this staff
@@ -1268,20 +1423,17 @@ So we could replace the example above with
 
 Finally we come to changing the size of layout objects.
 
-Some layout objects are created as glyphs selected from
-a typeface font.  These include note heads, accidentals, markup, 
-clefs, time signatures, dynamics and lyrics.  
-Their size is changed by modifying the
-@code{font-size} property, as we shall shortly see.  Other
-layout objects such as slurs and ties -- in general, spanner
-objects -- are drawn individually, so there is no 
-@code{font-size}
-associated with them.  These objects generally derive their
-size from the objects to which they are attached, so usually
-there is no need to change their size manually.  Still other 
-properties such as the length of stems and bar lines, thickness 
-of beams and other lines, and the separation of staff lines all 
-need to be modified in special ways. 
+Some layout objects are created as glyphs selected from a typeface
+font.  These include note heads, accidentals, markup, clefs, time
+signatures, dynamics and lyrics.  Their size is changed by modifying
+the @code{font-size} property, as we shall shortly see.  Other layout
+objects such as slurs and ties -- in general, spanner objects -- are
+drawn individually, so there is no @code{font-size} associated with
+them.  These objects generally derive their size from the objects to
+which they are attached, so usually there is no need to change their
+size manually.  Still other properties such as the length of stems and
+bar lines, thickness of beams and other lines, and the separation of
+staff lines all need to be modified in special ways.
 
 Returning to the ossia example, let us first change the font-size.
 We can do this in two ways.  We can either change the size of the
@@ -1306,6 +1458,12 @@ step reduces or increases the size by approximately 12%.
 
 Let's try it in our ossia example:
 
+@cindex alignAboveContext property, example
+@cindex @code{\with}, example
+@cindex Clef, example of overriding
+@cindex TimeSignature, example of overriding
+@cindex fontSize property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \new Staff ="main" {
   \relative g' {
@@ -1314,7 +1472,7 @@ Let's try it in our ossia example:
     <<
       { f c c }
       \new Staff \with {
-        alignAboveContext = "main"
+        alignAboveContext = #"main"
         \override Clef #'stencil = ##f
         \override TimeSignature #'stencil = ##f
         % Reduce all font sizes by ~24%
@@ -1327,7 +1485,7 @@ Let's try it in our ossia example:
 }
 @end lilypond
 
-This is still not quite right.  The note heads and flags are 
+This is still not quite right.  The note heads and flags are
 smaller, but the stems are too long in proportion and the
 staff lines are spaced too widely apart.  These need to be
 scaled down in proportion to the font reduction.  The next
@@ -1336,9 +1494,9 @@ sub-section discusses how this is done.
 @node Length and thickness of objects
 @subsection Length and thickness of objects
 
-@cindex Distances
-@cindex Thickness
-@cindex Length
+@cindex distances
+@cindex thickness
+@cindex length
 @cindex magstep
 @cindex size, changing
 @cindex stem length, changing
@@ -1361,6 +1519,16 @@ one argument, the change in font size (#-2 in the example above)
 and returns a scaling factor suitable for reducing other
 objects in proportion.  It is used like this:
 
+@cindex alignAboveContext property, example
+@cindex @code{\with}, example
+@cindex Clef, example of overriding
+@cindex TimeSignature, example of overriding
+@cindex fontSize property, example
+@cindex StaffSymbol, example of overriding
+@cindex magstep function, example of using
+@cindex staff-space property, example
+@cindex stencil property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \new Staff ="main" {
   \relative g' {
@@ -1369,7 +1537,7 @@ objects in proportion.  It is used like this:
     <<
       { f c c }
       \new Staff \with {
-        alignAboveContext = "main"
+        alignAboveContext = #"main"
         \override Clef #'stencil = ##f
         \override TimeSignature #'stencil = ##f
         fontSize = #-2
@@ -1384,15 +1552,14 @@ objects in proportion.  It is used like this:
 @end lilypond
 
 @noindent
-Since the length of stems and many other length-related properties
-are always calculated relative to the
-value of the @code{staff-space} property these are automatically
-scaled down in length too.  Note that this affects only the
-vertical scale of the ossia -- the horizontal scale is determined
-by the layout of the main music in order to remain synchronized 
-with it, so it is not affected by any of these changes in size.
-Of course, if the scale of all the main music were changed in this
-way then the horizontal spacing would be affected.  This is 
+Since the length of stems and many other length-related properties are
+always calculated relative to the value of the @code{staff-space}
+property these are automatically scaled down in length too.  Note that
+this affects only the vertical scale of the ossia -- the horizontal
+scale is determined by the layout of the main music in order to remain
+synchronized with it, so it is not affected by any of these changes in
+size.  Of course, if the scale of all the main music were changed in
+this way then the horizontal spacing would be affected.  This is
 discussed later in the layout section.
 
 This, then, completes the creation of an ossia.  The sizes and
@@ -1400,37 +1567,42 @@ lengths of all other objects may be modified in analogous ways.
 
 For small changes in scale, as in the example above, the
 thickness of the various drawn lines such as bar lines,
-beams, hairpins, slurs, etc does not usually require global 
+beams, hairpins, slurs, etc does not usually require global
 adjustment.  If the thickness of any particular layout object
 needs to be adjusted this can be best achieved by overriding its
 @code{thickness} property.  An example of changing the thickness
 of slurs was shown above in @ref{Properties of layout objects}.
 The thickness of all drawn objects (i.e., those not produced
-from a font) may be changed in the same way. 
+from a font) may be changed in the same way.
 
 
 @node Placement of objects
 @section Placement of objects
 
 @menu
-* Automatic behavior::          
-* Within-staff objects::        
-* Outside staff objects::       
+* Automatic behavior::
+* Within-staff objects::
+* Outside-staff objects::
 @end menu
 
 
 @node Automatic behavior
 @subsection Automatic behavior
 
+@cindex within-staff objects
+@cindex outside-staff objects
+@cindex objects, within-staff
+@cindex objects, outside-staff
+
 There are some objects in musical notation that belong to
-the staff and there are other objects that should be 
+the staff and there are other objects that should be
 placed outside the staff.  These are called within-staff
 objects and outside-staff objects respectively.
 
 Within-staff objects are those that are located on the staff
 -- note heads, stems, accidentals, etc.  The positions of
 these are usually fixed by the music itself -- they are
-vertically positioned on specific lines of the staff or are 
+vertically positioned on specific lines of the staff or are
 tied to other objects that are so positioned.  Collisions of
 note heads, stems and accidentals in closely set chords are
 normally avoided automatically.  There are commands and
@@ -1446,22 +1618,24 @@ collide with any other object.  LilyPond uses the
 which the objects should be placed, as follows.
 
 First, LilyPond places all the within-staff objects.
-Then it sorts the outside-staff objects according to their 
+Then it sorts the outside-staff objects according to their
 @code{outside-staff-priority}.  The outside-staff objects are
 taken one by one, beginning with the object with the lowest
 @code{outside-staff-priority}, and placed so that they do not
-collide with any objects that have already been placed. That is, 
-if two outside-staff grobs are competing for the same space, the 
+collide with any objects that have already been placed. That is,
+if two outside-staff grobs are competing for the same space, the
 one with the lower @code{outside-staff-priority} will be placed
 closer to the staff.  If two objects have the same
 @code{outside-staff-priority} the one encountered first will be
 placed closer to the staff.
 
-In the following example all the markup texts have the same 
+In the following example all the markup texts have the same
 priority (since it is not explicitly set).  Note that @q{Text3}
 is automatically positioned close to the staff again, nestling
 under @q{Text2}.
 
+@cindex markup example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 c2^"Text1"
 c^"Text2"
@@ -1485,14 +1659,14 @@ this @q{nestling} of the notes on adjacent staves:
     \relative c'''' { c a, }
   }
 >>
-@end lilypond 
+@end lilypond
 
 
 @node Within-staff objects
 @subsection Within-staff objects
 
 We have already seen how the commands @code{\voiceXXX} affect
-the direction of slurs, ties, fingering and 
+the direction of slurs, ties, fingering and
 everything else which depends on the direction of the stems.
 These commands are essential when writing polyphonic music to
 permit interweaving melodic lines to be distinguished.
@@ -1504,17 +1678,24 @@ We first explain what this does, and then introduce a number of
 ready-made commands which avoid your having to code explicit
 overrides for the more common modifications.
 
-Some layout objects like slurs and ties curve, bend or point 
+Some layout objects like slurs and ties curve, bend or point
 either up or down; others like stems and flags also move to
 right or left when they point up or down.  This is controlled
 automatically when @code{direction} is set.
 
-The following example shows in bar 1 the default behavior of 
-stems, 
-with those on high notes pointing down and those on low notes
-pointing up, followed by four notes with all stems forced down, 
-four notes with all stems forced up, and finally four notes
-reverted back to the default behavior.
+@cindex down
+@cindex up
+@cindex center
+@cindex neutral
+
+The following example shows in bar 1 the default behavior of stems,
+with those on high notes pointing down and those on low notes pointing
+up, followed by four notes with all stems forced down, four notes with
+all stems forced up, and finally four notes reverted back to the
+default behavior.
+
+@cindex Stem, example of overriding
+@cindex direction property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 a4 g c a
@@ -1533,10 +1714,9 @@ may also be used in some cases.  It is simply treated as meaning
 @code{UP} for stems, but for some objects it means @q{center}.
 There is a constant, @code{CENTER} which has the value @code{0}.
 
-However, these explicit overrides are not usually used, as there
-are simpler equivalent predefined commands available.  
-Here is a table of the commonest.  The meaning of each is stated
-where it is not obvious.
+However, these explicit overrides are not usually used, as there are
+simpler equivalent predefined commands available.  Here is a table of
+the commonest.  The meaning of each is stated where it is not obvious.
 
 @multitable @columnfractions .2 .2 .25 .35
 @headitem Down/Left
@@ -1585,23 +1765,30 @@ Note that these predefined commands may @strong{not} be
 preceded by @code{\once}.  If you wish to limit the
 effect to a single note you must either use the equivalent
 @code{\once \override} command or use the predefined command
-followed after the affected note by the corresponding 
+followed after the affected note by the corresponding
 @code{\xxxNeutral} command.
 
 @subheading Fingering
+
 @cindex fingering, placement
+@cindex fingering, chords
 
-The placement of fingering is also affected by the value
-of its @code{direction} property, but there are special
+The placement of fingering on single notes can also be controlled
+by the @code{direction} property, but changing @code{direction}
+has no effect on chords.  As we shall see, there are special
 commands which allow the fingering of individual notes
 of chords to be controlled, with the fingering being placed
 above, below, to the left or to the right of each note.
 
-First, here's the effect of @code{direction} on fingering,
-the first bar shows the default, then the effect of specifying
-@code{DOWN} and @code{UP}:
+First, here's the effect of @code{direction} on the fingering
+attached to single notes.  The first bar shows the default
+behaviour, and the following two bars shows the effect of
+specifying @code{DOWN} and @code{UP}:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex Fingering, example of overriding
+@cindex direction property, example
+
+@lilypond[quote,verbatim,relative=2]
 c-5 a-3 f-1 c'-5
 \override Fingering #'direction = #DOWN
 c-5 a-3 f-1 c'-5
@@ -1609,22 +1796,49 @@ c-5 a-3 f-1 c'-5
 c-5 a-3 f-1 c'-5
 @end lilypond
 
-This is how to control fingering on single notes, but the 
-@code{direction}
-property is ignored for chords.  Instead, by default, the
-fingering is automatically placed both above and below the 
+However, overriding the @code{direction} property is not the
+easiest way of manually setting the fingering above or below
+the notes; using @code{_} or @code{^} instead of @code{-} before
+the fingering number is usually preferable.  Here is the previous
+example using this method:
+
+@cindex fingering example
+
+@lilypond[quote,verbatim,relative=2]
+c-5 a-3 f-1 c'-5
+c_5 a_3 f_1 c'_5
+c^5 a^3 f^1 c'^5
+@end lilypond
+
+The @code{direction} property is ignored for chords, but the
+directional prefixes, @code{_} and @code{^} do work.  By default,
+the fingering is automatically placed both above and below the
 notes of a chord, as shown:
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+@cindex fingering example
+
+@lilypond[quote,verbatim,relative=2]
 <c-5 g-3>
 <c-5 g-3 e-2>
 <c-5 g-3 e-2 c-1>
 @end lilypond
 
-Greater control over the placement of fingering of the 
-individual notes in a chord is possible by using
-the @code{\set fingeringOrientations} command.  The format of
-this command is
+@noindent
+but this may be overridden to manually force all or any of the
+individual fingering numbers above or below:
+
+@cindex fingering example
+
+@lilypond[quote,verbatim,relative=2]
+<c-5 g-3 e-2 c-1>
+<c^5 g_3 e_2 c_1>
+<c^5 g^3 e^2 c_1>
+@end lilypond
+
+Even greater control over the placement of fingering of the
+individual notes in a chord is possible by using the
+@code{\set fingeringOrientations} command.  The format of this
+command is:
 
 @example
 @code{\set fingeringOrientations = #'([up] [left/right] [down])}
@@ -1636,22 +1850,26 @@ property of the @code{Voice} context, created and used by the
 @code{New_fingering_engraver}.
 
 The property may be set to a list of one to three values.
-It controls whether fingerings may be placed above (if 
+It controls whether fingerings may be placed above (if
 @code{up} appears in the list), below (if @code{down} appears),
 to the left (if @code{left} appears, or to the right
 (if @code{right} appears).  Conversely, if a location is not
-listed, no fingering is placed there.  LilyPond takes these 
+listed, no fingering is placed there.  LilyPond takes these
 constraints and works out the best placement for the fingering
 of the notes of the following chords.  Note that @code{left} and
 @code{right} are mutually exclusive -- fingering may be placed
 only on one side or the other, not both.
 
-To control the placement of the fingering of a single note 
-using this command it is necessary to write it as a single 
-note chord by placing angle brackets round it.
-  
+@warning{To control the placement of the fingering of a single
+note using this command it is necessary to write it as a single
+note chord by placing angle brackets round it.}
+
 Here are a few examples:
 
+@cindex fingering example
+@cindex @code{\set}, example of using
+@cindex fingeringOrientations property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 \set fingeringOrientations = #'(left)
 <f-2>
@@ -1668,7 +1886,7 @@ Here are a few examples:
 \set fingeringOrientations = #'(right)
 <f-2>
 < c-1  e-2 g-3 b-5 > 4
-@end lilypond 
+@end lilypond
 
 @noindent
 If the fingering seems a little crowded the @code{font-size}
@@ -1695,8 +1913,8 @@ try @code{-7}:
 < c-1  e-2 g-3 b-5 > 4
 @end lilypond
 
-@node Outside staff objects
-@subsection Outside staff objects
+@node Outside-staff objects
+@subsection Outside-staff objects
 
 Outside-staff objects are automatically placed to avoid collisions.
 Objects with the lower value of the @code{outside-staff-priority}
@@ -1712,8 +1930,8 @@ outside-staff objects which are, by default, placed in the
 @code{Staff} or @code{Voice} contexts.
 
 @multitable @columnfractions .3 .3 .3
-@headitem Layout Object           
-  @tab Priority     
+@headitem Layout Object
+  @tab Priority
   @tab Controls position of:
 @item @code{MultiMeasureRestText}
   @tab @code{450}
@@ -1742,18 +1960,24 @@ Here is an example showing the default placement of some of
 these.
 
 @cindex text spanner
+@cindex ottava bracket
+
 @funindex \startTextSpan
+@funindex startTextSpan
 @funindex \stopTextSpan
-@cindex ottava bracket
+@funindex stopTextSpan
+
+@cindex TextSpanner, example of overriding
+@cindex bound-details property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 % Set details for later Text Spanner
-\override TextSpanner #'bound-details #'left #'text
+\override TextSpanner #'(bound-details left text)
     = \markup { \small \bold Slower }
 % Place dynamics above staff
 \dynamicUp
 % Start Ottava Bracket
-#(set-octavation 1)
+\ottava #1
 c' \startTextSpan
 % Add Dynamic Text
 c\pp
@@ -1765,7 +1989,7 @@ c c
 % Add Dynamic Text
 c\ff c \stopTextSpan
 % Stop Ottava Bracket
-#(set-octavation 0)
+\ottava #0
 c, c c c
 @end lilypond
 
@@ -1778,18 +2002,24 @@ For more details see @ruser{Text spanners}.
 
 It also shows how ottava brackets are created.
 
-Note that bar numbers, metronome marks and rehearsal marks
-are not shown. By default these are created in the
-@code{Score} context and their @code{outside-staff-priority}
-is ignored relative to the layout objects which are created
-in the @code{Staff} context.
-If you wish to place bar numbers, metronome marks or rehearsal
-marks in accordance with the value of their
-@code{outside-staff-priority} the @code{Bar_number_engraver},
-@code{Metronome_mark_engraver} or @code{Mark_engraver} respectively
-should be removed from the @code{Score} context and placed in the
-top @code{Staff} context.  If this is done, these marks will be
-given the following default @code{outside-staff-priority} values:
+@cindex tweaking bar number placement
+@cindex bar numbers, tweaking placement
+@cindex tweaking metronome mark placement
+@cindex metronome mark, tweaking placement
+@cindex tweaking rehearsal mark placement
+@cindex rehearsal marks, tweaking placement
+
+Note that bar numbers, metronome marks and rehearsal marks are not
+shown. By default these are created in the @code{Score} context and
+their @code{outside-staff-priority} is ignored relative to the layout
+objects which are created in the @code{Staff} context.  If you wish to
+place bar numbers, metronome marks or rehearsal marks in accordance
+with the value of their @code{outside-staff-priority} the
+@code{Bar_number_engraver}, @code{Metronome_mark_engraver} or
+@code{Mark_engraver} respectively should be removed from the
+@code{Score} context and placed in the top @code{Staff} context.  If
+this is done, these marks will be given the following default
+@code{outside-staff-priority} values:
 
 @multitable @columnfractions .3 .3
 @headitem Layout Object           @tab Priority
@@ -1798,25 +2028,28 @@ given the following default @code{outside-staff-priority} values:
 @item @code{BarNumber}            @tab @code{ 100}
 @end multitable
 
-If the default values of @code{outside-staff-priority} do not
-give you the placing you want, the priority of any of the objects
-may be overridden.  Suppose we would
-like the ottava bracket to be placed below the text spanner in the
-example above.  All we need to do is to look up the priority of
-@code{OttavaBracket} in the IR or in the tables above, and reduce
-it to a value lower than that of a @code{TextSpanner}, remembering
-that @code{OttavaBracket} is created in the @code{Staff} context:
+If the default values of @code{outside-staff-priority} do not give you
+the placing you want, the priority of any of the objects may be
+overridden.  Suppose we would like the ottava bracket to be placed
+below the text spanner in the example above.  All we need to do is to
+look up the priority of @code{OttavaBracket} in the IR or in the
+tables above, and reduce it to a value lower than that of a
+@code{TextSpanner}, remembering that @code{OttavaBracket} is created
+in the @code{Staff} context:
+
+@cindex TextSpanner, example of overriding
+@cindex bound-details property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 % Set details for later Text Spanner
-\override TextSpanner #'bound-details #'left #'text
+\override TextSpanner #'(bound-details left text)
     = \markup { \small \bold Slower }
 % Place dynamics above staff
 \dynamicUp
 %Place following Ottava Bracket below Text Spanners
 \once \override Staff.OttavaBracket #'outside-staff-priority = #340
 % Start Ottava Bracket
-#(set-octavation 1)
+\ottava #1
 c' \startTextSpan
 % Add Dynamic Text
 c\pp
@@ -1828,10 +2061,37 @@ c c
 % Add Dynamic Text
 c\ff c \stopTextSpan
 % Stop Ottava Bracket
-#(set-octavation 0)
+\ottava #0
 c, c c c
 @end lilypond
 
+@cindex slurs and outside-staff-priority
+@cindex slurs and articulations
+@cindex articulations and slurs
+
+Slurs by default are classed as within-staff objects, but
+they often appear above the staff if the notes to
+which they are attached are high on the staff.  This can push
+outside-staff objects such as articulations too high, as the slur
+will be placed first.  The @code{avoid-slur} property of the
+articulation can be set to @code{'inside} to bring the articulation
+inside the slur, but the @code{avoid-slur} property is effective
+only if the @code{outside-staff-priority} is also set to @code{#f}.
+Alternatively, the @code{outside-staff-priority} of the slur
+can be set to a numerical value to cause it to be placed along with
+other outside-staff objects according to that value.  Here's an
+example showing the effect of the two methods:
+
+@lilypond[quote,verbatim,relative=2]
+c4( c^\markup\tiny\sharp d4.) c8
+c4(
+\once \override TextScript #'avoid-slur = #'inside
+\once \override TextScript #'outside-staff-priority = ##f
+c^\markup\tiny\sharp d4.) c8
+\once \override Slur #'outside-staff-priority = #500
+c4( c^\markup\tiny\sharp d4.) c8
+@end lilypond
+
 Changing the @code{outside-staff-priority} can also be used to
 control the vertical placement of individual objects, although
 the results may not always be desirable.  Suppose we would
@@ -1841,6 +2101,9 @@ All we need to do is to look up the priority of @code{TextScript}
 in the IR or in the tables above, and increase the priority of
 @qq{Text3} to a higher value:
 
+@cindex TextScript, example of overriding
+@cindex outside-staff-priority property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 c2^"Text1"
 c^"Text2"
@@ -1849,20 +2112,23 @@ c^"Text3"
 c^"Text4"
 @end lilypond
 
-This certainly lifts @qq{Text3} above @qq{Text4} but it also
-lifts it above @qq{Text2}, and @qq{Text4} now drops down.
-Perhaps this is not so good.  What we would really like to do
-is to position all the annotation at the same distance above
-the staff?  To do this, we clearly
-will need to space the notes out horizontally to make more
+This certainly lifts @qq{Text3} above @qq{Text4} but it also lifts it
+above @qq{Text2}, and @qq{Text4} now drops down.  Perhaps this is not
+so good.  What we would really like to do is to position all the
+annotation at the same distance above the staff.  To do this, we
+clearly will need to space the notes out horizontally to make more
 room for the text.  This is done using the @code{textLengthOn}
 command.
 
 @subheading \textLengthOn
 
-@funindex \textLengthOn
 @cindex notes, spreading out with text
 
+@funindex \textLengthOn
+@funindex textLengthOn
+@funindex \textLengthOff
+@funindex textLengthOff
+
 By default, text produced by markup takes up no horizontal space
 as far as laying out the music is concerned.  The @code{\textLengthOn}
 command reverses this behavior, causing the notes to be spaced
@@ -1874,18 +2140,23 @@ c2^"Text1"
 c^"Text2"
 c^"Text3"
 c^"Text4"
-@end lilypond  
+@end lilypond
 
-The command to revert to the default behavior is 
+The command to revert to the default behavior is
 @code{\textLengthOff}.  Remember @code{\once} only works with
 @code{\override}, @code{\set}, @code{\revert} or @code{unset},
 so cannot be used with @code{\textLengthOn}.
 
+@cindex markup text, allowing collisions
+
 Markup text will also avoid notes which project above the staff.
 If this is not desired, the automatic displacement upwards may
 be turned off by setting the priority to @code{#f}.  Here's an
 example to show how markup text interacts with such notes.
 
+@cindex TextScript, example of overriding
+@cindex outside-staff-priority property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 % This markup is short enough to fit without collision
 c2^"Tex"
@@ -1910,6 +2181,9 @@ c''2
 
 @subheading Dynamics
 
+@cindex tweaking dynamics placement
+@cindex dynamics, tweaking placement
+
 Dynamic markings will normally be positioned beneath the
 staff, but may be positioned above with the @code{dynamicUp}
 command.  They will be positioned vertically relative to the
@@ -1929,7 +2203,7 @@ ees,2.~\)\mf ees4 r8 |
 
 However, if the notes and attached dynamics are close
 together the automatic placement will avoid collisions
-by displacing later dynamic markings further away, but this may 
+by displacing later dynamic markings further away, but this may
 not be the optimum placement, as this rather artificial example
 shows:
 
@@ -1939,25 +2213,20 @@ a4\f b\mf c\mp b\p
 @end lilypond
 
 @noindent
-Should a similar situation arise in @q{real} music, it may
-be preferable to space out the notes
-a little further, so the dynamic markings can all fit at the
-same vertical distance from the staff.  We were able to do this
-for markup text by using the @code{\textLengthOn} command, but there
-is no equivalent command for dynamic marks.  So we shall have to
-work out how to do this using @code{\override} commands.
+Should a similar situation arise in @q{real} music, it may be
+preferable to space out the notes a little further, so the dynamic
+markings can all fit at the same vertical distance from the staff.  We
+were able to do this for markup text by using the @code{\textLengthOn}
+command, but there is no equivalent command for dynamic marks.  So we
+shall have to work out how to do this using @code{\override} commands.
 
 @subheading Grob sizing
 
 @cindex grob sizing
 @cindex sizing grobs
-@cindex @code{X-offset}
-@cindex @code{Y-offset}
-@cindex @code{X-extent}
-@cindex @code{Y-extent}
 
 First we must learn how grobs are sized.  All grobs have a
-reference point defined within them which is used to position 
+reference point defined within them which is used to position
 them relative to their parent object.  This point in the grob
 is then positioned at a horizontal distance, @code{X-offset},
 and at a vertical distance, @code{Y-offset}, from its parent.
@@ -1965,15 +2234,15 @@ The horizontal extent of the object is given by a pair of
 numbers, @code{X-extent}, which say where the left and right
 edges are relative to the reference point.  The vertical extent
 is similarly defined by a pair of numbers, @code{Y-extent}.
-These are properties of all grobs which support the 
+These are properties of all grobs which support the
 @code{grob-interface}.
 
 @cindex @code{extra-spacing-width}
 
 By default, outside-staff objects are given a width of zero so
 that they may overlap in the horizontal direction.  This is done
-by the trick of adding infinity to the leftmost extent and 
-minus infinity to the rightmost extent by setting the 
+by the trick of adding infinity to the leftmost extent and
+minus infinity to the rightmost extent by setting the
 @code{extra-spacing-width} to @code{'(+inf.0 . -inf.0)}.  So
 to ensure they do not overlap in the horizontal direction we
 must override this value of @code{extra-spacing-width} to
@@ -1987,6 +2256,9 @@ the command to do this for dynamic text:
 @noindent
 Let's see if this works in our previous example:
 
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \dynamicUp
 \override DynamicText #'extra-spacing-width = #'(0 . 0)
@@ -2004,6 +2276,9 @@ more to it.  The units are the space between two staff
 lines, so moving the left edge half a unit to the left and the
 right edge half a unit to the right should do it:
 
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \dynamicUp
 % Extend width by 1 staff space
@@ -2022,14 +2297,20 @@ down with the notes.  The property to do this is
 @section Collisions of objects
 
 @menu
-* Moving objects::              
-* Fixing overlapping notation::  
-* Real music example::          
+* Moving objects::
+* Fixing overlapping notation::
+* Real music example::
 @end menu
 
 @node Moving objects
 @subsection Moving objects
 
+@cindex moving overlapping objects
+@cindex moving colliding objects
+@cindex moving colliding grobs
+@cindex objects, moving colliding
+@cindex grobs, moving colliding
+
 This may come as a surprise, but LilyPond is not perfect.  Some
 notation elements can overlap.  This is unfortunate, but in fact
 rather rare.  Usually the need to move objects is for clarity or
@@ -2050,13 +2331,12 @@ have a choice of only two positions, and neither may be
 suitable.
 
 @item
-The @strong{object properties}, which LilyPond uses
-when positioning layout objects, may be modified using
-@code{\override}.  The advantages
-of making changes to this type of property are (a) that some
-other objects will be moved automatically if necessary to make
-room and (b) the single override can apply to all instances of
-the same type of object.  Such properties include:
+The @strong{object properties}, which LilyPond uses when positioning
+layout objects, may be modified using @code{\override}.  The
+advantages of making changes to this type of property are (a) that
+some other objects will be moved automatically if necessary to make
+room and (b) the single override can apply to all instances of the
+same type of object.  Such properties include:
 
 @itemize
 
@@ -2070,18 +2350,20 @@ This has already been covered in some detail -- see
 @code{padding}, @code{left-padding},
 @code{right-padding}, @code{staff-padding}
 
+@cindex padding
 @cindex left-padding property
 @cindex padding property
 @cindex right-padding property
 @cindex staff-padding property
+
 As an object is being positioned the value of its @code{padding}
-property specifies the gap that must be left between itself and
-the nearest edge of the object against which it is being
-positioned.  Note that it is the @code{padding} value of the object
-@strong{being placed} that is used;
-the @code{padding} value of the object which is already placed is
-ignored.  Gaps specified by @code{padding} can be applied
-to all objects which support the @code{side-position-interface}.
+property specifies the gap that must be left between itself and the
+nearest edge of the object against which it is being positioned.  Note
+that it is the @code{padding} value of the object @strong{being
+placed} that is used; the @code{padding} value of the object which is
+already placed is ignored.  Gaps specified by @code{padding} can be
+applied to all objects which support the
+@code{side-position-interface}.
 
 Instead of @code{padding}, the placement of groups of accidentals
 is controlled by @code{left-padding} and @code{right-padding}.
@@ -2095,23 +2377,21 @@ from the note heads. So only the @code{right-padding} property of the
 of the accidentals.
 
 The @code{staff-padding} property is closely related to the
-@code{padding} property:  @code{padding}
-controls the minimum amount of space between any object which
-supports the @code{side-position-interface} and the nearest
-other object (generally the note or the staff lines);
-@code{staff-padding} applies only to those objects which are always
-set outside the staff -- it controls the minimum amount of space
-that should be inserted between that object and the staff.  Note
-that @code{staff-padding} has no effect on objects which are
-positioned relative to the note rather than the staff, even though
-it may be overridden without error for such objects -- it is simply
-ignored.
-
-To discover which padding property is required for the object
-you wish to reposition, you
-need to return to the IR and look up the object's properties.
-Be aware that the padding properties might not be located in the
-obvious object, so look in objects that appear to be related.
+@code{padding} property: @code{padding} controls the minimum amount of
+space between any object which supports the
+@code{side-position-interface} and the nearest other object (generally
+the note or the staff lines); @code{staff-padding} applies only to
+those objects which are always set outside the staff -- it controls
+the minimum amount of space that should be inserted between that
+object and the staff.  Note that @code{staff-padding} has no effect on
+objects which are positioned relative to the note rather than the
+staff, even though it may be overridden without error for such objects
+-- it is simply ignored.
+
+To discover which padding property is required for the object you wish
+to reposition, you need to return to the IR and look up the object's
+properties.  Be aware that the padding properties might not be located
+in the obvious object, so look in objects that appear to be related.
 
 All padding values are measured in staff spaces.  For most
 objects, this value is set by default to be around 1.0 or less
@@ -2122,14 +2402,15 @@ objects, this value is set by default to be around 1.0 or less
 @code{self-alignment-X}
 
 @cindex self-alignment-X property
+
 This property can be used to align the object to the left, to
-the right, or to center it with respect to the parent object's 
+the right, or to center it with respect to the parent object's
 reference point.  It may be used with all objects which support
 the @code{self-alignment-interface}.  In general these are objects
 that contain text.  The values are @code{LEFT}, @code{RIGHT}
-or @code{CENTER}.  Alternatively, a numerical value between 
-@code{-1} and @code{+1} may be specified, where @code{-1} is 
-left-aligned, @code{+1} is right-aligned, and numbers in between 
+or @code{CENTER}.  Alternatively, a numerical value between
+@code{-1} and @code{+1} may be specified, where @code{-1} is
+left-aligned, @code{+1} is right-aligned, and numbers in between
 move the text progressively from left-aligned to right-aligned.
 Numerical values greater than @code{1} may be specified to move
 the text even further to the left, or less than @code{-1} to
@@ -2140,6 +2421,7 @@ in the value corresponds to a movement of half the text's length.
 @code{extra-spacing-width}
 
 @cindex extra-spacing-width property
+
 This property is available for all objects which support the
 @code{item-interface}.  It takes two numbers, the first is added
 to the leftmost extent and the second is added to the rightmost
@@ -2153,6 +2435,7 @@ notice of the first (left edge) number.
 @code{staff-position}
 
 @cindex staff-position property
+
 @code{staff-position} is a property of the
 @code{staff-symbol-referencer-interface}, which is supported by
 objects which are positioned relative to the staff.  It specifies
@@ -2172,48 +2455,48 @@ columns to prevent the note heads overlapping.  These are called
 note columns, and an object called @code{NoteColumn} is created
 to lay out the notes in that column.
 
-The @code{force-hshift}
-property is a property of a @code{NoteColumn} (actually of the
-@code{note-column-interface}).  Changing it permits a note column
-to be moved in units appropriate to a note column, viz. the note
-head width of the first voice note.  It should be used in
-complex situations where the normal @code{\shiftOn} commands (see
-@ref{Explicitly instantiating voices}) do
-not resolve the note conflict.  It is preferable to the
-@code{extra-offset} property for this purpose as there is no need
-to work out the distance in staff-spaces, and moving the notes
-into or out of a @code{NoteColumn} affects other actions such as
-merging note heads.
+The @code{force-hshift} property is a property of a @code{NoteColumn}
+(actually of the @code{note-column-interface}).  Changing it permits a
+note column to be moved in units appropriate to a note column,
+viz. the note head width of the first voice note.  It should be used
+in complex situations where the normal @code{\shiftOn} commands (see
+@ref{Explicitly instantiating voices}) do not resolve the note
+conflict.  It is preferable to the @code{extra-offset} property for
+this purpose as there is no need to work out the distance in
+staff-spaces, and moving the notes into or out of a @code{NoteColumn}
+affects other actions such as merging note heads.
 
 @end itemize
 
 @item
 Finally, when all else fails, objects may be manually repositioned
-relative to the staff center line vertically, or by
-displacing them by any distance to a new position.  The
-disadvantages are that the correct values for the repositioning
-have to be worked out, often by trial and error, for every object
-individually, and, because the movement is done after LilyPond has
-placed all other objects, the user is responsible for avoiding any
-collisions that might ensue.  But the main difficulty with this
-approach is that the repositioning values may need to be reworked
-if the music is later modified.  The properties that can be used
-for this type of manual repositioning are:
+relative to the staff center line vertically, or by displacing them by
+any distance to a new position.  The disadvantages are that the
+correct values for the repositioning have to be worked out, often by
+trial and error, for every object individually, and, because the
+movement is done after LilyPond has placed all other objects, the user
+is responsible for avoiding any collisions that might ensue.  But the
+main difficulty with this approach is that the repositioning values
+may need to be reworked if the music is later modified.  The
+properties that can be used for this type of manual repositioning are:
 
 @table @code
 @item extra-offset
+
 @cindex extra-offset property
-This property applies to any layout object
-supporting the @code{grob-interface}.  It takes a pair of
-numbers which specify the extra displacement in the horizontal and
-vertical directions.  Negative numbers move the object to
-the left or down.  The units are staff-spaces.  The extra
-displacement is made after the typesetting of objects is
-finished, so an object may be repositioned anywhere without
+
+This property applies to any layout object supporting the
+@code{grob-interface}.  It takes a pair of numbers which specify the
+extra displacement in the horizontal and vertical directions.
+Negative numbers move the object to the left or down.  The units are
+staff-spaces.  The extra displacement is made after the typesetting of
+objects is finished, so an object may be repositioned anywhere without
 affecting anything else.
 
 @item positions
+
 @cindex positions property
+
 This is most useful for manually adjusting the slope and height
 of beams, slurs, and tuplets.   It takes a pair of numbers
 giving the position of the left and right ends of the beam, slur,
@@ -2259,18 +2542,27 @@ Let's now see how the properties in the previous section can
 help to resolve overlapping notation.
 
 @subheading padding property
-@cindex padding property
+
+@cindex padding
+@cindex fixing overlapping notation
+@cindex overlapping notation
 
 The @code{padding} property can be set to increase
 (or decrease) the distance between symbols that are printed
 above or below notes.
 
+@cindex Script, example of overriding
+@cindex padding property, example
+
 @lilypond[quote,fragment,relative=1,verbatim]
 c2\fermata
 \override Script #'padding = #3
 b2\fermata
 @end lilypond
 
+@cindex MetronomeMark, example of overriding
+@cindex padding property, example
+
 @lilypond[quote,fragment,relative=1,verbatim]
 % This will not work, see below:
 \override MetronomeMark #'padding = #3
@@ -2284,8 +2576,7 @@ d1
 
 Note in the second example how important it is to figure out what
 context handles a certain object.  Since the @code{MetronomeMark}
-object
-is handled in the @code{Score} context, property changes in the
+object is handled in the @code{Score} context, property changes in the
 @code{Voice} context will not be noticed.  For more details, see
 @ruser{Modifying properties}.
 
@@ -2296,6 +2587,7 @@ objects outside it are moved.
 
 
 @subheading left-padding and right-padding
+
 @cindex left-padding property
 @cindex right-padding property
 
@@ -2320,6 +2612,12 @@ One way of achieving this is to override the accidental stencil
 with a markup containing the natural and flat symbols in the
 order we would like, like this:
 
+@cindex Accidental, example of overriding
+@cindex text property, example
+@cindex stencil property, example
+@cindex AccidentalPlacement, example of overriding
+@cindex right-padding property, example
+
 @lilypond[quote,ragged-right,verbatim]
 naturalplusflat = \markup { \natural \flat }
 \relative c'' {
@@ -2335,24 +2633,30 @@ naturalplusflat = \markup { \natural \flat }
 This necessarily uses an override for the accidental stencil which
 will not be covered until later.  The stencil type must be a
 procedure, here changed to print the contents of the @code{text}
-property of @code{Accidental}, which itself is set to be a natural 
-sign followed by a flat sign.  These are then moved further away 
+property of @code{Accidental}, which itself is set to be a natural
+sign followed by a flat sign.  These are then moved further away
 from the note head by overriding @code{right-padding}.
 
 @noindent
 
 @subheading staff-padding property
-@cindex staff-padding property
+
+@cindex aligning objects on a baseline
+@cindex objects, aligning on a baseline
 
 @code{staff-padding} can be used to align objects such as dynamics
-along a baseline at a fixed height above the staff, rather than
-at a height dependent on the position of the note to which they
-are attached.  It is not a property of
-@code{DynamicText} but of @code{DynamicLineSpanner}.
-This is because the baseline should apply equally to @strong{all}
-dynamics, including those created as extended spanners.
-So this is the way to align the dynamic marks in the example
-taken from the previous section:
+along a baseline at a fixed height above the staff, rather than at a
+height dependent on the position of the note to which they are
+attached.  It is not a property of @code{DynamicText} but of
+@code{DynamicLineSpanner}.  This is because the baseline should apply
+equally to @strong{all} dynamics, including those created as extended
+spanners.  So this is the way to align the dynamic marks in the
+example taken from the previous section:
+
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+@cindex DynamicLineSpanner, example of overriding
+@cindex staff-padding property, example
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \dynamicUp
@@ -2365,12 +2669,14 @@ a4\f b\mf c\mp b\p
 
 
 @subheading self-alignment-X property
-@cindex self-alignment-X property
 
 The following example shows how this can resolve the collision
 of a string fingering object with a note's stem by aligning the
 right edge with the reference point of the parent note:
 
+@cindex StringNumber, example of overriding
+@cindex self-alignment-X property, example
+
 @lilypond[quote,fragment,ragged-right,verbatim,relative=3]
 \voiceOne
 < a \2 >
@@ -2379,7 +2685,8 @@ right edge with the reference point of the parent note:
 @end lilypond
 
 @subheading staff-position property
-@cindex staff-position property
+
+@cindex object collision within a staff
 
 Multimeasure rests in one voice can collide with notes in another.
 Since these rests are typeset centered between the bar lines, it
@@ -2393,13 +2700,14 @@ example of a collision of this type:
 << {c c c c} \\ {R1} >>
 @end lilypond
 
-The best solution here is to move the multimeasure rest down,
-since the rest is in voice two.
-The default in @code{\voiceTwo} (i.e. in the second voice of a
-@code{<<@{...@} \\ @{...@}>>} construct)
-is that @code{staff-position} is set to -4 for MultiMeasureRest,
-so we need to move it, say, four half-staff spaces down to
-@code{-8}.
+The best solution here is to move the multimeasure rest down, since
+the rest is in voice two.  The default in @code{\voiceTwo} (i.e. in
+the second voice of a @code{<<@{...@} \\ @{...@}>>} construct) is that
+@code{staff-position} is set to -4 for MultiMeasureRest, so we need to
+move it, say, four half-staff spaces down to @code{-8}.
+
+@cindex MultiMeasureRest, example of overriding
+@cindex staff-position property, example
 
 @lilypond[quote,verbatim,fragment,ragged-right, relative=1]
 <<
@@ -2414,7 +2722,11 @@ This is better than using, for example, @code{extra-offset},
 because the ledger line above the rest is inserted automatically.
 
 @subheading extra-offset property
-@cindex extra-offset property
+
+@cindex positioning objects
+@cindex positioning grobs
+@cindex objects, positioning
+@cindex grobs, positioning
 
 The @code{extra-offset} property provides complete control over the
 positioning of an object both horizontally and vertically.
@@ -2422,6 +2734,9 @@ positioning of an object both horizontally and vertically.
 In the following example, the second fingering is moved a little to
 the left, and 1.8 staff space downwards:
 
+@cindex Fingering, example of overriding
+@cindex extra-offset property, example
+
 @lilypond[quote,fragment,relative=1,verbatim]
 \stemUp
 f-5
@@ -2432,12 +2747,18 @@ f-5
 
 
 @subheading positions property
-@cindex positions property
+
+@cindex controlling tuplets, slurs, phrasing slurs, and beams manually
+@cindex manually controlling tuplets, slurs, phrasing slurs, and beams
+@cindex tuplet beams, controlling manually
+@cindex slurs, controlling manually
+@cindex phrasing slurs, controlling manually
+@cindex beams, controlling manually
 
 The @code{positions} property allows the position and slope of
- tuplets, slurs, phrasing slurs and beams to be controlled
-manually.  Here's an example which has an ugly phrasing slur
-due to its trying to avoid the slur on the acciaccatura.
+tuplets, slurs, phrasing slurs and beams to be controlled manually.
+Here's an example which has an ugly phrasing slur due to its trying to
+avoid the slur on the acciaccatura.
 
 @lilypond[quote,verbatim,fragment,ragged-right,relative=1]
 r4  \acciaccatura e8\( d8 c ~c d c d\)
@@ -2454,11 +2775,14 @@ r4
 @end lilypond
 
 @noindent
-but if there were some reason why this could not be done the
+But if there were some reason why this could not be done the
 other alternative would be to move the left end of the phrasing
 slur down a little using the @code{positions} property.  This
 also resolves the rather nasty shape.
 
+@cindex PhrasingSlur, example of overriding
+@cindex positions property, example
+
 @lilypond[quote,verbatim,fragment,ragged-right,relative=1]
 r4
 \once \override PhrasingSlur #'positions = #'(-4 . -3)
@@ -2483,6 +2807,9 @@ This can be resolved by manually moving both ends of the beam
 up from their position at 2 staff-spaces above the center line to,
 say, 3:
 
+@cindex Beam, example of overriding
+@cindex positions property, example
+
 @lilypond[quote,verbatim,fragment,ragged-right]
 {
   \clef "bass"
@@ -2502,7 +2829,7 @@ the second block of quavers, but not to any of the beams in the
 second voice.
 
 @subheading force-hshift property
-@cindex force-hshift property
+
 @c FIXME: formatting stuff  (ie not important right now IMO)
 @c @a nchor Chopin finally corrected TODOgp
 
@@ -2526,18 +2853,20 @@ was left looking like this:
 @end lilypond
 
 @noindent
-The lower two notes of the first chord (i.e,
-those in the third voice) should not be shifted away from the
-note column of the higher two notes.  To correct this we set
-@code{force-hshift}, which is a property of
-@code{NoteColumn}, of these notes to zero.
-The lower note of the second chord is best placed just to the
-right of the higher notes.  We achieve this by setting
-@code{force-hshift} of this note to 0.5, ie half a note head's
-width to the right of the note column of the higher notes.
+The lower two notes of the first chord (i.e, those in the third voice)
+should not be shifted away from the note column of the higher two
+notes.  To correct this we set @code{force-hshift}, which is a
+property of @code{NoteColumn}, of these notes to zero.  The lower note
+of the second chord is best placed just to the right of the higher
+notes.  We achieve this by setting @code{force-hshift} of this note to
+0.5, ie half a note head's width to the right of the note column of
+the higher notes.
 
 Here's the final result:
 
+@cindex NoteColumn, example of overriding
+@cindex force-hshift property, example
+
 @lilypond[quote,verbatim,fragment,ragged-right]
 \new Staff \relative c'' {
   \key aes \major
@@ -2572,6 +2901,7 @@ over-complicating the example too much we have left out the
 dynamics, fingering and pedalling.
 
 @c The following should appear as music without code
+@c This example should not be indexed
 @lilypond[quote,ragged-right]
 rhMusic = \relative c'' {
   r2
@@ -2676,15 +3006,13 @@ lhMusic = \relative c' {
 }
 @end lilypond
 
-All the notes are right, but the appearance is far from
-satisfactory.  The tie clashes with the change in time signature,
-the beaming in the third bar is wrong, the notes are not
-merged together, and several notation elements are missing.
-Let's first deal with the easier things.
-We can correct the beaming by inserting a beam
-manually, and we can easily add the left hand slur and the right
-hand phrasing slur, since these were all covered in the Tutorial.
-Doing this gives:
+All the notes are right, but the appearance is far from satisfactory.
+The tie clashes with the change in time signature, the beaming in the
+third bar is wrong, the notes are not merged together, and several
+notation elements are missing.  Let's first deal with the easier
+things.  We can correct the beaming by inserting a beam manually, and
+we can easily add the left hand slur and the right hand phrasing slur,
+since these were all covered in the Tutorial.  Doing this gives:
 
 @lilypond[quote,verbatim,ragged-right]
 rhMusic = \relative c'' {
@@ -2727,22 +3055,21 @@ lhMusic = \relative c' {
 }
 @end lilypond
 
-The first bar is now correct.  The second bar contains an arpeggio
-and is terminated by a double bar line.  How do we do these, as they
-have not been mentioned in this Learning Manual?  This is where
-we need to turn to the Notation Reference.  Looking up @q{arpeggio}
-and @q{bar line} in the
-index quickly shows us that an arpeggio is produced by appending
-@code{\arpeggio} to a chord, and a double bar line is produced by
-the @code{\bar "||"} command.  That's easily done.  We next need
-to correct the collision of the tie with the time signature.  This
-is best done by moving the tie upwards.  Moving objects was covered
-earlier in @ref{Moving objects}, which says that objects positioned
-relative to the staff can be moved by overriding their
+The first bar is now correct.  The second bar contains an arpeggio and
+is terminated by a double bar line.  How do we do these, as they have
+not been mentioned in this Learning Manual?  This is where we need to
+turn to the Notation Reference.  Looking up @q{arpeggio} and @q{bar
+line} in the index quickly shows us that an arpeggio is produced by
+appending @code{\arpeggio} to a chord, and a double bar line is
+produced by the @code{\bar "||"} command.  That's easily done.  We
+next need to correct the collision of the tie with the time signature.
+This is best done by moving the tie upwards.  Moving objects was
+covered earlier in @ref{Moving objects}, which says that objects
+positioned relative to the staff can be moved by overriding their
 @code{staff-position} property, which is specified in half staff
 spaces relative to the center line of the staff.  So the following
-override placed just before the first tied note would move the tie
-up to 3.5 half staff spaces above the center line:
+override placed just before the first tied note would move the tie up
+to 3.5 half staff spaces above the center line:
 
 @code{\once \override Tie #'staff-position = #3.5}
 
@@ -2791,17 +3118,16 @@ lhMusic = \relative c' {
 }
 @end lilypond
 
-On to bar three and the start of the Moderato section.  The
-tutorial showed how to add embolded text with the @code{\markup}
-command, so adding @q{Moderato} in bold is easy.
-But how do we merge notes in different voices together?  This is
-where we need to turn to the Notation Reference for help.  A search
-for @qq{merge} in the Notation Reference index quickly leads us to
-the commands for merging differently headed and differently
-dotted notes in @ruser{Collision resolution}.  In our
-example we need to merge both types of note for the duration
-of the polyphonic section in bar 3, so using the information
-we find in the Notation Reference we add
+On to bar three and the start of the Moderato section.  The tutorial
+showed how to add embolded text with the @code{\markup} command, so
+adding @q{Moderato} in bold is easy.  But how do we merge notes in
+different voices together?  This is where we need to turn to the
+Notation Reference for help.  A search for @qq{merge} in the Notation
+Reference index quickly leads us to the commands for merging
+differently headed and differently dotted notes in @ruser{Collision
+resolution}.  In our example we need to merge both types of note for
+the duration of the polyphonic section in bar 3, so using the
+information we find in the Notation Reference we add
 
 @example
 \mergeDifferentlyHeadedOn
@@ -2881,6 +3207,9 @@ respectively.  So we have to shift the C a further level still
 using @code{\shiftOnn} to avoid it interfering with the two D's.
 Applying these changes gives:
 
+@cindex Tie, example of overriding
+@cindex staff-position property, example
+
 @lilypond[quote,verbatim,ragged-right]
 rhMusic = \relative c'' {
   r2 c4.\( g8 |
@@ -2936,6 +3265,11 @@ to the right of the D's.  We know how to do both of these from the
 earlier tweaks: we make the stem transparent, and move the C with
 the @code{force-hshift} property.  Here's the final result:
 
+@cindex NoteColumn, example of overriding
+@cindex force-hshift property, example
+@cindex Stem, example of overriding
+@cindex transparent property, example
+
 @lilypond[quote,verbatim,ragged-right]
 rhMusic = \relative c'' {
   r2
@@ -2996,7 +3330,7 @@ lhMusic = \relative c' {
 * Using variables for tweaks::
 * Other sources of information::
 * Avoiding tweaks with slower processing::
-* Advanced tweaks with Scheme::  
+* Advanced tweaks with Scheme::
 @end menu
 
 @node Other uses for tweaks
@@ -3007,7 +3341,9 @@ lhMusic = \relative c' {
 @cindex removing objects
 @cindex objects, removing
 @cindex hiding objects
+@cindex objects, hiding
 @cindex invisible objects
+@cindex objects, invisible
 @cindex tying notes across voices
 
 @subheading Tying notes across voices
@@ -3027,6 +3363,9 @@ with the tied notes in one of them
 and blanking the first up-stem in that voice, the tie appears to
 cross voices:
 
+@cindex Stem, example of overriding
+@cindex transparent property, example
+
 @lilypond[quote,fragment,relative=2,verbatim]
 <<
   {
@@ -3075,6 +3414,9 @@ the positions of adjacent annotations on the staff.  So setting
 its @code{stencil} property to @code{#f} would be the best way.
 We show here the effect of the two methods:
 
+@cindex MetronomeMark, example of overriding
+@cindex transparent property, example
+
 @lilypond[quote,verbatim,ragged-right]
 \score {
   \relative c'' {
@@ -3094,6 +3436,9 @@ We show here the effect of the two methods:
 }
 @end lilypond
 
+@cindex MetronomeMark, example of overriding
+@cindex stencil property, example
+
 @lilypond[quote,verbatim,ragged-right]
 \score {
   \relative c'' {
@@ -3115,7 +3460,7 @@ We show here the effect of the two methods:
 
 @noindent
 Both methods remove the metronome mark which lengthens the fermata
-from the printed output, and both affect the MIDI timing as 
+from the printed output, and both affect the MIDI timing as
 required, but the transparent metronome mark in the first line
 forces the following tempo indication too high while the
 second (with the stencil removed) does not.
@@ -3123,15 +3468,21 @@ second (with the stencil removed) does not.
 @node Using variables for tweaks
 @subsection Using variables for tweaks
 
+@cindex variables, using for tweaks
+@cindex using variables for tweaks
+@cindex tweaks, using variables for
+
 Override commands are often long and tedious to type, and they
 have to be absolutely correct.  If the same overrides are to be
 used many times it may be worth defining variables to hold them.
+
 Suppose we wish to emphasize certain words in lyrics by printing
 them in bold italics.  The @code{\italic} and @code{\bold}
-commands only work within lyrics if they are also embedded in
-@code{\markup}, which makes them tedious to enter, so as an
-alternative can we instead use the @code{\override} and 
-@code{\revert} commands?
+commands only work within lyrics if they are embedded, together with
+the word or words to be modified, within a @code{\markup} block,
+which makes them tedious to enter.  The need to embed the words
+themselves prevents their use in simple variables.  As an
+alternative can we use @code{\override} and @code{\revert} commands?
 
 @example
 @code{\override Lyrics . LyricText #'font-shape = #'italic}
@@ -3142,19 +3493,26 @@ alternative can we instead use the @code{\override} and
 @end example
 
 These would also be extremely tedious to enter if there were many
-words requiring emphasis.  So instead we define these as two
-variables, and use them as follows, although normally we would
-perhaps choose shorter names for the variables to make them
-quicker to type:
+words requiring emphasis.  But we @emph{can} define these as two
+variables and use those to bracket the words to be emphasized.
+Another advantage of using variables for these overrides is that
+the spaces around the dot are not necessary, since they are not
+being interpreted in @code{\lyricmode} directly.  Here's an example
+of this, although in practice  we would choose shorter names
+for the variables to make them quicker to type:
+
+@cindex LyricText, example of overriding
+@cindex font-shape property, example
+@cindex font-series property, example
 
 @lilypond[quote,verbatim]
 emphasize = {
-  \override Lyrics . LyricText #'font-shape = #'italic
-  \override Lyrics . LyricText #'font-series = #'bold
+  \override Lyrics.LyricText #'font-shape = #'italic
+  \override Lyrics.LyricText #'font-series = #'bold
 }
 normal = {
-  \revert Lyrics . LyricText #'font-shape
-  \revert Lyrics . LyricText #'font-series
+  \revert Lyrics.LyricText #'font-shape
+  \revert Lyrics.LyricText #'font-series
 }
 
 global = { \time 4/4 \partial 4 \key c \major}
@@ -3200,7 +3558,7 @@ of this directory depends (a) on whether you obtained LilyPond
 by downloading a precompiled binary from lilypond.org
 or whether you installed it from a package manager (i.e.
 distributed with Linux, or installed under fink or cygwin) or
-compiled it from source, and (b) on which operating system it is 
+compiled it from source, and (b) on which operating system it is
 being used:
 
 @strong{Downloaded from lilypond.org}
@@ -3245,7 +3603,7 @@ Within this directory the two interesting subdirectories are
 Let's begin by looking at some files in @file{ly/}.
 Open @file{ly/property-init.ly} in a text editor.  The one
 you normally use for @code{.ly} files will be fine.  This file
-contains the definitions of all the standard LilyPond built-in
+contains the definitions of all the standard LilyPond predefined
 commands, such as @code{\stemUp} and @code{\slurDotted}.  You will
 see that these are nothing more than definitions of variables
 containing one or a group of @code{\override} commands.  For
@@ -3258,7 +3616,7 @@ tieDotted = @{
 @}
 @end example
 
-If you do not like the default values these built-in commands can
+If you do not like the default values these predefined commands can
 be redefined easily, just like any other variable, at the
 head of your input file.
 
@@ -3270,12 +3628,14 @@ The following are the most useful files to be found in
   @tab Contents
 @item @file{ly/engraver-init.ly}
   @tab Definitions of engraver Contexts
-@item @file{ly/paper-defaults.ly}
+@item @file{ly/paper-defaults-init.ly}
   @tab Specifications of paper-related defaults
 @item @file{ly/performer-init.ly}
   @tab Definitions of performer Contexts
 @item @file{ly/property-init.ly}
-  @tab Definitions of all common built-in commands
+  @tab Definitions of all common predefined commands
+@item @file{ly/spanner-init.ly}
+  @tab Definitions of spanner-related predefined commands
 @end multitable
 
 Other settings (such as the definitions of markup commands) are
@@ -3356,6 +3716,10 @@ determined by the procedure at the time it is called.  In this
 example we color the note head in accordance with its position on
 the staff.
 
+@cindex x11-color function, example of using
+@cindex NoteHead, example of overriding
+@cindex color property, setting to Scheme procedure
+
 @lilypond[quote,verbatim,ragged-right]
 #(define (color-notehead grob)
   "Color the notehead according to its position on the staff."
@@ -3376,9 +3740,9 @@ the staff.
 \relative c' {
   % Arrange to obtain color from color-notehead procedure
   \override NoteHead #'color = #color-notehead
-  c2 c' | 
-  b4 g8 a b4 c | 
-  c,2 a' | 
+  c2 c' |
+  b4 g8 a b4 c |
+  c,2 a' |
   g1 |
 }
 \addlyrics {