]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/advanced-notation.itely
Remove Info dir entries correctly in 'make install'
[lilypond.git] / Documentation / user / advanced-notation.itely
index 19f9bd5bc58e39bcc718da8509337e5381bcfca4..69beebf8204fba524fa967f6145cf83fcc1c0739 100644 (file)
@@ -46,7 +46,9 @@ saved as UTF-8.  For more information, see @ref{Text encoding}.
 * Text marks::                  
 * Text markup::                 
 * Nested scores::               
+* Page wrapping text::          
 * Overview of text markup commands::  
+* Overview of text markup list commands::  
 * Font selection::              
 * New dynamic marks::           
 @end menu
@@ -59,7 +61,7 @@ saved as UTF-8.  For more information, see @ref{Text encoding}.
 @cindex text items, non-empty
 @cindex non-empty texts
 
-It is possible to place arbitrary strings of text or @ref{Text markup}
+It is possible to place arbitrary strings of text or @ref{Text markup},
 above or below notes by using a string @code{c^"text"}.  By default,
 these indications do not influence the note spacing, but by using the
 command @code{\fatText}, the widths will be taken into account
@@ -118,7 +120,7 @@ These all use the same routines as the glissando for drawing the texts
 and the lines, and tuning their behavior is therefore also done in the
 same way. It is done with a spanner, and the routine responsible for
 drawing the spanners is @code{ly:line-interface::print}. This
-routine creates determines the exact location of the two @i{span
+routine determines the exact location of the two @i{span
 points} and draws a line in between, in the style requested.
 
 Here is an example of the different line styles available, and how to
@@ -148,7 +150,7 @@ e2 \glissando f
 The @code{Glissando} object, like any other using the
 @code{ly:line-interface::print} routine, carries a nested
 association list. In the above statement, the value for @code{Y}
-is set to @code{-2} for association list corresponding to the right
+is set to @code{-2} for the association list corresponding to the right
 end point. Of course, it is also possible to adjust the left side with
 @code{left} instead of @code{right}.
 
@@ -235,13 +237,7 @@ Program reference: @internalsref{TextSpanner},
 @internalsref{Glissando}, @internalsref{VoiceFollower},
 @internalsref{TrillSpanner}, @internalsref{line-spanner-interface}.
 
-Examples:
-@inputfileref{input/@/regression,dynamics@/-text@/-spanner@/-padding.ly}.
-@inputfileref{input/@/regression,glissando@/-broken@/.ly}.
-@inputfileref{input/@/regression,line@/-arrows@/.ly}.
-@inputfileref{input/@/regression,line@/-style@/.ly}.
-@inputfileref{input/@/regression,text@/-spanner@/.ly}.
-@inputfileref{input/@/regression,text@/-spanner@/.ly}.
+Examples: @lsr{expressive,line-styles.ly}, @lsr{expressive,line-arrows.ly}
 
 
 @node Text spanners
@@ -261,22 +257,24 @@ properties
 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
 c1
 \textSpannerDown
-\override TextSpanner #'edge-text = #'("rall " . "")
+\override TextSpanner #'bound-details #'left #'text =
+  \markup { \upright "rall" } 
 c2\startTextSpan b c\stopTextSpan a
 \break
 \textSpannerUp
-\override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+\override TextSpanner #'bound-details #'left #'text =
+  \markup { \italic "rit" } 
 c2\startTextSpan b c\stopTextSpan a
 @end lilypond
 
 @refcommands
 
-@cindex textSpannerUp
-@code{textSpannerUp},
-@cindex textSpannerDown
-@code{textSpannerDown},
-@cindex textSpannerNeutral
-@code{textSpannerNeutral}.
+@funindex textSpannerUp
+@code{\textSpannerUp},
+@funindex textSpannerDown
+@code{\textSpannerDown},
+@funindex textSpannerNeutral
+@code{\textSpannerNeutral}.
 
 
 @commonprop
@@ -292,8 +290,6 @@ To print a solid line, use
 
 Program reference: @internalsref{TextSpanner}.
 
-Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}.
-
 
 @node Text marks
 @subsection Text marks
@@ -309,7 +305,7 @@ The @code{\mark} command is primarily used for
 but it can also be used to put signs like coda,
 segno, and fermata on a bar line.  Use @code{\markup} to
 access the appropriate symbol (symbols are listed in
-@ref{The Feta font})
+@ref{The Feta font}).
 
 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
 c1 \mark \markup { \musicglyph #"scripts.ufermata" }
@@ -358,15 +354,15 @@ bar lines,
   c1
   \key cis \major
   \clef alto
-  \override Score.RehearsalMark #'break-align-symbol = #'key-signature
+  \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
   \mark "on key"
   cis
   \key ces \major
-  \override Score.RehearsalMark #'break-align-symbol = #'clef
+  \override Score.RehearsalMark #'break-align-symbols = #'(clef)
   \clef treble
   \mark "on clef"
   ces
-  \override Score.RehearsalMark #'break-align-symbol = #'time-signature
+  \override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
   \key d \minor
   \clef tenor
   \time 3/4
@@ -375,6 +371,36 @@ bar lines,
 }
 @end lilypond
 
+The text marks will, by default, be aligned with the middle of the notation
+object, but this can be changed by overriding the
+@code{break-align-anchor-alignment} and
+@code{break-align-anchor} properties for the appropriate grob.
+
+@lilypond[fragment,quote,ragged-right,verbatim]
+{
+  \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
+  c1
+  \key cis \major
+
+  % the RehearsalMark will be aligned with the left edge of the KeySignature
+  \once \override Staff.KeySignature #'break-align-anchor-alignment = #LEFT
+  \mark \default
+  cis1
+  \key ces \major
+
+  % the RehearsalMark will be aligned with the right edge of the KeySignature
+  \once \override Staff.KeySignature #'break-align-anchor-alignment = #RIGHT
+  \mark \default
+  ces1
+
+  % the RehearsalMark will be aligned with the right edge of the KeySignature
+  % and then shifted right by an additional 2 units.
+  \once \override Staff.KeySignature #'break-align-anchor = #2
+  \mark \default
+  ces1
+}
+@end lilypond
+
 Although text marks are normally only printed above the topmost
 staff, you may alter this to print them on every staff,
 
@@ -422,7 +448,7 @@ c1_\markup { "\special {weird} #characters" }
 @end lilypond
 
 @noindent
-See @ref{Overview of text markup commands} for a list of all
+See @ref{Overview of text markup commands}, for a list of all
 commands.
 
 @code{\markup} is primarily used for @internalsref{TextScript}s,
@@ -438,7 +464,7 @@ but it can also be used anywhere text is called in lilypond
 
     \set Staff.instrumentName = \markup{ \column{ Alto solo } }
     c2^\markup{ don't be \flat }
-    \override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+    \override TextSpanner #'bound-details #'left #'text = \markup{\italic rit }
     b2\startTextSpan
     a2\mark \markup{ \large \bold Fine }
     r2\stopTextSpan
@@ -526,7 +552,7 @@ 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
+you need to use the #'padding property or create an @q{anchor} point
 inside the markup (generally with @code{\hspace #0}).
 
 @lilypond[quote,verbatim,fragment,relative=1]
@@ -540,7 +566,7 @@ c'4^\markup{ \hspace #0 \raise #1.5 raised }
 Some situations (such as dynamic marks) have preset font-related
 properties.  If you are creating text in such situations, it
 is advisable to cancel those properties with
-@code{normal-text}.  See @ref{Overview of text markup commands}
+@code{normal-text}.  See @ref{Overview of text markup commands},
 for more details.
 
 
@@ -581,6 +607,40 @@ block.
 }
 @end lilypond
 
+@node Page wrapping text
+@subsection Page wrapping text
+Whereas @code{\markup} is used to enter a non-breakable block of text,
+@code{\markuplines} can be used at top-level to enter lines of text that
+can spread over multiple pages:
+
+@verbatim
+\markuplines {
+  \justified-lines {
+    A very long text of justified lines.
+    ...
+  }
+  \justified-lines {
+    An other very long paragraph.
+    ...
+  }
+  ...
+}
+@end verbatim
+
+@code{\markuplines} accepts a list of markup, that is either the result
+of a markup list command, or a list of markups or of markup lists. The
+built-in markup list commands are described in
+@ref{Overview of text markup list commands}.
+
+@seealso
+
+This manual: @ref{Overview of text markup list commands}, 
+@ref{New markup list command definition}.
+
+@refcommands
+
+@funindex \markuplines
+@code{\markuplines}
 
 @node Overview of text markup commands
 @subsection Overview of text markup commands
@@ -589,6 +649,12 @@ The following commands can all be used inside @code{\markup @{ @}}.
 
 @include markup-commands.tely
 
+@node Overview of text markup list commands
+@subsection Overview of text markup list commands
+
+The following commands can all be used with @code{\markuplines}.
+
+@include markup-list-commands.tely
 
 @node Font selection
 @subsection Font selection
@@ -697,7 +763,7 @@ example,
 
 @seealso
 
-Examples: @inputfileref{input/@/regression,font@/-family@/-override.ly}.
+Examples: @lsr{text,font@/-family@/-override.ly}.
 
 
 @node New dynamic marks
@@ -711,7 +777,7 @@ marks.  Note that the dynamic font only contains the characters
 Some situations (such as dynamic marks) have preset font-related
 properties.  If you are creating text in such situations, it
 is advisable to cancel those properties with
-@code{normal-text}.  See @ref{Overview of text markup commands}
+@code{normal-text}.  See @ref{Overview of text markup commands},
 for more details.
 
 @cindex make-dynamic-script
@@ -911,7 +977,7 @@ c4^\markup {
 @end lilypond
 
 @noindent
-See @ref{Text markup} for more details.
+See @ref{Text markup}, for more details.
 
 
 @seealso
@@ -1016,7 +1082,7 @@ c1
 @end lilypond
 
 @noindent
-See @ref{The Feta font} for a list of symbols which may be
+See @ref{The Feta font}, for a list of symbols which may be
 printed with @code{\musicglyph}.
 
 The horizontal location of rehearsal marks can be adjusted by
@@ -1026,11 +1092,11 @@ setting @code{break-align-symbol}
 c1
 \key cis \major
 \clef alto
-\override Score.RehearsalMark #'break-align-symbol = #'key-signature
+\override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
 \mark "on-key"
 cis
 \key ces \major
-\override Score.RehearsalMark #'break-align-symbol = #'clef
+\override Score.RehearsalMark #'break-align-symbols = #'(clef)
 \clef treble
 \mark "on clef"
 ces
@@ -1055,9 +1121,7 @@ definition of @code{format-mark-numbers} and
 @code{format-mark-letters}.  They can be used as inspiration for other
 formatting functions.
 
-Examples: @inputfileref{input/@/regression,rehearsal@/-mark@/-letter@/.ly},
-
-@inputfileref{input/@/regression,rehearsal@/-mark@/-number@/.ly}.
+Examples: @lsr{parts,rehearsal-mark-numbers.ly}
 
 
 @node Bar numbers
@@ -1091,7 +1155,7 @@ be added
 Bar numbers can be typeset at regular intervals instead of at the
 beginning of each line.  This is illustrated in the following example,
 whose source is available as
-@inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}
+@lsr{staff,making-bar-numbers-appear-at-regular-intervals.ly}.
 
 @lilypondfile[ragged-right,quote]{bar-number-regular-interval.ly}
 
@@ -1116,9 +1180,7 @@ c4 c c c
 
 Program reference: @internalsref{BarNumber}.
 
-Examples:
-@inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly},
-and @inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}.
+Examples: @lsrdir{staff}
 
 
 @refbugs
@@ -1327,9 +1389,6 @@ and -2 (for 15ma bassa) as arguments.  Internally the function sets the properti
 
 Program reference: @internalsref{OttavaBracket}.
 
-Examples: @inputfileref{input/@/regression,ottava@/.ly},
-@inputfileref{input/@/regression,ottava@/-broken@/.ly}.
-
 
 @refbugs
 
@@ -1403,7 +1462,7 @@ a piece of music with multiple @code{\tag} entries,
 
 @seealso
 
-Examples: @inputfileref{input/@/regression,tag@/-filter@/.ly}.
+Examples: @lsr{parts,tag@/-filter@/.ly}
 
 
 @refbugs
@@ -1670,8 +1729,7 @@ Quoting nested triplets may result in poor notation.
 
 In this manual: @ref{Instrument transpositions}.
 
-Examples: @inputfileref{input/@/regression,quote@/.ly}
-@inputfileref{input/@/regression,quote@/-transposition@/.ly}
+Examples: @lsr{parts,quote.ly}, @lsr{parts,quote-transportation.ly}
 
 Program reference: @internalsref{QuoteMusic}.
 
@@ -1709,19 +1767,19 @@ smaller = {
 
 \addQuote clarinet \relative {
   R1*20
-  r2 r8 c f f
+  r2 r8 c' f f
 }
 
 \new Staff \relative  <<
 
-  % setup a context for  cue  notes.
+  % setup a context for cue notes.
   \new Voice = "cue" { \smaller \skip 1*21 }
 
   \set Score.skipBars = ##t
 
   \new Voice {
     R1*20
-    \cueDuring #"clarinet" #1 {
+    \cueDuring #"clarinet" #UP {
       R1
     }
     g4 g2.
@@ -1838,7 +1896,7 @@ see those sections of the documentation.
 @menu
 * Polymetric notation::         
 * Time administration::         
-* Proportional notation::       
+* Proportional notation (introduction)::  
 * Clusters::                    
 * Special noteheads::           
 * Feathered beams::             
@@ -1859,7 +1917,7 @@ Double time signatures are not supported explicitly, but they can be
 faked.  In the next example, the markup for the time signature is
 created with a markup text.  This markup text is inserted in the
 @internalsref{TimeSignature} grob. See also
-@inputfileref{input/@/test,compound@/-time@/.ly}).
+@lsr{contemporary,compound-time-signature}.
 
 @lilypond[verbatim,ragged-right]
 % create 2/4 + 5/8
@@ -2054,10 +2112,15 @@ note duration and @code{ly:make-moment 7 16} is the duration of
 seven sixteenths notes.
 
 
-@node Proportional notation
-@subsection Proportional notation
+@node Proportional notation (introduction)
+@subsection Proportional notation (introduction)
 @cindex Proportional notation
 
+See @ref{Proportional notation}.
+
+
+TODO: remove all this stuff?
+
 Notes can be spaced proportionally to their time-difference by
 assigning a duration to @code{proportionalNotationDuration}
 
@@ -2092,9 +2155,9 @@ is removed by setting the @code{strict-note-spacing} property to
 
 @seealso
 
-@inputfileref{input/@/regression,spacing-proportional/.ly}
-@inputfileref{input/@/regression,spacing-strict-notespacing/.ly}
-@inputfileref{input/@/regression,spacing-strict-spacing-grace/.ly}
+Examples: @lsr{spacing,proportional@/-spacing@/.ly}, 
+@lsr{spacing,proportional@/-strict@/-grace@/-notes@/.ly}, and
+@lsr{spacing,proportional@/-strict@/-notespacing@/.ly}
 
 An example of strict proportional notation is in the
 example file @file{input/proportional.ly}.
@@ -2113,12 +2176,6 @@ chords, e.g.,
 \makeClusters { <c e > <b f'> }
 @end lilypond
 
-The following example (from
-@inputfileref{input/@/regression,cluster@/.ly}) shows what the result
-looks like
-
-@lilypondfile[ragged-right,quote]{cluster.ly}
-
 Ordinary notes and clusters can be put together in the same staff,
 even simultaneously.  In such a case no attempt is made to
 automatically avoid collisions between ordinary notes and clusters.
@@ -2129,7 +2186,7 @@ Program reference: @internalsref{ClusterSpanner},
 @internalsref{ClusterSpannerBeacon},
 @internalsref{Cluster_spanner_engraver}.
 
-Examples: @inputfileref{input/@/regression,cluster@/.ly}.
+Examples: @lsr{contemporary,cluster@/.ly}.
 
 @refbugs
 
@@ -2158,7 +2215,7 @@ e d <c f\harmonic> <d a'\harmonic>
 
 @noindent
 To see all notehead styles, please see
-@inputfileref{input/@/regression,note@/-head@/-style@/.ly}.
+@ref{Note head styles}.
 
 
 @seealso
@@ -2174,9 +2231,9 @@ property of a @code{Beam}.  The @code{\featherDurations} function
 can be used to adjust note durations.
 
 @lilypond[ragged-right,relative=1,fragment,verbatim,quote]
+\override Beam #'grow-direction = #LEFT
 \featherDurations #(ly:make-moment 5 4) 
 {
-  \override Beam #'grow-direction = #LEFT
   c16[ c c c c c c]
 }
 @end lilypond
@@ -2191,7 +2248,7 @@ music snippets.
 
 Improvisation is sometimes denoted with slashed note heads.  Such note
 heads can be created by adding a @internalsref{Pitch_squash_engraver}
-to the @internalsref{Staff} or @internalsref{Voice} context.  Then, the
+to the @internalsref{Voice} context.  Then, the
 following command
 
 @example
@@ -2207,7 +2264,7 @@ There are shortcuts @code{\improvisationOn} (and an accompanying
 the following example
 
 @lilypond[verbatim,ragged-right,quote]
-\new Staff \with {
+\new Voice \with {
   \consists Pitch_squash_engraver
 } \transpose c c' {
   e8 e g a a16(bes)(a8) g \improvisationOn
@@ -2242,7 +2299,9 @@ of @code{font-size} is a number indicating the size relative to the
 standard size for the current staff height.  Each step up is an
 increase of approximately 12% of the font size.  Six steps is exactly a
 factor two.  The Scheme function @code{magstep} converts a
-@code{font-size} number to a scaling factor.
+@code{font-size} number to a scaling factor.  The @code{font-size}
+property can also be set directly, so that only certain layout objects are
+affected.
 
 @lilypond[quote,fragment,relative=1,verbatim]
 c8
@@ -2321,8 +2380,6 @@ The other arguments  are the offset and the text of the label.
 
 Program reference: @internalsref{text-balloon-interface}.
 
-Examples: @inputfileref{input/@/regression,balloon@/.ly}.
-
 
 
 
@@ -2475,8 +2532,6 @@ to @internalsref{Staff} context.  A bracket is started with
 
 Program reference: @internalsref{HorizontalBracket}.
 
-Examples: @inputfileref{input/@/regression,note@/-group@/-bracket@/.ly}.
-
 
 @node Coloring objects
 @subsection Coloring objects
@@ -2554,7 +2609,7 @@ An x11 color is not necessarily exactly the same shade as a similarly
 named normal color.
 
 Notes in a chord cannot be colored with @code{\override}; use
-@code{\tweak} instead.  See @ref{Objects connected to the input}
+@code{\tweak} instead.  See @ref{Objects connected to the input},
 for details.
 
 
@@ -2589,5 +2644,40 @@ This only functions inside chords, even for single notes
 Vertical lines can be drawn between staves synchronized with
 the notes.
 
-Examples: @inputfileref{input/@/regression,grid@/-lines@/.ly}.
+@lilypond[ragged-right,quote,verbatim]
+\layout {
+  \context {
+    \Staff
+    \consists "Grid_point_engraver" %% sets of grid
+    gridInterval = #(ly:make-moment 1 4)
+  }
+}
+
+\new Score \with {
+  \consists "Grid_line_span_engraver"
+  %% centers grid lines  horizontally below noteheads
+  \override NoteColumn #'X-offset = #-0.5
+}
+
+\new ChoirStaff <<
+  \new Staff {
+    \stemUp
+    \relative {
+      c'4. d8 e8 f g4
+    }
+  }
+  \new Staff {
+    %% centers grid lines  vertically
+    \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
+    \stemDown
+    \clef bass
+    \relative c {
+      c4  g'  f  e
+    }
+  }
+>>
+@end lilypond
+
+Examples: @lsrdir{education}
+