]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/input.itely
Doc: In NR, always write comma after `e.g.' and `i.e.'.
[lilypond.git] / Documentation / notation / input.itely
index 64b21a462df003e102e0cece55fce787a9d538a5..24ccf61d1b221ed20cf7631415a824288e256444 100644 (file)
@@ -365,7 +365,7 @@ A direct scheme expression, such as
 @code{#(ly:set-option 'point-and-click #f)}.
 
 @item
-A @code{\header} block.  This sets the global (i.e. the top of
+A @code{\header} block.  This sets the global (i.e., the top of
 file) header block.  This is the block containing the default
 settings of titling fields like composer, title, etc. for all
 books within the file (see @ref{Titles explained}).
@@ -496,11 +496,11 @@ circumstances to avoid errors:
 
 @item Around every opening and closing curly bracket.
 
-@item After every command or variable, i.e. every item that
+@item After every command or variable, i.e., every item that
 begins with a @code{\} sign.
 
 @item After every item that is to be interpreted as a Scheme
-expression, i.e. every item that begins with a @code{#}@tie{}sign.
+expression, i.e., every item that begins with a @code{#}@tie{}sign.
 
 @item To separate all elements of a Scheme expression.
 
@@ -1119,16 +1119,16 @@ markup conditionally to header and footer text defined within the
 @code{\paper} block, using the following syntax:
 
 @example
-@code{variable} = @code{\markup} @{
+variable = \markup @{
   @dots{}
-  @code{\on-the-fly}  \@var{procedure}  @var{markup}
+  \on-the-fly  \@var{procedure}  @var{markup}
   @dots{}
 @}
 @end example
 
 The @var{procedure} is called each time the @code{\markup} command
 in which it appears is evaluated.  The @var{procedure} should test
-for a particular condition and interpret (i.e. print) the
+for a particular condition and interpret (i.e., print) the
 @var{markup} argument if and only if the condition is true.
 
 A number of ready-made procedures for testing various conditions are
@@ -1185,8 +1185,8 @@ Several @code{\on-the-fly} conditions can be combined with an
 @q{and} operation, for example,
 
 @example
-  @code{\on-the-fly \first-page}
-  @code{\on-the-fly \last-page}
+  \on-the-fly \first-page
+  \on-the-fly \last-page
   @code{@{ \markup @dots{} \fromproperty #'header: @dots{} @}}
 @end example
 
@@ -1207,14 +1207,20 @@ Installed Files:
 
 In addition to being shown in the printed output, @code{\header} variables
 are also used to set PDF metadata (the information displayed by PDF readers
-as the @code{properties} of the PDF file).  For example, setting the
-@code{title} property of the @code{header} block @q{Symphony I} will also give
-this title to the PDF document.
+as the @code{properties} of the PDF file).  As metadata are applied per
+output file, only @code{\header} blocks located at top level or within an
+explicit @code{\book} block will be used to generate PDF metadata; while
+@code{\header} variables in a @code{\bookpart} or @code{\score} block
+will be reflected in the printed output of the respective blocks, the
+document-wide PDF metadata will not be affected by headers at that level.
+
+For example, setting the @code{title} property of the @code{header} block
+@q{Symphony I} will also give this title to the PDF document.
 
 @example
-  @code{\header@{}
-    @code{title = "Symphony I"}
-  @code{@}}
+\header@{
+  title = "Symphony I"
+@}
 @end example
 
 If you want to set the title of the printed output to one value, but have the
@@ -1222,10 +1228,10 @@ title property of the PDF to have a different value, you can use
 @code{pdftitle}, as below.
 
 @example
-  @code{\header@{}
-    @code{title = "Symphony I"}
-    @code{pdftitle = "Symphony I by Beethoven"}
-  @code{@}}
+\header@{
+  title = "Symphony I"
+  pdftitle = "Symphony I by Beethoven"
+@}
 @end example
 
 The variables @code{title}, @code{subject}, @code{keywords},
@@ -1325,7 +1331,7 @@ left/bottom edge and zero implies the mark is centered on the edge.
 
 @item Context
 is the context in which the grob being footnoted is created.  It
-may be omitted if the grob is in a bottom context, e.g. a
+may be omitted if the grob is in a bottom context, e.g., a
 @code{Voice} context.
 
 @item GrobName
@@ -1890,7 +1896,7 @@ tocAct =
   \markuplist \table-of-contents
   \tocAct \markup { Atto Primo }
   \tocItem \markup { Coro. Viva il nostro Alcide }
-  \tocItem \markup { Cesare. Presti omai l'Egizzia terra }
+  \tocItem \markup { Cesare. Presti omai l'Egizia terra }
   \tocAct \markup { Atto Secondo }
   \tocItem \markup { Sinfonia }
   \tocItem \markup { Cleopatra. V'adoro, pupille, saette d'Amore }
@@ -2206,7 +2212,7 @@ followed by a music expression.  If @emph{and only if} the symbols
 are valid LilyPond identifiers (alphabetic characters only, no
 numbers, underscores, or dashes) which cannot be confused with notes,
 the @code{#'} may be omitted and, as a shorthand, a list of symbols
-can use the dot separator: i.e. @code{\tag #'(violinI violinII)} can
+can use the dot separator: i.e., @code{\tag #'(violinI violinII)} can
 be written @code{\tag violinI.violinII}.  The same applies to
 @code{\keepWithTag} and @code{\removeWithTag}.
 
@@ -2285,8 +2291,8 @@ music = \relative c'' {
 
 Multiple @code{\removeWithTag} filters may be applied to a single
 music expression to remove several differently named tagged
-sections.  Alternatively, you can use a single
-@code{\removeWithTag} with a list of tags.
+sections.  Alternatively, you can use a single @code{\removeWithTag}
+with a list of tags.
 
 @lilypond[verbatim,quote]
 music = \relative c'' {
@@ -2304,41 +2310,73 @@ music = \relative c'' {
 }
 @end lilypond
 
-Two or more @code{\keepWithTag} filters applied to a single music
-expression will cause @emph{all} tagged sections to be removed, as
-the first filter will remove all tagged sections except the one
-named, and the second filter will remove even that tagged section.
-Usually you would rather want to use a single @code{\keepWithTag}
-command with a list of multiple tags: this will only remove tagged
-sections not given in @emph{any} of the tags.
+Using two or more @code{\keepWithTag} filters on a single music
+expression will cause @emph{all} of the tagged sections to be removed.
+The first filter will remove all except the one named and any subsequent
+filters will remove the rest.  Using one @code{\keepWithTag} command
+with a list of multiple tags will only remove tagged sections that are
+not specified in that list.
+
+@lilypond[verbatim,quote]
+music = \relative c'' {
+  \tag #'violinI { a4 a a a }
+  \tag #'violinII { b4 b b b }
+  \tag #'viola { c4 c c c }
+  \tag #'cello { d4 d d d }
+}
+
+\new Staff {
+  \keepWithTag #'(violinI violinII)
+  \music
+}
+@end lilypond
+
+@noindent
+will print @code{\tag}s @var{violinI} and @var{violinII} but not
+@var{viola} or @var{cello}.
 
 @cindex tag groups
 @funindex \tagGroup
-While @code{\keepWithTag} is convenient when dealing with
-@emph{one} set of alternatives, the removal of music tagged with
-@emph{unrelated} tags is problematic when using tags for more than
-one purpose.  For that reason, @q{tag groups} of related tags can
-be declared:
+
+While @code{\keepWithTag} is convenient when dealing with @emph{one} set
+of alternatives, the removal of music tagged with @emph{unrelated} tags
+is problematic when using them for more than one purpose.  In that case
+@q{groups} of tags can be declared:
 
 @example
 \tagGroup #'(violinI violinII viola cello)
 @end example
 
-declares the respective tags as belonging to one tag group.
+@noindent
+Now all the different tags belong to a single @q{tag group}.  Note that
+individual tags cannot be members of more than one @emph{tag group}.
 
 @example
 \keepWithTag #'violinI @dots{}
 @end example
 
-will then only be concerned with tags from @code{violinI}'s tag
-group: any element of the included music that is tagged with one
-or more of tags from this set but @emph{not} with @code{violinI}
-will get removed.
+@noindent
+will now only show music tagged from @code{violinI}'s tag group and any
+music tagged with one of the @emph{other} tags will removed.
 
-To any @code{\keepWithTag} command, only tags from the tag groups
-of the tags given in the command are visible.
+@lilypond[verbatim,quote]
+music = \relative {
+  \tagGroup #'(violinI violinII viola cello)
+  \tag #'violinI { c''4^"violinI" c c c }
+  \tag #'violinII { a2 a }
+  \tag #'viola { e8 e e2. }
+  \tag #'cello { d'2 d4 d }
+  R1^"untagged"
+}
 
-Tags cannot be members of more than one tag group.
+\new Voice {
+  \keepWithTag #'violinI
+  \music
+}
+@end lilypond
+
+When using the @code{\keepWithTag} command, only tags from the tag
+groups of the tags given in the command are visible.
 
 @funindex \pushToTag
 @funindex \appendToTag
@@ -2352,15 +2390,15 @@ construct has @code{elements}, but sequential and simultaneous music are
 safe bets:
 
 @lilypond[verbatim,quote]
-test = { \tag #'here { \tag #'here <<c''>> } }
+music = { \tag #'here { \tag #'here <<c''>> } }
 
 {
   \pushToTag #'here c'
   \pushToTag #'here e'
-  \pushToTag #'here g' \test
+  \pushToTag #'here g' \music
   \appendToTag #'here c'
   \appendToTag #'here e'
-  \appendToTag #'here g' \test
+  \appendToTag #'here g' \music
 }
 @end lilypond
 
@@ -2452,7 +2490,7 @@ instruction containing non-ASCII characters, must be encoded in
 UTF-8.  The easiest way to enter such text is by using a
 Unicode-aware editor and saving the file with UTF-8 encoding.  Most
 popular modern editors have UTF-8 support, for example, vim, Emacs,
-jEdit, and GEdit do.  All MS Windows systems later than NT use
+jEdit, and Gedit do.  All MS Windows systems later than NT use
 Unicode as their native character encoding, so even Notepad can
 edit and save a file in UTF-8 format.  A more functional
 alternative for Windows is BabelPad.
@@ -2469,9 +2507,10 @@ will be generated.
 Here is an example showing Cyrillic, Hebrew and Portuguese
 text:
 
+@c NOTE: No verbatim in the following example as the code does not
+@c display correctly in PDF Font settings for Cyrillic and Hebrew
+
 @lilypond[quote]
-%c No verbatim here as the code does not display correctly in PDF
-% Font settings for Cyrillic and Hebrew
 % Linux Libertine fonts contain Cyrillic and Hebrew glyphs.
 \paper {
   #(define fonts
@@ -2666,7 +2705,7 @@ generated.
 Notation Reference:
 @ref{The layout block}.
 
-Application Usage
+Application Usage:
 @rprogram{Command-line usage}.
 
 
@@ -2695,7 +2734,7 @@ in your source file.  This will render only the last 5 measures
 (assuming 4/4 time signature) of every @code{\score} in the input
 file.  For longer pieces, rendering only a small part is often an order
 of magnitude quicker than rendering it completely.  When working on the
-beginning of a score you have already typeset (e.g. to add a new part),
+beginning of a score you have already typeset (e.g., to add a new part),
 the @code{showFirstLength} property may be useful as well.
 
 Skipping parts of a score can be controlled in a more fine-grained
@@ -2729,11 +2768,10 @@ voices and staves, saving even more time.
 @cindex EPS output
 
 The default output formats for the printed score are Portable
-Document Format (PDF) and PostScript (PS).  Scalable Vector
-Graphics (SVG), Encapsulated PostScript (EPS) and Portable
-Network Graphics (PNG) output formats are also available through
-command line options, see
-@rprogram{Basic command line options for LilyPond}.
+Document Format (PDF) and PostScript (PS).  Portable
+Network Graphics (PNG), Scalable Vector Graphics (SVG) and Encapsulated
+PostScript (EPS) output is available through the command line option,
+see @rprogram{Basic command line options for LilyPond}.
 
 
 @node Replacing the notation font
@@ -2840,7 +2878,7 @@ When combined with the @file{articulate} script the following,
 additional musical notation can be output to MIDI;
 
 @itemize
-@item Appogiaturas.  These are made to take half the value of the note
+@item Appoggiaturas.  These are made to take half the value of the note
 following (without taking dots into account).  For example;
 
 @example
@@ -2850,7 +2888,7 @@ following (without taking dots into account).  For example;
 @noindent
 The c will take the value of a crotchet.
 
-@item Ornaments (i.e. mordents, trills and turns et al.)
+@item Ornaments (i.e., mordents, trills and turns et al.)
 @item Rallentando, accelerando, ritardando and a tempo
 @item Slurs, including phrasing slurs
 @item Tenuto
@@ -2875,8 +2913,8 @@ and portato
 @item Glissandi
 @item Falls and doits
 @item Microtonal chords
-@item Rhythms entered as annotations, e.g. swing
-@item Tempo changes without @code{\tempo} (e.g. entered as annotations)
+@item Rhythms entered as annotations, e.g., swing
+@item Tempo changes without @code{\tempo} (e.g., entered as annotations)
 @item Tremolos that @emph{are} entered with a @q{@code{:}[@var{number}]}
 value
 @end itemize
@@ -2898,8 +2936,8 @@ To create a MIDI output file from a LilyPond input file, insert a
 @}
 @end example
 
-@warning{ A @code{@bs{}score} block that, as well as the music, contains
-only a @code{@bs{}midi} block (i.e. @emph{without} the @code{@bs{}layout}
+@warning{A @code{@bs{}score} block that, as well as the music, contains
+only a @code{@bs{}midi} block (i.e., @emph{without} the @code{@bs{}layout}
 block), will only produce MIDI output files.  No notation will be
 printed.}
 
@@ -3533,10 +3571,10 @@ Installed Files:
 @warning{The @file{articulate} script may shorten chords, which might
 not be appropriate for some types of instrument, such as organ music.
 Notes that do not have any articulations attached to them may also be
-shortened; so to compensate for this, restrict the use of the
-@code{\articulate} function to shorter segments of music or modify the
+shortened; so to allow for this, restrict the use of the
+@code{\articulate} function to shorter segments of music, or modify the
 values of the variables defined in the @file{articulate} script to
-compentate for the note-shortening behavior.}
+compensate for the note-shortening behavior.}
 
 
 
@@ -3585,15 +3623,16 @@ lilypond file.ly >display.txt
 @funindex \void
 Note that Lilypond does not just display the music expression, but
 also interprets it (since @code{\displayLilyMusic} returns it in
-addition to displaying it).  This is convenient since you can just
-insert @code{\displayLilyMusic} into existing music in order to get
-information about it.  If you don't actually want Lilypond to
-interpret the displayed music as well as display it, use @code{\void}
-in order to have it ignored:
+addition to displaying it).  Just insert @code{\displayLilyMusic} into
+the existing music in order to get information about it.
+
+To interpret and display a music section in the console but, at the same
+time, remove it from the output file use the @code{\void} command.
 
 @example
 @{
   \void \displayLilyMusic \transpose c a, @{ c4 e g a bes @}
+  c1
 @}
 @end example