]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/changing-defaults.itely
Removes '-signs from vectors
[lilypond.git] / Documentation / notation / changing-defaults.itely
index 79467fbbc05e2ff34bc3a925b8ec000a5a3173ac..bc7a7b7b527ffd5d84548086fed92b7047dd5cfd 100644 (file)
@@ -1909,29 +1909,12 @@ association list.  See @file{scm/define-grobs.scm}
 to see the settings for each grob description.  Grob descriptions
 are modified with @code{\override}.
 
-@code{\override} is actually a shorthand;
+The syntax for the @code{\override} command is
 
 @example
-\override @var{context}.@var{GrobName} #'@var{property} = #@var{value}
+\override [@var{context}.]@var{GrobName}.@var{property} = #@var{value}
 @end example
 
-@noindent
-is more or less equivalent to
-
-@c  leave this long line -gp
-@example
-\set @var{context}.@var{GrobName}  =
-  #(cons (cons '@var{property} @var{value})
-         <previous value of @var{context}.@var{GrobName}>)
-@end example
-
-The value of @code{context}.@code{GrobName} (the alist) is used to initialize
-the properties of individual grobs.  Grobs have
-properties, named in Scheme style, with
-@code{dashed-words}.  The values of grob properties change
-during the formatting process: formatting basically amounts
-to computing properties using callback functions.
-
 For example, we can increase the thickness of a note stem by
 overriding the @code{thickness} property of the @code{Stem}
 object:
@@ -1959,11 +1942,33 @@ context is used:
 }
 @end lilypond
 
+Some tweakable options are called @q{subproperties} and reside inside
+properties.  To tweak those, use commands in the form
+
+@example
+\override Stem.details.beamed-lengths = #'(4 4 3)
+@end example
+
+or to modify the ends of spanners, use a form like these
+
+@example
+\override TextSpanner.bound-details.left.text = #"left text"
+\override TextSpanner.bound-details.right.text = #"right text"
+@end example
+
 @funindex \revert
 @cindex reverting overrides
 @cindex overrides, reverting
 
-The effects of @code{\override} can be undone by @code{\revert}:
+The effects of @code{\override} can be undone by @code{\revert}.
+
+The syntax for the @code{\revert} command is
+
+@example
+\revert [@var{context}.]@var{GrobName}.@var{property}
+@end example
+
+For example,
 
 @lilypond[quote,verbatim,relative=2]
 c4
@@ -2031,13 +2036,6 @@ To construct this tweak we must determine these bits of information:
 @item a sensible value: here @code{3.0}.
 @end itemize
 
-Some tweakable options are called @q{subproperties} and reside inside
-properties.  To tweak those, use commands in the form
-
-@example
-\override Stem.details.beamed-lengths = #'(4 4 3)
-@end example
-
 @cindex internal documentation
 @cindex finding graphical objects
 @cindex graphical object descriptions
@@ -2074,7 +2072,7 @@ accomplished with the @code{\tweak} command, which has the following
 syntax:
 
 @example
-\tweak @var{layout-object} #'@var{grob-property} @var{value}
+\tweak [@var{layout-object}.]@var{grob-property} @var{value}
 @end example
 
 Specifying @var{layout-object} is optional.
@@ -2101,7 +2099,7 @@ For example:
 
 
 
-But the main use of the @code{\tweak} command is to modify just
+The main use of the @code{\tweak} command is to modify just
 one of a number of notation elements which start at the same musical
 moment, like the notes of a chord, or tuplet brackets which start
 at the same time.
@@ -2196,8 +2194,9 @@ beams or accidentals, since these are generated later by
 @code{NoteHead} layout objects rather than by music elements in the
 input stream.
 
-Such indirectly created layout objects can be tweaked using the explicit
-form of the @code{\tweak} command:
+Such indirectly created layout objects can be tweaked using the form
+of the @code{\tweak} command in which the grob name is specified
+explicitly:
 
 @lilypond[relative=2,verbatim,quote]
 \tweak Stem.color #red
@@ -2506,7 +2505,13 @@ left, right or center; etc.  Most of these choices may be left to
 be determined automatically by LilyPond, but in some cases it may
 be desirable to force a particular direction or placement.
 
-@strong{Articulation direction indicators}
+@menu
+* Articulation direction indicators::
+* The direction property::
+@end menu
+
+@node Articulation direction indicators
+@unnumberedsubsubsec Articulation direction indicators
 
 By default some directions are always up or always down (e.g.
 dynamics or fermata), while other things can alternate between
@@ -2539,7 +2544,8 @@ c2( c)
 c2^( c)
 @end lilypond
 
-@strong{The direction property}
+@node The direction property
+@unnumberedsubsubsec The direction property
 
 The position or direction of many layout objects is controlled by the
 @code{direction} property.
@@ -2709,11 +2715,17 @@ All spanners support the @code{spanner-interface}.  A few, essentially
 those that draw a straight line between the two objects, support in
 addition the @code{line-spanner-interface}.
 
+@menu
+* Using the spanner-interface::
+* Using the line-spanner-interface::
+@end menu
+
+@node Using the spanner-interface
 @unnumberedsubsubsec Using the @code{spanner-interface}
 
 This interface provides two properties that apply to several spanners.
 
-@strong{@i{The @code{minimum-length} property}}
+@subsubsubheading The @code{minimum-length} property
 
 The minimum length of the spanner is specified by the
 @code{minimum-length} property.  Increasing this usually has the
@@ -2817,7 +2829,7 @@ e8 e e e
 e8 e e e
 @end lilypond
 
-@strong{@i{The @code{to-barline} property}}
+@subsubsubheading The @code{to-barline} property
 
 The second useful property of the @code{spanner-interface} is
 @code{to-barline}.  By default this is true, causing hairpins and
@@ -2837,6 +2849,7 @@ setting it to @code{#t} has no effect on slurs or phrasing slurs
 or on other spanners for which terminating on the bar line would
 not be meaningful.
 
+@node Using the line-spanner-interface
 @unnumberedsubsubsec Using the @code{line-spanner-interface}
 
 Objects which support the @code{line-spanner-interface} include
@@ -3166,8 +3179,7 @@ default setting of this property:
 @item @code{Clef}                @tab @code{Staff}          @tab @code{begin-of-line-visible}
 @item @code{Custos}              @tab @code{Staff}          @tab @code{end-of-line-visible}
 @item @code{DoublePercentRepeat} @tab @code{Voice}          @tab @code{begin-of-line-invisible}
-@c omit KeyCancellation until it can be explained -td
-@c @item @code{KeyCancellation}  @tab ??             @tab @code{begin-of-line-invisible}
+@item @code{KeyCancellation}     @tab @code{Staff}          @tab @code{begin-of-line-invisible}
 @item @code{KeySignature}        @tab @code{Staff}          @tab @code{begin-of-line-visible}
 @c omit LeftEdge until it can be explained -td
 @c @item @code{LeftEdge}         @tab @code{Score}          @tab @code{center-invisible}
@@ -3184,7 +3196,7 @@ visibility of bar lines:
 f4 g a b
 f4 g a b
 % Remove bar line at the end of the current line
-\once \override Score.BarLine.break-visibility = #'#(#f #t #t)
+\once \override Score.BarLine.break-visibility = ##(#f #t #t)
 \break
 f4 g a b
 f4 g a b
@@ -3210,7 +3222,7 @@ all-invisible to suppress.
 @node Special considerations
 @unnumberedsubsubsec Special considerations
 
-@strong{@emph{Visibility following explicit changes}}
+@subsubsubheading Visibility following explicit changes
 
 @cindex key signature, visibility following explicit change
 @cindex explicitKeySignatureVisibility
@@ -3263,9 +3275,9 @@ f4 g a b
 f4 g a b
 @end lilypond
 
-@strong{@emph{Visibility of cautionary accidentals}}
+@subsubsubheading Visibility of cancelling accidentals
 
-To remove the cautionary accidentals printed at an explicit key
+To remove the cancelling accidentals printed at an explicit key
 change, set the Staff context property @code{printKeyCancellation}
 to @code{#f}:
 
@@ -3284,9 +3296,40 @@ f4 g a b
 With these overrides only the accidentals before the notes remain
 to indicate the change of key.
 
+Note that when changing the key to C@tie{}major or A@tie{}minor
+the cancelling accidentals would be the @emph{only} indication of
+the key change.  In this case setting @code{printKeyCancellation} to
+@code{#f} has no effect:
+
+@lilypond[quote,verbatim,relative=1,ragged-right]
+\key g \major
+f4 g a b
+\set Staff.explicitKeySignatureVisibility = #all-invisible
+\set Staff.printKeyCancellation = ##f
+\key c \major
+f4 g a b \break
+f4 g a b
+f4 g a b
+@end lilypond
+
+To suppress the cancelling accidentals even when the key is
+changed to C@tie{}major or A@tie{}minor, override
+the visibility of the @code{KeyCancellation} grob instead:
+
+@lilypond[quote,verbatim,relative=1,ragged-right]
+\key g \major
+f4 g a b
+\set Staff.explicitKeySignatureVisibility = #all-invisible
+\override Staff.KeyCancellation.break-visibility = #all-invisible
+\key c \major
+f4 g a b \break
+f4 g a b
+f4 g a b
+@end lilypond
+
 @c TODO Add visibility of cautionary accidentals before notes
 
-@strong{@emph{Automatic bars}}
+@subsubsubheading Automatic bars
 
 @cindex automaticBars
 @cindex bar lines, suppressing
@@ -3302,7 +3345,7 @@ occur only at explicit @code{\bar} commands.
 
 @c TODO Add example
 
-@strong{@emph{Octavated clefs}}
+@subsubsubheading Octavated clefs
 
 @cindex octavated clefs, visibility of
 @cindex visibility of octavated clefs
@@ -3591,7 +3634,7 @@ to value of @code{direction}.
 @node Using the self-alignment-interface
 @unnumberedsubsubsec Using the @code{self-alignment-interface}
 
-@emph{Self-aligning objects horizontally}
+@subsubsubheading Self-aligning objects horizontally
 
 The horizontal alignment of an object which supports the
 @code{self-alignment-interface} is controlled by the value of
@@ -3626,7 +3669,7 @@ a'
 ^"aligned further to the right"
 @end lilypond
 
-@emph{Self-aligning objects vertically}
+@subsubsubheading Self-aligning objects vertically
 
 Objects may be aligned vertically in an analogous way to aligning
 them horizontally if the @code{Y-offset} property is set to
@@ -3644,7 +3687,7 @@ with the reference point of the parent.  The symbols @code{DOWN},
 @code{CENTER}, and @code{UP} may be substituted for @w{@code{-1}},
 @code{0}, and @code{1}, respectively.
 
-@emph{Self-aligning objects in both directions}
+@subsubsubheading Self-aligning objects in both directions
 
 By setting both @code{X-offset} and @code{Y-offset}, an object may
 be aligned in both directions simultaneously.