]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/tweaks.itely
Merge master into nested-bookparts
[lilypond.git] / Documentation / user / tweaks.itely
index 8094700d479adda04146896bbad6d574f85a9d7f..7ded056e0c9de45af6d159478e33ead98c31b81b 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.11.61"
 
 @node Tweaking output
 @chapter Tweaking output
@@ -713,13 +713,12 @@ properties and placed in an @strong{Interface}, the
 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
@@ -744,18 +743,17 @@ 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"}.
+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}.
 
 Ok, so the @code{\override} command we need to print the lyrics
 in italics should be
@@ -811,6 +809,11 @@ 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
 
@@ -837,15 +840,16 @@ 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
@@ -868,15 +872,20 @@ 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
 
@@ -900,17 +909,16 @@ 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.
+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,
@@ -1601,17 +1609,19 @@ followed after the affected note by the corresponding
 @subheading Fingering
 @cindex fingering, placement
 
-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]
+@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
@@ -1619,22 +1629,43 @@ 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:
+
+@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]
+@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 overriden to manually force all or any of the
+individual fingering numbers above or below:
+
+@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])}
@@ -1646,20 +1677,20 @@ 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:
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
@@ -1678,7 +1709,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}