]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/advanced-notation.itely
(Entering lyrics):
[lilypond.git] / Documentation / user / advanced-notation.itely
index fd535ee39f6c02cb83d23db8140518b53321637c..9d4a2e62f42320641e0a463c612ff4b98cb9a345 100644 (file)
@@ -1,4 +1,4 @@
-@c -*- coding: latin-1; mode: texinfo; -*-
+@c -*- coding: utf-8; mode: texinfo; -*-
 @c This file is part of lilypond.tely
 
 @c A menu is needed before every deeper *section nesting of @node's; run 
@@ -38,7 +38,6 @@ your scores.
 * Overview of text markup commands::  
 * Font selection::              
 * New dynamic marks::           
-* Other text markup issues::    
 @end menu
 
 
@@ -102,6 +101,10 @@ c1
 \textSpannerDown
 \override TextSpanner #'edge-text = #'("rall " . "")
 c2\startTextSpan b c\stopTextSpan a
+\break
+\textSpannerUp
+\override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+c2\startTextSpan b c\stopTextSpan a
 @end lilypond
 
 @refcommands
@@ -215,15 +218,24 @@ but it can also be used anywhere text is called in lilypond
 
     \set Staff.instrument = \markup{ \column{ Alto solo } }
     c2^\markup{ don't be \flat }
-    b2
+    \override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+    b2\startTextSpan
     a2\mark \markup{ \large \bold Fine }
-    r2
+    r2\stopTextSpan
     \bar "||"
   }
   \addlyrics { bar, foo \markup{ \italic bar! } }
 }
 @end lilypond
 
+Text can also be placed on its own, away from any @code{\score}
+block.  This is primarily used in a @code{\book} (see
+@ref{Multiple movements}).
+
+@lilypond[quote,raggedright,verbatim]
+\markup{ Here is some text. }
+@end lilypond
+
 @cindex font switching
 
 The markup in the example demonstrates font switching commands.  The
@@ -293,6 +305,19 @@ whole.  For example, the @internalsref{RehearsalMark} is horizontally
 centered, so using @code{\mark \markup @{ \left-align .. @}} has no
 effect.
 
+In addition, vertical placement is performed after creating the
+text markup object.  If you wish to move an entire piece of markup,
+you need to use the #'padding property or create an "anchor" point
+inside the markup (generally with @code{\hspace #0}).
+
+@lilypond[quote,verbatim,fragment,relative=1]
+\fatText
+c'4^\markup{ \raise #5 "not raised" }
+\once \override TextScript #'padding = #3
+c'4^\markup{ raised }
+c'4^\markup{ \hspace #0 \raise #1.5 raised }
+@end lilypond
+
 
 @seealso
 
@@ -434,7 +459,7 @@ then set the
 
 @lilypond[fragment,verbatim]
 {
-  \override Staff.TimeSignature #'font-name = #"Times"
+  \override Staff.TimeSignature #'font-name = #"Charter"
   \override Staff.TimeSignature #'font-size = #2
   \time 3/4
   c'1_\markup {
@@ -454,11 +479,41 @@ property. The resulting size is taken relative to the
 @cindex font size
 @cindex font magnification
 
+
+It is also possible to change the default font family for the entire
+document. This is done by calling the @code{make-pango-font-tree} from
+within the @code{\paper} block. The function takes names for the font
+families to use for roman, sans serif and monospaced text. For
+example,
+
+@cindex font families, setting
+@cindex Pango
+
+
+@lilypond[verbatim]
+\paper  {
+  myStaffSize = #20
+  
+  #(define fonts
+    (make-pango-font-tree "Times New Roman"
+                          "Nimbus Sans"
+                          "Luxi Mono"
+                           (/ myStaffSize 20)))
+}
+
+{
+  c'^\markup { roman: foo \sans bla \typewriter bar }
+}
+@end lilypond
+
+@c we don't do Helvetica / Courier, since GS incorrectly loads
+@c Apple TTF fonts  
+
+
+
 @seealso
 
-@c FIXME.
-Init files: @file{ly/@/declarations@/-init@/.ly} contains hints how new
-fonts may be added to LilyPond.
+Examples: @file{ly/@/font@/-family@/-override.ly}
 
 
 @node New dynamic marks
@@ -490,22 +545,6 @@ boxf = \markup{ \bracket { \dynamic f } }
 @end lilypond
 
 
-@node Other text markup issues
-@subsection Other text markup issues
-
-To use a normal font within a title, you must define it manually
-
-@example
-#(def-markup-command (normal-font layout props arg) (markup?)
-  "Switch to normal text font"
-  (interpret-markup layout (cons '((font-series . 'medium) (font-shape . 'upright)) props) arg))
-
-\header@{
-  title = \markup@{ ABCD \normal-font ABCD @}
-@}
-@end example
-
-
 
 @node Preparing parts
 @section Preparing parts
@@ -529,13 +568,15 @@ individual parts.
 @subsection Multi measure rests
 
 @cindex multi measure rests
+@cindex full measure rests
 @cindex Rests, multi measure
+@cindex Rests, full measure
 @cindex whole rests for a full measure
 @cindex @code{R}
 
-Multi-measure rests are entered using `@code{R}'.  It is specifically
-meant for full bar rests and for entering parts: the rest can expand
-to fill a score with rests, or it can be printed as a single
+Rests for one full measure (or many bars) are entered using `@code{R}'.  It
+is specifically meant for full bar rests and for entering parts: the rest
+can expand to fill a score with rests, or it can be printed as a single
 multi-measure rest.  This expansion is controlled by the property
 @code{Score.skipBars}.  If this is set to true, empty measures will not
 be expanded, and the appropriate number is added automatically
@@ -589,6 +630,16 @@ R2.*10^\markup { \italic "ad lib." }
 R2.^\fermataMarkup
 @end lilypond
 
+Warning!  This text is created by @code{MultiMeasureRestText}, not
+@code{TextScript}.
+
+@lilypond[quote,raggedright,verbatim,fragment]
+\override TextScript #'padding = #5
+R1^"low"
+\override MultiMeasureRestText #'padding = #5
+R1^"high"
+@end lilypond
+
 If you want to have text on the left end of a multi-measure rest,
 attach the text to a zero-length skip note, i.e.,
 
@@ -660,11 +711,11 @@ the metronome marking invisible
 To print other metronome markings, use these markup commands
 @lilypond[quote,raggedright,verbatim,relative,fragment]
 c4^\markup {
-  "("
+  (
   \smaller \general-align #Y #DOWN \note #"16." #1
-  "="
-  \smaller \general-align #Y #DOWN \note #"8" #1"
-  ")" }
+  =
+  \smaller \general-align #Y #DOWN \note #"8" #1
+  ) }
 @end lilypond
 
 @noindent
@@ -706,7 +757,12 @@ c1 \mark \default
 @end lilypond
 
 @noindent
-(The letter@tie{}`I' is skipped in accordance with engraving traditions.)
+The letter@tie{}`I' is skipped in accordance with engraving traditions.
+If you wish to include the letter `I', then use
+
+@example
+\set Score.markFormatter = #format-mark-alphabet
+@end example
 
 The mark is incremented automatically if you use @code{\mark
 \default}, but you can also use an integer argument to set the mark
@@ -841,6 +897,24 @@ names, for example
 c''1
 @end lilypond
 
+If you wish to center the instrument names, you must center all of them
+
+@lilypond[quote,verbatim,raggedright]
+{ <<
+\new Staff {
+  \set Staff.instrument = \markup {
+    \center-align { "Clarinetti"
+      \line { "in B" \smaller \flat } } }
+  c''1
+}
+\new Staff {
+  \set Staff.instrument = \markup{ \center-align { Vibraphone }}
+  c''1
+}
+>>
+}
+@end lilypond
+
 For longer instrument names, it may be useful to increase the
 @code{indent} setting in the @code{\layout} block.
 
@@ -851,8 +925,12 @@ Program reference: @internalsref{InstrumentName}.
 @refbugs
 
 When you put a name on a grand staff or piano staff, the width of the
-brace is not taken into account.  You must add extra spaces to the end of
-the name to avoid a collision.
+brace is not taken into account. The following property setting can be
+used to move the instrument names to the left, in such situations.
+
+@example
+\override Score.InstrumentName #'space-alist = #'((left-edge extra-space . 2.0))
+@end example
 
 
 @node Instrument transpositions
@@ -1354,7 +1432,7 @@ Cue notes have smaller font sizes.
  when the original part takes over again, this should be marked with
  the name of the original instrument.
 
- @c really?  Are you sure about that last point?  I'll check after 3.0 -gp
+@c really?  Are you sure about that last point?  I'll check after 3.0 -gp
 
 @c Yes, this is good practice.  Otherwise, the start of the original
 @c part can only be seen from the font size.  This is not good enough
@@ -1364,7 +1442,7 @@ Cue notes have smaller font sizes.
 @c -hwn
 
 
- any other changes introduced by the cued part should also be
+Any other changes introduced by the cued part should also be
 undone.  For example, if the cued instrument plays in a different clef,
 the original clef should be stated once again.
 
@@ -1455,13 +1533,21 @@ tsMarkup =\markup {
 @end lilypond
 
 Each staff can also have its own time signature.  This is done by
-moving the @internalsref{Timing_engraver} to the @internalsref{Staff}
+moving the @internalsref{Timing_translator} to the @internalsref{Staff}
 context.
 
 @example
 \layout @{
-  \context @{ \Score \remove "Timing_engraver" @}
-  \context @{ \Staff \consists "Timing_engraver" @}
+  \context @{ \Score
+     \remove "Timing_translator"
+     \remove "Default_bar_line_engraver"
+  @}
+  \context @{
+    \Staff
+    \consists "Timing_translator"
+    \consists "Default_bar_line_engraver"
+  @}
+    
 @}
 @end example
 
@@ -1486,8 +1572,15 @@ Now, each staff has its own time signature.
 
 @lilypond[quote,raggedright]
 \layout{
-  \context{ \Score \remove "Timing_engraver" }
-  \context{ \Staff \consists "Timing_engraver" }
+  \context{
+     \Score
+     \remove "Timing_translator"
+     \remove "Default_bar_line_engraver"
+    }
+  \context{ \Staff
+    \consists "Timing_translator"
+    \consists "Default_bar_line_engraver"
+  }
 }
 
 \relative c' <<
@@ -1716,7 +1809,7 @@ Program reference: @internalsref{NoteHead}.
 Trills that should be executed on an explicitly specified pitch can be
 typeset with the command @code{pitchedTrill}, 
 
-@lilypond[raggedright,verbatim]
+@lilypond[raggedright,verbatim,fragment]
   \pitchedTrill c'4\startTrillSpan fis
   f'\stopTrillSpan
 @end lilypond
@@ -1724,11 +1817,6 @@ typeset with the command @code{pitchedTrill},
 The first argument is the main note. The absolute pitch of the second
 is printed as a stemless note head in parentheses.
 
-@refbugs
-
-Relative octave mode ignores the octave of the second argument of
-@code{\pitchedTrill}.
-
 @node Feathered beams
 @subsection Feathered beams
 
@@ -1795,7 +1883,7 @@ teaching tools in addition to great musical scores.
 * Balloon help::                
 * Blank music sheet::           
 * Hidden notes::                
-* Shaped note heads ::          
+* Shape note heads ::           
 * Easy Notation note heads::    
 * Analysis brackets::           
 * Coloring objects::            
@@ -1897,14 +1985,14 @@ as possible.
 @end lilypond
 
 
-@node Shaped note heads 
-@subsection Shaped note heads 
+@node Shape note heads 
+@subsection Shape note heads 
 
-In shaped note head notation, the shape of the note head corresponds
+In shape note head notation, the shape of the note head corresponds
 to the harmonic function of a note in the scale.  This notation was
 popular in the 19th century American song books.
 
-Shaped note heads can be produced by setting @code{\aikenHeads} or
+Shape note heads can be produced by setting @code{\aikenHeads} or
 @code{\sacredHarpHeads}, depending on the style desired.
 
 @lilypond[verbatim,relative=1,fragment]
@@ -1922,7 +2010,7 @@ scale is determined by  the @code{\key} command
 @findex \aikenHeads
 @findex \sacredHarpHeads
 
-Shaped note heads are implemented through the @code{shapeNoteStyles}
+Shape note heads are implemented through the @code{shapeNoteStyles}
 property.  Its value is a vector of symbols.  The k-th element indicates
 the style to use for the k-th step of the scale.  Arbitrary
 combinations are possible, eg.,
@@ -1993,30 +2081,6 @@ Program reference: @internalsref{HorizontalBracket}.
 Examples: @inputfileref{input/@/regression,note@/-group@/-bracket@/.ly}.
 
 
-
-@ignore
-
-I don't think we need this info.
-
-@n ode Stems
-@s ubsection Stems
-
-Whenever a note is found, a @internalsref{Stem} object is created
-automatically.  For whole notes and rests, they are also created but
-made invisible.
-
-@refcommands
-
-@cindex @code{\stemUp}
-@code{\stemUp},
-@cindex @code{\stemDown}
-@code{\stemDown},
-@cindex @code{\stemNeutral}
-@code{\stemNeutral}.
-
-@end ignore
-
-
 @node Coloring objects
 @subsection Coloring objects