]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/fundamental.itely
lilypond-book robustness: ensure EOL at the end of @verbatim
[lilypond.git] / Documentation / user / fundamental.itely
index b82feb29077f67a1a374cbf88de328ffbd3bfa10..61b361a0966e60727c289e0d10c8273cd7b8a1d8 100644 (file)
@@ -7,7 +7,7 @@
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@c \version "2.11.61"
+@c \version "2.12.0"
 
 @node Fundamental concepts
 @chapter Fundamental concepts
@@ -113,7 +113,7 @@ commands, leaving them to be created implicitly.  For simple
 examples this works well, but for more complex examples, especially
 when additional commands are used, the implicit creation of contexts
 can give surprising results, maybe creating extra unwanted staves.
-The way to create contexts explicitly is explained in 
+The way to create contexts explicitly is explained in
 @ref{Contexts and engravers}.
 
 @warning{When entering more than a few lines of music it is
@@ -129,7 +129,7 @@ note to a huge compound expression like
 
 @example
 @{
-  \new GrandStaff <<
+  \new StaffGroup <<
     @var{...insert the whole score of a Wagner opera in here...}
   >>
 @}
@@ -242,12 +242,11 @@ limitations on variable names are detailed in
 @ruser{File structure}.
 
 
-
 @seealso
-
 For a complete definition of the input format, see
 @ruser{File structure}.
 
+
 @node Score is a (single) compound musical expression
 @subsection Score is a (single) compound musical expression
 
@@ -282,7 +281,7 @@ music expression and work our way down.
 @example
 \score @{
   @{ % this brace begins the overall compound music expression
-    \new GrandStaff <<
+    \new StaffGroup <<
       @var{...insert the whole score of a Wagner opera in here...}
     >>
   @} % this brace ends the overall compound music expression
@@ -292,8 +291,8 @@ music expression and work our way down.
 
 A whole Wagner opera would easily double the length of this
 manual, so let's just add a singer and piano.  We don't need a
-@code{GrandStaff} for this ensemble, which simply groups a number
-of staves together with a brace at the left, so we shall remove
+@code{StaffGroup} for this ensemble, which simply groups a number
+of staves together with a bracket at the left, so we shall remove
 it.  We @emph{do} need a singer and a piano, though.
 
 @example
@@ -395,10 +394,11 @@ each smaller level.  It also really helps to be strict with
 indentation -- make sure that each item on the same level starts
 on the same horizontal position in your text editor.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Structure of a score}.
 
+
 @node Nesting music expressions
 @subsection Nesting music expressions
 
@@ -447,7 +447,7 @@ as follows:
     <<
       { f c c }
       \new Staff \with {
-        alignAboveContext = "main" }
+        alignAboveContext = #"main" }
       { f8 f c }
     >>
     r4 |
@@ -461,8 +461,8 @@ of a single Staff.  Here it says that the new staff should be
 placed above the staff called @qq{main} instead of the default
 position which is below.
 
-@seealso
 
+@seealso
 Ossia are often written without clef and without
 time signature and are usually in a smaller font.
 These require further commands which
@@ -747,7 +747,7 @@ note head, so that the voices may be easily distinguished.
 Voice one is set to red diamonds, voice two to blue triangles,
 voice three to green crossed circles, and voice four (not used
 here) to magenta crosses;  @code{\voiceNeutralStyle} (also not
-used here) reverts the style back to the default.  
+used here) reverts the style back to the default.
 We shall see later how commands like these may be created by the
 user.
 See @ref{Visibility and color of objects} and
@@ -891,8 +891,9 @@ The stem directions are automatically assigned with the
 odd-numbered voices taking upward stems and the even-numbered
 voices downward ones.  The stems for voices 1 and 2 are right,
 but the stems in voice 3 should go down in this particular piece
-of music.  We can correct this simply by missing out voice three
-and placing the music in voice four:
+of music.  We can correct this by skipping voice three
+and placing the music in voice four. This is done by simply
+adding another pair of @code{\\}.
 
 @lilypond[quote,verbatim,fragment,ragged-right]
 \new Staff \relative c'' {
@@ -924,8 +925,8 @@ to see how to correct this, so we shall leave this problem until a
 later section --- see the @code{force-hshift} property in @ref{Fixing
 overlapping notation}.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Multiple voices}.
 
 
@@ -1168,8 +1169,8 @@ same direction are placed at the same position and both voices
 have no shift or the same shift specified, the error message
 @qq{Too many clashing note columns} will be produced.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Multiple voices}.
 
 
@@ -1356,7 +1357,7 @@ versewords = \lyricmode {
   One two three four five six
 }
 \score {
-  \new Choirstaff {
+  \new ChoirStaff {
     \new Staff <<
       \new Voice = "verse" {
         \versenotes \break
@@ -1517,8 +1518,8 @@ refrainwordsB = \lyricmode {
 }
 @end lilypond
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Vocal music}.
 
 
@@ -1556,16 +1557,15 @@ cis4 cis2. g4
 The input is rather sparse, but in the output, bar lines,
 accidentals, clef, and time signature have been added.  When
 LilyPond @emph{interprets} the input the musical information
-is inspected in time order, similar to reading a score from left
-to right.  While reading the input, the program remembers where
-measure boundaries are, and which pitches require explicit
+is parsed from left to right, similar to the way a performer
+reads the score.  While reading the input, the program remembers
+where measure boundaries are, and which pitches require explicit
 accidentals.  This information must be held on several levels.
-For example, the effect of an accidental is limited
-to a single staff, while a bar line must be synchronized across
-the entire score.
+For example, an accidental affects only a single staff, while
+a bar line must be synchronized across the entire score.
 
 Within LilyPond, these rules and bits of information are grouped in
-@emph{Contexts}.  We have already met the @code{Voice} context.
+@emph{Contexts}.  We have already introduced the @code{Voice} context.
 Others are the @code{Staff} and @code{Score} contexts.  Contexts are
 hierarchical to reflect the hierarchical nature of a musical score.
 For example: a @code{Staff} context can contain many @code{Voice}
@@ -1609,8 +1609,8 @@ words, each word being capitalized and joined immediately to the
 preceding word with no hyphen or underscore, e.g.,
 @code{GregorianTranscriptionStaff}.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Contexts explained}.
 
 
@@ -1712,16 +1712,16 @@ context to distinguish it from other contexts of the same type,
 
 Note the distinction between the name of the context type,
 @code{Staff}, @code{Voice}, etc, and the identifying name of a
-particular instance of that type, which can be any sequence of letters 
-invented by the user.  Digits and spaces can also be used in the 
+particular instance of that type, which can be any sequence of letters
+invented by the user.  Digits and spaces can also be used in the
 identifying name, but then it has to be placed in quotes,
 i.e. @code{\new Staff = "MyStaff 1" @var{music-expression}}.
 The identifying name is used to
 refer back to that particular instance of a context.  We saw this in
 use in the section on lyrics, see @ref{Voices and vocals}.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Creating contexts}.
 
 
@@ -1805,8 +1805,8 @@ from the name, or vice versa.
 We shall see later how the output of LilyPond can be changed
 by modifying the action of Engravers.
 
-@seealso
 
+@seealso
 Internals reference: @rinternals{Engravers and Performers}.
 
 
@@ -2008,7 +2008,7 @@ should be enclosed in double quotation signs, as above, although we
 shall see later that text can actually be specified in a much more
 general way by using the very powerful @code{markup} command.
 
-@unnumberedsubsubsec Setting context properties with @code{\with}
+@subsubheading Setting context properties with @code{\with}
 
 @funindex \with
 @funindex with
@@ -2054,7 +2054,7 @@ value of the font size.  If it is later changed with @code{\set},
 this new default value may be restored with the
 @code{\unset fontSize} command.
 
-@unnumberedsubsubsec Setting context properties with @code{\context}
+@subsubheading Setting context properties with @code{\context}
 
 @cindex context properties, setting with \context
 @funindex \context
@@ -2064,7 +2064,7 @@ The values of context properties may be set in @emph{all} contexts
 of a particular type, such as all @code{Staff} contexts, with a single
 command.  The context type is identified by using its
 type name, like @code{Staff}, prefixed by a back-slash: @code{\Staff}.
-The statement which sets the property value is the same as that in a 
+The statement which sets the property value is the same as that in a
 @code{\with} block, introduced above.  It is placed in a
 @code{\context} block within a @code{\layout} block.  Each
 @code{\context} block will affect all contexts of the type specified
@@ -2092,8 +2092,8 @@ Context properties set in this way may be overridden for particular
 instances of contexts by statements in a @code{\with} block, and by
 @code{\set} commands embedded in music statements.
 
-@seealso
 
+@seealso
 Notation Reference:
 @ruser{Changing context default settings}.
 @c FIXME
@@ -2250,8 +2250,8 @@ for all contexts of a particular type by including the
 @code{\set} command in a @code{\context} block in the
 same way.
 
-@seealso
 
+@seealso
 Notation Reference: @ruser{Modifying context plug-ins},
 @ruser{Changing context default settings}.
 
@@ -2451,8 +2451,8 @@ celloMusic = \relative c {
 }
 @end lilypond
 
-@seealso
 
+@seealso
 The starting templates can be found in the @q{Templates} appendix,
 see @ref{Single staff}.
 
@@ -2514,29 +2514,29 @@ lower = \relative c, {
   <<  % combine ChoirStaff and PianoStaff in parallel
     \new ChoirStaff <<
       \new Staff = "sopranos" <<
-        \set Staff.instrumentName = "Soprano"
+        \set Staff.instrumentName = #"Soprano"
         \new Voice = "sopranos" { \global \sopranoMusic }
       >>
       \new Lyrics \lyricsto "sopranos" { \sopranoWords }
       \new Staff = "altos" <<
-        \set Staff.instrumentName = "Alto"
+        \set Staff.instrumentName = #"Alto"
         \new Voice = "altos" { \global \altoMusic }
       >>
       \new Lyrics \lyricsto "altos" { \altoWords }
       \new Staff = "tenors" <<
-        \set Staff.instrumentName = "Tenor"
+        \set Staff.instrumentName = #"Tenor"
         \new Voice = "tenors" { \global \tenorMusic }
       >>
       \new Lyrics \lyricsto "tenors" { \tenorWords }
       \new Staff = "basses" <<
-        \set Staff.instrumentName = "Bass"
+        \set Staff.instrumentName = #"Bass"
         \new Voice = "basses" { \global \bassMusic }
       >>
       \new Lyrics \lyricsto "basses" { \bassWords }
     >>  % end ChoirStaff
 
     \new PianoStaff <<
-      \set PianoStaff.instrumentName = "Piano"
+      \set PianoStaff.instrumentName = #"Piano"
       \new Staff = "upper" \upper
       \new Staff = "lower" \lower
     >>
@@ -2567,22 +2567,22 @@ Doing this gives for our ChoirStaff:
 @example
     \new ChoirStaff <<
       \new Staff = "sopranos" <<
-        \set Staff.instrumentName = "Soprano"
+        \set Staff.instrumentName = #"Soprano"
         \new Voice = "sopranos" @{ \global \sopranoMusic @}
       >>
       \new Lyrics \lyricsto "sopranos" @{ \sopranoWords @}
       \new Staff = "altos" <<
-        \set Staff.instrumentName = "Alto"
+        \set Staff.instrumentName = #"Alto"
         \new Voice = "altos" @{ \global \altoMusic @}
       >>
       \new Lyrics \lyricsto "altos" @{ \altoWords @}
       \new Staff = "tenors" <<
-        \set Staff.instrumentName = "Tenor"
+        \set Staff.instrumentName = #"Tenor"
         \new Voice = "tenors" @{ \global \tenorMusic @}
       >>
       \new Lyrics \lyricsto "tenors" @{ \tenorWords @}
       \new Staff = "basses" <<
-        \set Staff.instrumentName = "Bass"
+        \set Staff.instrumentName = #"Bass"
         \new Voice = "basses" @{ \global \bassMusic @}
       >>
       \new Lyrics \lyricsto "basses" @{ \bassWords @}
@@ -2595,7 +2595,7 @@ easy - we just pull out the piano part from the
 
 @example
 \new PianoStaff <<
-  \set PianoStaff.instrumentName = "Piano  "
+  \set PianoStaff.instrumentName = #"Piano  "
   \new Staff = "upper" \upper
   \new Staff = "lower" \lower
 >>
@@ -2632,7 +2632,7 @@ stacked one above the other:
   >>  % end ChoirStaff
 
   \new PianoStaff <<
-    \set PianoStaff.instrumentName = "Piano"
+    \set PianoStaff.instrumentName = #"Piano"
     \new Staff = "upper" \upper
     \new Staff = "lower" \lower
   >>
@@ -2685,29 +2685,29 @@ lower = \relative c, {
   <<  % combine ChoirStaff and PianoStaff in parallel
     \new ChoirStaff <<
       \new Staff = "sopranos" <<
-        \set Staff.instrumentName = "Soprano"
+        \set Staff.instrumentName = #"Soprano"
         \new Voice = "sopranos" { \global \sopranoMusic }
       >>
       \new Lyrics \lyricsto "sopranos" { \sopranoWords }
       \new Staff = "altos" <<
-        \set Staff.instrumentName = "Alto"
+        \set Staff.instrumentName = #"Alto"
         \new Voice = "altos" { \global \altoMusic }
       >>
       \new Lyrics \lyricsto "altos" { \altoWords }
       \new Staff = "tenors" <<
-        \set Staff.instrumentName = "Tenor"
+        \set Staff.instrumentName = #"Tenor"
         \new Voice = "tenors" { \global \tenorMusic }
       >>
       \new Lyrics \lyricsto "tenors" { \tenorWords }
       \new Staff = "basses" <<
-        \set Staff.instrumentName = "Bass"
+        \set Staff.instrumentName = #"Bass"
         \new Voice = "basses" { \global \bassMusic }
       >>
       \new Lyrics \lyricsto "basses" { \bassWords }
     >>  % end ChoirStaff
 
     \new PianoStaff <<
-      \set PianoStaff.instrumentName = "Piano  "
+      \set PianoStaff.instrumentName = #"Piano  "
       \new Staff = "upper" \upper
       \new Staff = "lower" \lower
     >>