]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/changing-defaults.itely
Merge branch 'master' into lilypond/translation
[lilypond.git] / Documentation / notation / changing-defaults.itely
index bbf6a4e0b20964c504f6076bf529b4a1659b2398..4171c5b1e8692334a852c5c350283eb6111f2e89 100644 (file)
@@ -123,8 +123,8 @@ Contexts are arranged hierarchically:
 @node Score - the master of all contexts
 @unnumberedsubsubsec Score - the master of all contexts
 
-This is the top level notation context. No other context can
-contain a Score context. By default the Score context handles
+This is the top level notation context.  No other context can
+contain a Score context.  By default the Score context handles
 the administration of time signatures and makes sure that items
 such as clefs, time signatures, and key-signatures are aligned
 across staves.
@@ -140,7 +140,7 @@ executed.
 @strong{@emph{StaffGroup}}
 
 Groups staves while adding a bracket on the left side, grouping
-the staves together. The bar lines of the contained staves are
+the staves together.  The bar lines of the contained staves are
 connected vertically.  @code{StaffGroup} only consists of a collection
 of staves, with a bracket in front and spanning bar lines.
 
@@ -645,26 +645,32 @@ time signature.
 @cindex polymetric scores
 @cindex Time signatures, multiple
 
-@lilypond[quote,relative=1,ragged-right,verbatim,fragment]
-\new Score \with {
-  \remove "Timing_translator"
-  \remove "Default_bar_line_engraver"
-} <<
+@lilypond[quote,verbatim]
+\score {
+  <<
+    \new Staff \with {
+      \consists "Timing_translator"
+      \consists "Default_bar_line_engraver"
+    } {
+        \time 3/4
+        c4 c c c c c
+    }
   \new Staff \with {
     \consists "Timing_translator"
     \consists "Default_bar_line_engraver"
   } {
-      \time 3/4
+      \time 2/4
       c4 c c c c c
   }
-  \new Staff \with {
-    \consists "Timing_translator"
-    \consists "Default_bar_line_engraver"
-  } {
-       \time 2/4
-       c4 c c c c c
-  }
 >>
+\layout {
+  \context {
+    \Score
+    \remove "Timing_translator"
+    \remove "Default_bar_line_engraver"
+    }
+  }
+}
 @end lilypond
 
 @knownissues
@@ -2320,7 +2326,7 @@ are collectively called @qq{spanners}, and have special properties to control
 their appearance and behaviour.  Some of these properties are common
 to all spanners; others are restricted to a sub-set of the spanners.
 
-All spanners support the @code{spanner-interface}.  A few, esentially
+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}.
 
@@ -2401,7 +2407,7 @@ a
 For some layout objects, the @code{minimum-length} property becomes
 effective only if the @code{set-spacing-rods} procedure is called
 explicitly.  To do this, the @code{springs-and-rods} property should
-be set to @code{ly:spanner::set-spacing-rods}.   For example,
+be set to @code{ly:spanner::set-spacing-rods}.  For example,
 the minimum length of a glissando has no effect unless the
 @code{springs-and-rods} property is set:
 
@@ -2448,7 +2454,7 @@ a \< a a a a \! a a a
 @end lilypond
 
 This property is not effective for all spanners.  For example,
-seting it to @code{#t} has no effect on slurs or phrasing slurs
+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.
 
@@ -2494,7 +2500,7 @@ In case of a line break, the values for the end points are
 specified by the @code{left-broken} and @code{right-broken}
 sub-lists of @code{bound-details}.  For example:
 
-@lilypond[relative=2,ragged-right,verbatim,fragment]
+@lilypond[relative=2,ragged-right,verbatim,quote]
 \override Glissando #'breakable = ##t
 \override Glissando #'(bound-details right-broken Y) = #-3
 c1 \glissando \break
@@ -2549,7 +2555,7 @@ end-point, centered on the line, as defined by the @code{X} and
 or @code{stencil-offset} will move the symbol at the edge vertically
 relative to the end point of the line:
 
-@lilypond[relative=1,fragment,verbatim]
+@lilypond[relative=1,quote,verbatim]
 \override TextSpanner
   #'(bound-details left stencil-align-dir-y) = #-2
 \override TextSpanner
@@ -2963,7 +2969,7 @@ between them, in the style requested.
 Here is an example showing the different line styles available,
 and how to tune them.
 
-@lilypond[relative=2,ragged-right,verbatim,fragment]
+@lilypond[relative=2,ragged-right,verbatim,quote]
 d2 \glissando d'2
 \once \override Glissando #'style = #'dashed-line
 d,2 \glissando d'2
@@ -2980,7 +2986,7 @@ on-the-fly for every graphic object, but it is possible to
 override these:
 
 @c TODO Complete
-@lilypond[relative=2,ragged-right,verbatim,fragment]
+@lilypond[relative=2,ragged-right,verbatim,quote]
 e2 \glissando f
 \once \override Glissando #'(bound-details right Y) = #-2
 e2 \glissando f
@@ -3097,52 +3103,54 @@ Internals Reference:
 @node Aligning objects
 @subsection Aligning objects
 
-Graphical objects which support the @code{self-alignment-interface} and/or
-the @code{side-position-interface} can be
-aligned to a previously placed object in a variety of ways.  For a list of these objects, see
+Graphical objects which support the @code{self-alignment-interface}
+and/or the @code{side-position-interface} can be aligned to a previously
+placed object in a variety of ways.  For a list of these objects, see
 @rinternals{self-alignment-interface} and @rinternals{side-position-interface}.
 
 All graphical objects have a reference point, a horizontal extent and a
 vertical extent.  The horizontal extent is a pair of numbers
 giving the displacements from the reference point of the left and
-right edges, displacements to the left being negative.  The
-vertical extent is a pair of numbers giving the displacement from
-the reference point to the bottom and top edges, displacements down
-being negative.
+right edges, displacements to the left being negative.  The vertical
+extent is a pair of numbers giving the displacement from the reference
+point to the bottom and top edges, displacements down being negative.
 
 An object's position on a staff is given by the values of the
 @code{X-offset} and @code{Y-offset} properties.  The value of
-@code{X-offset} gives the displacement from the x coordinate of
+@code{X-offset} gives the displacement from the X coordinate of
 the reference point of the parent object, and the value of
 @code{Y-offset} gives the displacement from the center line of the
-staff.   The values of @code{X-offset} and
-@code{Y-offset} may be set directly or may be set to be calculated
-by procedures in order to achieve alignment with the parent object
-in several ways.
+staff.  The values of @code{X-offset} and @code{Y-offset} may
+be set directly or may be set to be calculated by procedures in order
+to achieve alignment with the parent object.
 
 @warning{Many objects have special positioning considerations which
 cause any setting of @code{X-offset} or @code{Y-offset} to be
 ignored or modified, even though the object supports the
-@code{self-alignment-interface}.}
+@code{self-alignment-interface}.  Overriding the @code{X-offset}
+or @code{Y-offset} properties to a fixed value causes the respective
+@code{self-alignment} property to be disregarded.}
+
+For example, an accidental can be repositioned vertically by setting
+@code{Y-offset} but any changes to @code{X-offset} have no effect.
 
-For example, an accidental can be repositioned
-vertically by setting @code{Y-offset} but any changes to
-@code{X-offset} have no effect.
+Rehearsal marks may be aligned with breakable objects such as bar
+lines, clef symbols, time signature symbols and key signatures.  There
+are special properties to be found in the @code{break-aligned-interface}
+for positioning rehearsal marks on such objects.
 
-Rehearsal marks may be aligned with
-breakable objects such as bar lines, clef symbols, time signature
-symbols and key signatures.  There are special properties to be
-found in the @code{break-aligned-interface} for positioning rehearsal
-marks on such objects.
+@seealso
+@ref{Using the break-alignable-interface},
+@rextend{Callback functions}.
 
 @menu
-* Setting @code{X-offset} and @code{Y-offset} directly::
-* Using the @code{side-position-interface}::
-* Using the @code{self-alignment-interface}::
-* Using the @code{break-alignable-interface}::
+* Setting X-offset and Y-offset directly::
+* Using the side-position-interface::
+* Using the self-alignment-interface::
+* Using the break-alignable-interface::
 @end menu
 
-@node Setting @code{X-offset} and @code{Y-offset} directly
+@node Setting X-offset and Y-offset directly
 @unnumberedsubsubsec Setting @code{X-offset} and @code{Y-offset} directly
 
 Numerical values may be given to the @code{X-offset} and @code{Y-offset}
@@ -3164,7 +3172,7 @@ a
 
 @c TODO write more
 
-@node Using the @code{side-position-interface}
+@node Using the side-position-interface
 @unnumberedsubsubsec Using the @code{side-position-interface}
 
 An object which supports the @code{side-position-interface} can be
@@ -3205,7 +3213,7 @@ to value of @code{direction}.
 
 @c TODO Add examples
 
-@node Using the @code{self-alignment-interface}
+@node Using the self-alignment-interface
 @unnumberedsubsubsec Using the @code{self-alignment-interface}
 
 @emph{Self-aligning objects horizontally}
@@ -3306,7 +3314,7 @@ example shows the difference:
 
 @c TODO The align-interface, BassFigureAlignment and VerticalAlignment
 
-@node Using the @code{break-alignable-interface}
+@node Using the break-alignable-interface
 @unnumberedsubsubsec Using the @code{break-alignable-interface}
 
 @cindex align to objects
@@ -3322,20 +3330,27 @@ By default, rehearsal marks and bar numbers will be horizontally
 centered above the object:
 
 @lilypond[verbatim,quote,relative=1]
-e1
-% the RehearsalMark will be centered above the Clef
+% The rehearsal mark will be centered above the Clef
 \override Score.RehearsalMark #'break-align-symbols = #'(clef)
 \key a \major
 \clef treble
 \mark "↓"
-e
-% the RehearsalMark will be centered above the TimeSignature
+e1
+% The rehearsal mark will be centered above the Time Signature
 \override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
 \key a \major
 \clef treble
 \time 3/4
 \mark "↓"
 e2.
+% The rehearsal mark will be centered above the Breath Mark
+\override Score.RehearsalMark #'break-align-symbols = #'(breathing-sign)
+\key a \major
+\clef treble
+\time 4/4
+e1
+\breathe
+\mark "↓"
 @end lilypond
 
 A list of possible target alignment objects may be specified.  If
@@ -3348,20 +3363,27 @@ line is invisible the object is aligned to the place where the bar
 line would be.
 
 @lilypond[verbatim,quote,relative=1]
-e1
-% the RehearsalMark will be centered above the Key Signature
+% The rehearsal mark will be centered above the Key Signature
 \override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
 \key a \major
 \clef treble
 \mark "↓"
-e
-% the RehearsalMark will be centered above the Clef
+e1
+% The rehearsal mark will be centered above the Clef
 \set Staff.explicitKeySignatureVisibility = #all-invisible
 \override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
-\key a \minor
+\key a \major
 \clef bass
 \mark "↓"
-e,
+gis,,1
+% The rehearsal mark will be centered above the Bar Line
+\set Staff.explicitKeySignatureVisibility = #all-invisible
+\set Staff.explicitClefVisibility = #all-invisible
+\override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
+\key a \major
+\clef treble
+\mark "↓"
+e''1
 @end lilypond
 
 The alignment of the rehearsal mark relative to the notation object
@@ -3369,42 +3391,42 @@ can be changed, as shown in the following example.  In a score with
 multiple staves, this setting should be done for all the staves.
 
 @lilypond[verbatim,quote,relative=1]
-% The RehearsalMark will be centered above the KeySignature
+% The RehearsalMark will be centered above the Key Signature
 \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
 \key a \major
 \clef treble
 \time 4/4
 \mark "↓"
 e1
-% The RehearsalMark will be aligned with the left edge of the KeySignature
+% The RehearsalMark will be aligned with the left edge of the Key Signature
 \once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT
 \mark "↓"
 \key a \major
-e
-% The RehearsalMark will be aligned with the right edge of the KeySignature
+e1
+% The RehearsalMark will be aligned with the right edge of the Key Signature
 \once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT
 \key a \major
 \mark "↓"
-e
+e1
 @end lilypond
 
-The rehearsal mark can also be offset to the right or left of the left edge
-by an arbitrary amount.  The units are staff-spaces:
+The rehearsal mark can also be offset to the right or left of the left
+edge by an arbitrary amount.  The units are staff-spaces:
 
 @lilypond[verbatim,quote,relative=1]
-% The RehearsalMark will be aligned with the left edge of the KeySignature
+% The RehearsalMark will be aligned with the left edge of the Key Signature
 % and then shifted right by 3.5 staff-spaces
 \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
 \once \override Score.KeySignature #'break-align-anchor = #3.5
 \key a \major
 \mark "↓"
-e
-% The RehearsalMark will be aligned with the left edge of the KeySignature
+e1
+% The RehearsalMark will be aligned with the left edge of the Key Signature
 % and then shifted left by 2 staff-spaces
 \once \override Score.KeySignature #'break-align-anchor = #-2
 \key a \major
 \mark "↓"
-e
+e1
 @end lilypond