This section explains how to include text (with various formatting) in
your scores.
+@cindex Text, other languages
+To write non-ascii text (such as characters from other languages), simply
+insert the characters directly into the lilypond file. The file must be
+saved as UTF-8. For more information, see @ref{Text encoding}.
+
@menu
* Text scripts::
* Text spanners::
* Text marks::
* Text markup::
-* Text encoding::
* Nested scores::
* Overview of text markup commands::
* Font selection::
c4^"longtext" \fatText c4_"longlongtext" c4
@end lilypond
+@noindent
+To prevent text from influencing spacing, use @code{\emptyText}.
+
More complex formatting may also be added to a note by using the
markup command,
@lilypond[fragment,ragged-right,verbatim,quote]
@code{textSpannerNeutral}.
+@commonprop
+
+To print a solid line, use
+
+@example
+\override TextSpanner #'dash-fraction = #'()
+@end example
+
+
@seealso
Program reference: @internalsref{TextSpanner}.
c1
\key cis \major
\clef alto
- \set Score.rehearsalMarkAlignSymbol = #'key-signature
- \mark "on-key"
+ \override Score.RehearsalMark #'break-align-symbol = #'key-signature
+ \mark "on key"
cis
- \key ces \major
- \set Score.rehearsalMarkAlignSymbol = #'clef
+ \key ces \major
+ \override Score.RehearsalMark #'break-align-symbol = #'clef
\clef treble
\mark "on clef"
ces
+ \override Score.RehearsalMark #'break-align-symbol = #'time-signature
+ \key d \minor
+ \clef tenor
+ \time 3/4
+ \mark "on time"
+ c
+}
+@end lilypond
+
+Although text marks are normally only printed above the topmost
+staff, you may alter this to print them on every staff,
+
+@lilypond[quote,ragged-right,verbatim,relative=2]
+{
+ \new Score \with {
+ \remove "Mark_engraver"
+ }
+ <<
+ \new Staff \with {
+ \consists "Mark_engraver"
+ }
+ { c''1 \mark "foo" c'' }
+ \new Staff \with {
+ \consists "Mark_engraver"
+ }
+ { c'1 \mark "foo" c' }
+ >>
}
@end lilypond
@lilypond[quote,verbatim,fragment,relative=1]
c1^\markup { hello }
c1_\markup { hi there }
-c1^\markup { hi \bold there, is \italic anyone home? }
-c1_\markup { "\special #characters" }
+c1^\markup { hi \bold there, is \italic {anyone home?} }
+c1_\markup { "\special {weird} #characters" }
@end lilypond
@noindent
c'4^\markup{ \hspace #0 \raise #1.5 raised }
@end lilypond
+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}
+for more details.
+
@seealso
Syntax errors for markup mode are confusing.
-@node Text encoding
-@subsection Text encoding
-
-LilyPond uses the Pango library to format multi-lingual texts, and
-does not perform any input-encoding conversions. This means that any
-text, be it title, lyric text, or musical instruction containing
-non-ASCII characters, must be utf-8. Easiest to enter such texts is
-by using a Unicode-aware editor, and save using utf-8 encoding. Most
-popular modern editors have utf-8 support, for example, vim, Emacs,
-jEdit, and GEdit do.
-
-Depending on the fonts installed, the following fragment shows Hebrew
-and Cyrillic lyrics,
-
-@cindex Cyrillic
-@cindex Hebrew
-@cindex ASCII, non
-
-@lilypondfile[fontload]{utf-8.ly}
-
-The @TeX{} backend does not handle encoding specially at all. Strings
-in the input are put in the output as-is. Extents of text items in the
-@TeX{} backend, are determined by reading a file created via the
-@file{texstr} backend,
-
-@example
-lilypond -b texstr input/les-nereides.ly
-latex les-nereides.texstr
-@end example
-
-The last command produces @file{les-nereides.textmetrics}, which is
-read when you execute
-
-@example
-lilypond -b tex input/les-nereides.ly
-@end example
-
-Both @file{les-nereides.texstr} and @file{les-nereides.tex} need
-suitable LaTeX wrappers to load appropriate La@TeX{} packages for
-interpreting non-ASCII strings.
-
-To use a Unicode escape sequence, use
-
-@example
-#(ly:export (ly:wide-char->utf-8 #x2014))
-@end example
-
-
-@seealso
-
-@inputfileref{input/regression,utf-8.ly}
-
-
@node Nested scores
@subsection Nested scores
@itemize @bullet
@item @code{font-encoding}
is a symbol that sets layout of the glyphs. This should only be set to
-select different types of non-text fonts, eg.
+select different types of non-text fonts, e.g.
@code{fetaBraces} for piano staff braces, @code{fetaMusic} the
standard music font, including ancient glyphs, @code{fetaDynamic} for
@seealso
-Examples: @file{ly/@/font@/-family@/-override.ly}
+Examples: @inputfileref{input/@/regression,font@/-family@/-override.ly}.
@node New dynamic marks
@subsection New dynamic marks
It is possible to print new dynamic marks or text that should be aligned
-with dynamics. Use @code{make-dynamic-script} to create these marks.
+with dynamics. Use @code{make-dynamic-script} to create these
+marks. Note that the dynamic font only contains the characters
+@code{f,m,p,r,s} and @code{z}.
+
+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}
+for more details.
@cindex make-dynamic-script
be expanded, and the appropriate number is added automatically
@lilypond[quote,ragged-right,fragment,verbatim]
-\time 4/4 r1 | R1 | R1*2
+\time 4/4 r1 | R1 | R1*2 \time 3/4 R2. \time 2/4 R2 \time 4/4
\set Score.skipBars = ##t R1*17 R1*4
@end lilypond
}
@end lilypond
+Bar numbers can be removed entirely by removing the Bar number
+engraver from the score.
+
+@lilypond[verbatim,ragged-right,quote,relative=2]
+\layout {
+ \context {
+ \Score
+ \remove "Bar_number_engraver"
+ }
+}
+{
+c4 c c c \break
+c4 c c c
+}
+@end lilypond
+
@seealso
For longer instrument names, it may be useful to increase the
@code{indent} setting in the @code{\layout} block.
+To center instrument names while leaving extra space to the right,
+
+@lilypond[quote,verbatim,ragged-right]
+\new StaffGroup \relative
+<<
+ \new Staff {
+ \set Staff.instrument
+ = \markup { \hcenter-in #10 "blabla" }
+ c1 c1
+ }
+ \new Staff {
+ \set Staff.instrument
+ = \markup { \hcenter-in #10 "blo" }
+ c1 c1
+ }
+>>
+@end lilypond
+
+
@seealso
Program reference: @internalsref{InstrumentName}.
@lilypondfile[ragged-right,quote]{tag-filter.ly}
-The argument of the @code{\tag} command should be a symbol. It's
-possible to put multiple tags on a piece of music, with multiple
-@code{\tag} entries,
+The arguments of the @code{\tag} command should be a symbol
+(such as @code{#'score} or @code{#'part}), followed by a
+music expression. It is possible to put multiple tags on
+a piece of music with multiple @code{\tag} entries,
+
@example
\tag #'original-part \tag #'transposed-part @dots{}
@end example
@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 for sight-reading. It is possilbe to use other
-@c markers (eg. a big close-bracket over the staff) to indicate the cue notes are
+@c markers (e.g. a big close-bracket over the staff) to indicate the cue notes are
@c finished.
@c -hwn
vocabulary. With this expansion, many innovations in musical notation
have been tried. The book ``Music Notation in the 20th century'' by
Kurt Stone gives a comprehensive overview (see @ref{Literature
-list}). In general, the use of new, innovative notation makes a piece
-harder to understand and perform and its use should therefore be
-avoided. For this reason, support for contemporary notation in
-LilyPond is limited.
+list}).
+
+This section describes notation that does
+not fit into traditional notation categories, such as pitches,
+tuplet beams, and articulation. For contemporary notation
+that fits into traditional notation categories, such as
+microtones, nested tuplet beams, and unusual fermatas, please
+see those sections of the documentation.
+
+
+@c I don't think we should discourage modern composers who might
+@c want to sponsor new features. :)
+@c In general, the use of new, innovative notation makes a piece
+@c harder to understand and perform and its use should therefore be
+@c avoided. For this reason, support for contemporary notation in
+@c LilyPond is limited.
@menu
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.
+@internalsref{TimeSignature} grob. See also
+@inputfileref{input/@/test,compound@/-time@/.ly}).
@lilypond[verbatim,ragged-right]
% create 2/4 + 5/8
tsMarkup =\markup {
- \number {
+ \override #'(baseline-skip . 2) \number {
\column { "2" "4" }
- \musicglyph #"scripts.stopped"
+ \lower #1 "+"
\bracket \column { "5" "8" }
}
}
@end lilypond
@noindent
-As the example illustrates, @code{make-moment n m} constructs
-a duration of n*m notes, where n is any integer and m is a
-lilypond duration.
+As the example illustrates, @code{ly:make-moment n m} constructs a
+duration of n/m of a whole note. For example, @code{ly:make-moment 1 8} is an eighth
+note duration and @code{ly:make-moment 7 16} is the duration of
+seven sixteenths notes.
@node Proportional notation
accurately. Use @code{<g a>8 <e a>8} instead.
-@ignore
-
-This is covered in articulation; does it really need its
-own doc section? -gp
-@n ode Special fermatas
-@s ubsection Special fermatas
-
-@c index fermatas, special
-
-In contemporary music notation, special fermata symbols denote breaks
-of differing lengths. The following fermatas are supported
-
-@li lypond[quote,ragged-right]
-<<
- \oldaddlyrics {
- b'2
- ^\shortfermata
- _\shortfermata
- r
-
- b'
- ^\fermata
- _\fermata
- r
-
- b'
- ^\longfermata
- _\longfermata
- r
-
- b'
- ^\verylongfermata
- _\verylongfermata
- r
- }
- \new Lyrics \lyricmode {
- \override LyricText #'font-family = #'typewriter
- "shortfermata" "fermata" "longfermata" "verylongfermata"
- }
->>
-@end li lypond
-
-See @ref{Articulations} for general instructions how to apply scripts
-such as fermatas to notes.
-
-@end ignore
-
-
@node Special noteheads
@subsection Special noteheads
* Easy Notation note heads::
* Analysis brackets::
* Coloring objects::
+* Parentheses::
@end menu
@node Balloon help
@node Blank music sheet
@subsection Blank music sheet
+@cindex Sheet music, empty
+@cindex Staves, blank sheet
+
A blank music sheet can be produced also by using invisible notes, and
removing @code{Bar_number_engraver}.
g4 a
@end lilypond
-Hidden notes are also great for performing weird tricks. For example,
-slurs cannot be attached to rests or spacer rests, but you may wish
-to include that in your score -- string instruments use this notation
-when doing pizzicato to indicate that the note should ring for as long
-as possible.
-
-@lilypond[quote,ragged-right,verbatim,relative=0,fragment]
-\clef bass
-<< {
- c4^"pizz"( \hideNotes c)
- \unHideNotes c( \hideNotes c)
-} {
- s4 r s r
-} >>
-@end lilypond
-
@node Shape note heads
@subsection Shape note heads
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.,
-
+combinations are possible, e.g.
@lilypond[verbatim,relative=1,fragment]
\set shapeNoteStyles = ##(cross triangle fa #f mensural xcircle diamond)
named normal color.
+@node Parentheses
+@subsection Parentheses
+
+@cindex ghost notes
+@cindex notes, ghost
+@cindex notes, parenthesized
+
+Objects may be parenthesized by prefixing @code{\parenthesize} to the music event,
+
+@lilypond[relative=2,fragment,verbatim,ragged-right]
+<
+ c
+ \parenthesize d
+ g
+>4-\parenthesize -.
+@end lilypond
+
+
@node Automatic notation
@section Automatic notation
This section describes how to change the way that accidentals and
beams are automatically displayed.
-FIXME: this might get moved into Changing Defaults. Please send
-opinions to lilypond-devel. Thanks! :)
+@c FIXME: this might get moved into Changing Defaults. Please send
+@c opinions to lilypond-devel. Thanks! :)
+@c wow, this is embarrassing. I changed added this a year
+@c ago, and it was supposed to be a "fix in 2 weeks" thing.
+@c unfortunately, I forgot to add -gp to it, so when I was
+@c searching for last-minute stuff before 2.8 came out, I
+@c missed it. :(
+@c
+@c BTW, this will definitely be moved. :)
+
@menu
* Automatic accidentals::
@end itemize
For example, if automatic beams should always end on the first quarter
-node, use
+note, use
@example
#(override-auto-beam-setting '(end * * * *) 1 4)