* Text encoding::
* Nested scores::
* Overview of text markup commands::
-* Selecting font sizes::
* Font selection::
* New dynamic marks::
* Other text markup issues::
@cindex @code{\mark}
The @code{\mark} command is primarily used for
-@internalsref{Rehearsal marks},
+@ref{Rehearsal marks},
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
@include markup-commands.tely
-@node Selecting font sizes
-@subsection Selecting font sizes
-
-The easiest method of setting the font size of any context, is by
-setting the @code{fontSize} property.
-
-@lilypond[quote,fragment,relative=1,verbatim]
-c8
-\set fontSize = #-4
-c f
-\set fontSize = #3
-g
-@end lilypond
-
-@noindent
-It does not change the size of variable symbols, such as beams or
-slurs.
-
-Internally, the @code{fontSize} context property will cause the
-@code{font-size} property to be set in all layout objects. The value
-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.
-
-@lilypond[quote,fragment,relative=1,verbatim]
-c8
-\override NoteHead #'font-size = #-4
-c f
-\override NoteHead #'font-size = #3
-g
-@end lilypond
-
-LilyPond has fonts in different design sizes. The music fonts for
-smaller sizes are chubbier, while the text fonts are relatively wider.
-Font size changes are achieved by scaling the design size that is
-closest to the desired size. The standard font size (for
-@code{font-size} equals 0), depends on the standard staff height. For
-a 20pt staff, a 10pt font is selected.
-
-The @code{font-size} property can only be set on layout objects that
-use fonts. These are the ones supporting the
-@internalsref{font-interface} layout interface.
-
-@refcommands
-
-The following commands set @code{fontSize} for the current voice:
-
-@cindex @code{\tiny}
-@code{\tiny},
-@cindex @code{\small}
-@code{\small},
-@cindex @code{\normalsize}
-@code{\normalsize}.
-
-
@node Font selection
@subsection Font selection
By setting the object properties described below, you can select a
font from the preconfigured font families. LilyPond has default
-support for the feta music fonts and @TeX{}'s Computer Modern text
-fonts.
+support for the feta music fonts. Text fonts are selected through
+Pango/FontConfig. The serif font defaults to New Century Schoolbook,
+the sans and typewriter to whatever the Pango installation defaults
+to.
+
@itemize @bullet
@item @code{font-encoding}
@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"
+ "Helvetica"
+ "Courier"
+ (/ myStaffSize 20)))
+}
+
+{
+ c'^\markup { roman: foo \sans bla \typewriter bar }
+}
+@end lilypond
+
+
@seealso
-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
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
@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.
* Clusters::
* Special fermatas::
* Special noteheads::
+* Pitched trills::
* Feathered beams::
* Improvisation::
@end menu
@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
@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' <<
Program reference: @internalsref{NoteHead}.
+@node Pitched trills
+@subsection Pitched trills
+
+Trills that should be executed on an explicitly specified pitch can be
+typeset with the command @code{pitchedTrill},
+
+@lilypond[raggedright,verbatim,fragment]
+ \pitchedTrill c'4\startTrillSpan fis
+ f'\stopTrillSpan
+@end lilypond
+
+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
* Balloon help::
* Blank music sheet::
* Hidden notes::
-* Shaped note heads ::
+* Shape note heads ::
* Easy Notation note heads::
* Analysis brackets::
* Coloring objects::
@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]
@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.,
@subsection Coloring objects
Individual objects may be assigned colors. You may use the
-color names listed below.
+color names listed in the @ref{List of colors}.
@lilypond[quote,raggedright,verbatim,fragment,relative=1]
\override NoteHead #'color = #red
@end lilypond
-@subsubheading List of colors
-
-@verbatim
-Normal colors
-=============
-
-black, white, red, green, blue, cyan, magenta, yellow, grey,
-darkred, darkgreen, darkblue, darkcyan, darkmagenta, darkyellow.
-
-X color names
-===============
-
-X color names come several variants:
-
-Any name that is spelled as a single word with capitalisation
-(e.g. "LightSlateBlue") can also be spelled as space separated
-words without capitalisation (e.g. "light slate blue").
-
-The word "grey" can always be spelled "gray" (e.g. "DarkSlateGray").
-
-Some names can take a numerical suffix (e.g. "LightSalmon4").
-
-Color Names without a numerical suffix:
----------------------------------------
-
-snow GhostWhite WhiteSmoke gainsboro FloralWhite
-OldLace linen AntiqueWhite PapayaWhip BlanchedAlmond
-bisque PeachPuff NavajoWhite moccasin cornsilk
-ivory LemonChiffon seashell honeydew MintCream
-azure AliceBlue lavender LavenderBlush MistyRose
-white black DarkSlateGrey DimGrey SlateGrey
-LightSlateGrey grey LightGrey MidnightBlue navy
-NavyBlue CornflowerBlue DarkSlateBlue SlateBlue MediumSlateBlue
-LightSlateBlue MediumBlue RoyalBlue blue DodgerBlue
-DeepSkyBlue SkyBlue LightSkyBlue SteelBlue LightSteelBlue
-LightBlue PowderBlue PaleTurquoise DarkTurquoise MediumTurquoise
-turquoise cyan LightCyan CadetBlue MediumAquamarine
-aquamarine DarkGreen DarkOliveGreen DarkSeaGreen SeaGreen
-MediumSeaGreen LightSeaGreen PaleGreen SpringGreen LawnGreen
-green chartreuse MediumSpringGreen GreenYellow LimeGreen
-YellowGreen ForestGreen OliveDrab DarkKhaki khaki
-PaleGoldenrod LightGoldenrodYellow LightYellow yellow gold
-LightGoldenrod goldenrod DarkGoldenrod RosyBrown IndianRed
-SaddleBrown sienna peru burlywood beige
-wheat SandyBrown tan chocolate firebrick
-brown DarkSalmon salmon LightSalmon orange
-DarkOrange coral LightCoral tomato OrangeRed
-red HotPink DeepPink pink LightPink
-PaleVioletRed maroon MediumVioletRed VioletRed magenta
-violet plum orchid MediumOrchid DarkOrchid
-DarkViolet BlueViolet purple MediumPurple thistle
-DarkGrey DarkBlue DarkCyan DarkMagenta DarkRed
-LightGreen
-
-Color names with a numerical suffix
------------------------------------
-
-In the following names the suffix N can be a number in the range 1-4:
-
-snowN seashellN AntiqueWhiteN bisqueN PeachPuffN
-NavajoWhiteN LemonChiffonN cornsilkN ivoryN honeydewN
-LavenderBlushN MistyRoseN azureN SlateBlueN RoyalBlueN
-blueN DodgerBlueN SteelBlueN DeepSkyBlueN SkyBlueN
-LightSkyBlueN LightSteelBlueN LightBlueN LightCyanN PaleTurquoiseN
-CadetBlueN turquoiseN cyanN aquamarineN DarkSeaGreenN
-SeaGreenN PaleGreenN SpringGreenN greenN chartreuseN
-OliveDrabN DarkOliveGreenN khakiN LightGoldenrodN LightYellowN
-yellowN goldN goldenrodN DarkGoldenrodN RosyBrownN
-IndianRedN siennaN burlywoodN wheatN tanN
-chocolateN firebrickN brownN salmonN LightSalmonN
-orangeN DarkOrangeN coralN tomatoN OrangeRedN
-redN DeepPinkN HotPinkN pinkN LightPinkN
-PaleVioletRedN maroonN VioletRedN magentaN orchidN
-plumN MediumOrchidN DarkOrchidN purpleN MediumPurpleN
-thistleN
-
-Grey Scale
-----------
-
-A grey scale can be obtained using:
-
-greyN
-
-Where N is in the range 0-100.
-@end verbatim
+@seealso
+
+Appendix: @ref{List of colors}.
@refbugs
In normal time signatures, automatic beams can start on any note but can
only end in a few positions within the measure: beams can end on a beat,
or at durations specified by the properties in
-@code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
-are defined in @file{scm/@/auto@/-beam@/.scm}.
+@code{autoBeamSettings}. The properties in @code{autoBeamSettings}
+consist of a list of rules for where beams can begin and end. The
+default @code{autoBeamSettings} rules are defined in
+@file{scm/@/auto@/-beam@/.scm}.
+
+In order to add a rule to the list, use
+@example
+#(override-auto-beam-setting '(be p q n m) a b [context])
+@end example
+
+@itemize @bullet
+
+@item @code{be} is either "begin" or "end".
+
+@item @code{b/q} is the duration of the note for which you want
+to add a rule. A beam is considered to have the duration of its
+shortest note. Set @code{p} and @code{q} to @code{'*'} to
+have this apply to any beam.
+
+@item @code{n/m} is the position in the time signature to which
+this rule should apply. Set @code{n} and @code{m} to @code{'*'}
+to have this apply in any time signature.
+
+@item @code{a/b} is the position in the bar at which the beam should end.
+
+@item @code{context} is optional, and it specifies the context at which
+the change should be made. The default is @code{'Voice}.
+@code{#(score-override-auto-beam-setting '(A B C D) E F)} is equivalent to
+@code{#(override-auto-beam-setting '(A B C D) E F 'Score)}.
+
+@end itemize
+
+For example, if automatic beams should always end on the first quarter
+node, use
-The value of @code{autoBeamSettings} is changed with three functions,
@example
-#(override-auto-beam-setting
- '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
- [@var{context}])
-#(score-override-auto-beam-setting
- '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b})
-#(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m})
- [@var{context}])
+#(override-auto-beam-setting '(end * * * *) 1 4)
@end example
-Here, @var{be} is the symbol @code{begin} or @code{end}, and
-@var{context} is an optional context (default: @code{'Voice}). It
-determines whether the rule applies to begin or end-points. The
-quantity @var{p}/@var{q} refers to the length of the beamed notes (and
-`@code{* *}' designates notes of any length), @var{n}/@var{M} refers
-to a time signature (wildcards `@code{* *}' may be entered to
-designate all time signatures), @var{a}/@var{b} is a duration. By
-default, this command changes settings for the current voice. It is
-also possible to adjust settings at higher contexts, by adding a
-@var{context} argument. @code{score-override-auto-beam-setting} is
-equal to @code{override-auto-beam-setting} with the argument
-@var{context} set to @code{'Score}.
-
-For example, if automatic beams should end on the first quarter note, use
-the following
+
+You can force the beam settings to only take effect on beams whose shortest
+note is a certain duration
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 2/4
+#(override-auto-beam-setting '(end 1 16 * *) 1 16)
+a16 a a a a a a a |
+a32 a a a a16 a a a a a |
+#(override-auto-beam-setting '(end 1 32 * *) 1 16)
+a32 a a a a16 a a a a a |
+@end lilypond
+
+You can force the beam settings to only take effect in certain time
+signatures
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 5/8
+#(override-auto-beam-setting '(end * * 5 8) 2 8)
+c8 c d d d
+\time 4/4
+e8 e f f e e d d
+\time 5/8
+c8 c d d d
+@end lilypond
+
+You can also remove a previously set beam-ending rule by using
+
@example
-#(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
+#(revert-auto-beam-setting '(be p q n m) a b [context])
@end example
-Since the duration of a quarter note is 1/4 of a whole note, it is
-entered as @code{(ly:make-moment 1 4)}.
+@noindent
+be, p, q, n, m, a, b and context are the same as above. Note that the
+default rules are specified in @file{scm/@/auto@/-beam@/.scm},
+so you can revert rules that you did not explicitly create.
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 4/4
+a16 a a a a a a a a a a a a a a a
+#(revert-auto-beam-setting '(end 1 16 4 4) 1 4)
+a16 a a a a a a a a a a a a a a a
+@end lilypond
+
+The rule in a revert-auto-beam-setting statement must exactly match the
+original rule. That is, no wildcard expansion is taken into account.
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 1/4
+#(override-auto-beam-setting '(end 1 16 1 4) 1 8)
+a16 a a a
+#(revert-auto-beam-setting '(end 1 16 * *) 1 8) % this won't revert it!
+a a a a
+#(revert-auto-beam-setting '(end 1 16 1 4) 1 8) % this will
+a a a a
+@end lilypond
+
+
+
+@c TODO: old material -- not covered by above stuff, I think.
If automatic beams should end on every quarter in 5/4 time, specify
all endings
@example
3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
3/8, has passed within the measure).
-Rules can also be restricted to specific time signatures. A rule that
-should only be applied in @var{N}/@var{M} time signature is formed by
-replacing the second asterisks by @var{N} and @var{M}. For example, a
-rule for 6/8 time exclusively looks like
-@example
-#(override-auto-beam-setting '(begin * * 6 8) @dots{})
-@end example
-
-If a rule should be to applied only to certain types of beams, use the
-first pair of asterisks. Beams are classified according to the
-shortest note they contain. For a beam ending rule that only applies
-to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
-*)}.
-
-For example,
-
-@lilypond[quote,raggedright,relative=2,fragment,verbatim]
-\time 5/8
-#(override-auto-beam-setting '(end * * 5 8) 2 8)
-c8 c d d d
-\time 4/4
-e8 e f f e e d d
-\time 5/8
-c8 c d d d
-@end lilypond
-
@cindex automatic beam generation
@cindex autobeam
@cindex @code{autoBeaming}
@cindex lyrics
If beams are used to indicate melismata in songs, then automatic
-beaming should be switched off. This is done by setting
-@code{autoBeaming} to @code{#f}.
+beaming should be switched off with @code{\autoBeamOff}.
+
@refcommands