stop-moment as well.
+2004-11-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/quote-iterator.cc (process): add comparison for
+ stop-moment as well.
+
+2004-11-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * VERSION (PACKAGE_NAME): release 2.4.1
+
+ * input/regression/new-slur.ly: mention forcing.
+
+2004-11-04 Heikki Junes <hjunes@cc.hut.fi>
+
+ * Documentation/user/lilypond.tely: changes 2.3.x to 2.5.x.
+
+2004-11-04 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * Documentation/topdocs/INSTALL.texi (Top): Remove geometry.
+
+2004-11-03 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * Documentation/topdocs/INSTALL.texi (Top): Fix geometry url (dax).
+
+ * lily/lily-parser.cc (LY_DEFINE): Remove "Now " from message.
+
+ * lily/main.cc (main): Invoke identify.
+
+ * scm/lily.scm (postscript->pdf): Remove progress newline.
+ Write progress to stderr.
+
+ * lily/paper-book.cc (output): Remove progress newline.
+
+ * scm/framework-tex.scm (convert-to-dvi, convert-to-ps): Call
+ gettext on user messages, and remove whitespace.
+
+ * lily/paper-outputter.cc (get_paper_outputter): Add progress newline.
+
+ * scripts/lilypond-latex.py (program_name): Bugfix: use only basename of
+ argv[0] (Thomas Scharkowski).
+
+ * configure.in: Bugfix: add REQUIRED parameter to STEPMAKE_TEXMF
+ call (carlyannehorse). Also check for mf and mf-nowin. Add check
+ for ec-fonts-mtraced.
+
+ * GNUmakefile.in (builddir-exec): Add symlink tex/out. Fixes
+ --srcdir build (Bertalan).
+
+ * stepmake/aclocal.m4 (STEPMAKE_GUILE_DEVEL): Check for guile
+ headers and library too (Laura Conrad).
+
+ * Documentation/topdocs/INSTALL.texi (Top): Mention development
+ package for guile too (Laura Conrad).
+
+ * lily/main.cc (usage): Typo.
+
+2004-11-02 Werner Lemberg <wl@gnu.org>
+
+ * Documentation/user/notation.ly: More fixes to improve appearance.
+
+ * tex/texinfo.tex: Updated from texinfo CVS -- this version provides
+ better output for multicolumn tables.
+
+2004-11-01 Mats Bengtsson <mabe@drongo.s3.kth.se>
+
+ * lily/main.cc (dir_info): Fixed typo in the printouts.
+
+2004-11-01 Werner Lemberg <wl@gnu.org>
+
+ * buildscripts/mf-to-table.py (write_fontlist): Improve formatting
+ of output.
+ Set `per_line' to 2; replace hard-coded value with it.
+
+ * Documentation/user/*: Many fixes to improve appearance of
+ printed manual.
+
+2004-11-01 Werner Lemberg <wl@gnu.org>
+
+ * Documentation/user/changing-defaults.itely,
+ Documentation/user/notation.ly,
+ Documentation/user/programming-interface.itely: Use @/.
+ Fix formatting of some lilypond snippets and tables.
+
+ * scripts/lilypond-book.py (compose_ly): Provide useful default
+ for LINEWIDTH in `override'.
+
+2004-10-31 Graham Percival <gperlist@shaw.ca>
+
+ * Documentation/user/invoking.itely: change "3.0" -> "2.4"
+
+2004-10-31 Werner Lemberg <wl@gnu.org>
+
+ Resetting @exampleindent to `5' gives ugly results with texinfo's
+ DVI output. Use `@format @exampleindent 0 ... @end format' instead
+ (if not quoting) to change @exampleindent only locally.
+
+ * scripts/lilypond-book.py (NOQUOTE): New variable.
+ (output) [LATEX]: Remove AFTER and BEFORE.
+ [TEXINFO]: Remove AFTER and BEFORE.
+ Fix QUOTE and VERBATIM pattern.
+ Add NOQUOTE pattern.
+ (Lilypond_snippet) [output_info, output_latex]: Don't handle AFTER
+ and BEFORE.
+ [output_texinfo]: Use NOQUOTE.
+
+2004-10-31 Graham Percival <gperlist@shaw.ca>
+
+ * Documentation/user/changing-defaults.itely: clarify paper
+ size commands with correct info.
+
+ * Documentation/user/lilypond-book.itely: add more docs for
+ filename extensions.
+
+2004-10-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * VERSION (PATCH_LEVEL): Branch lilypond_2_4, release 2.4.0
+ (PATCH_LEVEL): start 2.5.0.
+
+
2004-10-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
* Documentation/user/preface.itely (Notes for version 2.4):
(ly_options): Remove NOINDENT and EXAMPLEINDENT patterns.
(compose_ly): Use `no_options' and `simple_options'.
Fix logic of option handling.
+ Handle `linewidth' option without parameter.
2004-10-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
work.
@item @uref{http://www.gnu.org/software/guile/guile.html,GUILE} (version 1.6.0 or newer).
+If you are installing a binary packages, you may need to install
+guile-devel or guile-dev or libguile-dev too.
@item @uref{http://www.gnu.org/software/flex/,Flex} (version 2.5.4a or newer).
Also, @TeX{}'s libkpathsea is used to find the fonts (@file{.mf},
@file{.afm}, @file{.tfm}). Make sure you have tetex 1.0 or newer
-(1.0.6 is known to work). You may need to install a tetex-devel (or
-tetex-dev or libkpathsea-dev) package too.
+(1.0.6 is known to work). If you are installing binary packages, you
+may need to install tetex-devel, tetex-dev or libkpathsea-dev too.
@item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.7 or newer).
-@item The
-@uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,geometry
-package for LaTeX}.
-
- This package is normally included with the @TeX{} distribution.
-
@item kpathsea, a library for searching (@TeX{}) files.
@item
document, the @internalsref{Program reference} manual. That manual
lists all different variables, functions and options available in
LilyPond. It is written as a HTML document, which is available
-@uref{http://lilypond.org/doc/Documentation/user/out-www/lilypond-internals/,on-line},
+@uref{http://@/lilypond@/.org/@/doc/@/Documentation/@/user/@/out@/-www/@/lilypond@/-internals/,on@/-line},
but is also included with the LilyPond documentation package.
There are three areas where the default settings may be changed:
We have been talking of `the' @code{Fingering} object, but actually it
does not amount to much. The initialization file
-@file{scm/define-grobs.scm} shows the soul of the `object',
+@file{scm/@/define@/-grobs@/.scm} shows the soul of the `object',
@verbatim
(Fingering
@seealso
-Init files: @file{ly/declarations-init.ly} contains hints how new
+Init files: @file{ly/@/declarations@/-init@/.ly} contains hints how new
fonts may be added to LilyPond.
@seealso
-Init files: @file{scm/new-markup.scm}.
+Init files: @file{scm/@/new@/-markup@/.scm}.
@refbugs
This is a demonstration of the fields available,
-@lilypond[verbatim]
+@lilypond[verbatim,linewidth=11.0\cm]
+\paper {
+ linewidth = 11.0\cm
+ vsize = 10.0\cm
+}
+
\book {
\header {
title = "Title,"
}
{ c'1 }
}
- \paper {
- linewidth = 8.0 \cm
- }
}
@end lilypond
@code{make-book-title} and @code{make-score-title} functions, defined
in the @code{\paper} of the @code{\book} block. These functions
create a block of titling, given the information in the
-@code{\header}. The init file @file{ly/titling.scm} shows how the
+@code{\header}. The init file @file{ly/@/titling@/.scm} shows how the
default format is created, and it may be used as a template for
different styles.
To change the paper size, there are two equal commands,
@example
#(set-default-paper-size "a4")
- \layout@{
+ \paper@{
#(set-paper-size "a4")
@}
@end example
-The first command sets the size of all pages. The second command sets the size of the pages that the @code{\layout} block applies to -- if the @code{\layout} block is at the top of the file, then it will apply to all pages. If the @code{\layout} block is inside a @code{\score}, then the paper size will only apply to that score.
+The first command sets the size of all pages. The second command sets the size of the pages that the @code{\paper} block applies to -- if the @code{\paper} block is at the top of the file, then it will apply to all pages. If the @code{\paper} block is inside a @code{\score}, then the paper size will only apply to that score.
The following paper sizes are supported.
The header and footer are created by the functions @code{make-footer}
and @code{make-header}, defined in @code{\paper}. The default
-implementations are in @file{scm/page-layout.scm}.
+implementations are in @file{scm/@/page@/-layout@/.scm}.
The following settings influence the header and footer layout.
@seealso
-Examples: @inputfileref{input/test,page-breaks.ly}
+Examples: @inputfileref{input/@/test,page@/-breaks@/.ly}
@refbugs
This behavior can be changed by setting the variable
@code{toplevel-score-handler} at toplevel. The default handler is
-defined in the init file @file{scm/lily.scm}.
+defined in the init file @file{scm/@/lily@/.scm}.
@item
A @code{\book} block logically combines multiple movements
This behavior can be changed by setting the variable
@code{toplevel-book-handler} at toplevel. The default handler is
-defined in the init file @file{scm/lily.scm}.
+defined in the init file @file{scm/@/lily@/.scm}.
@item A compound music expression, such as
This behavior can be changed by setting the variable
@code{toplevel-music-handler} at toplevel. The default handler is
-defined in the init file @file{scm/lily.scm}.
+defined in the init file @file{scm/@/lily@/.scm}.
@end itemize
@appendix Cheat sheet
-@multitable @columnfractions .3 .3 .4
+@multitable @columnfractions .35 .3 .35
@item @b{Syntax}
@tab @b{Description}
chapter documents the tools included in the distribution to do so.
There are other tools that produce LilyPond input, for example GUI
sequencers and XML converters. Refer to the
-@uref{http://lilypond.org,website} for more details.
+@uref{http://@/lilypond@/.org,website} for more details.
@cindex ABC
-ABC is a fairly simple ASCII based format. It is described at the ABC site:
+ABC is a fairly simple ASCII based format. It is described at the ABC site:
@quotation
-@uref{http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt}.
+@uref{http://@/www@/.gre@/.ac@/.uk/@/~c.walshaw/@/abc2mtex/@/abc@/.txt}.
@end quotation
abc2ly translates from ABC to LilyPond. It is invoked as follows:
there are also external tools that generate LilyPond files.
These tools include
-http://denemo.sourceforge.net/
+@uref{http://@/denemo@/.sourceforge@/.net/,Denemo}.
@itemize @bullet
-@item @uref{http://www.nongnu.org/xml2ly/, xml2ly}, that imports
-@uref{http://www.musicxml.com/,MusicXML}
+@item @uref{http://@/www@/.nongnu@/.org/@/xml2ly/, xml2ly}, that imports
+@uref{http://@/www@/.musicxml@/.com/,MusicXML}
@item
-@uref{http://rnvs.informatik.tu-chemnitz.de/~jan/noteedit/noteedit.html,NoteEdit}
+@uref{http://@/rnvs@/.informatik@/.tu@/-chemnitz@/.de/@/~jan/@/noteedit/@/noteedit@/.html,NoteEdit}
which imports MusicXML
-@item @uref{http://www.all-day-breakfast.com/rosegarden/,Rosegarden},
+@item @uref{http://@/www@/.all@/-day@/-breakfast@/.com/@/rosegarden/,Rosegarden},
which imports MIDI
@end itemize
@unnumbered Full Grob interface list
The automatic documentation failed to build.
-Visit @uref{http://www.cs.uu.nl/~hanwen/lilypond/Documentation,lilypond online}
+Visit @uref{http://@/www@/.cs@/.uu@/.nl/@/~hanwen/@/lilypond/@/Documentation,lilypond online}
instrument or a melodic fragment. Cut and paste this into a file,
add notes, and you're finished!
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
automatic beaming, you'll have to change or comment out the relevant
line.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
Want to prepare a lead sheet with a melody and chords? Look no further!
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
This template allows you to prepare a song with melody, words, and chords.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
Here is a simple piano staff.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
Here is a typical song format: one staff with the melody and lyrics, with
piano accompaniment underneath.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c'' {
\clef treble
Instead of having a full staff for the melody and lyrics, you can place
the lyrics between the piano staff (and omit the separate melody staff).
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
since the template is right here, you don't have to do the
tweaking yourself.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
This template demonstrates a string quartet. It also uses a @code{\global}
section for time and key signatures.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
global = {
\time 4/4
parts. For example, the time signature and key signatures are almost
always the same for all parts.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
global = {
\key c \major
\context ChoirStaff <<
\context Lyrics = sopranos { s1 }
\context Staff = women <<
- \context Voice = sopranos { \voiceOne << \global \sopMusic >> }
- \context Voice = altos { \voiceTwo << \global \altoMusic >> }
+ \context Voice =
+ sopranos { \voiceOne << \global \sopMusic >> }
+ \context Voice =
+ altos { \voiceTwo << \global \altoMusic >> }
>>
\context Lyrics = altos { s1 }
\context Lyrics = tenors { s1 }
\context Staff = men <<
\clef bass
- \context Voice = tenors { \voiceOne <<\global \tenorMusic >> }
- \context Voice = basses { \voiceTwo <<\global \bassMusic >> }
+ \context Voice =
+ tenors { \voiceOne <<\global \tenorMusic >> }
+ \context Voice =
+ basses { \voiceTwo <<\global \bassMusic >> }
>>
\context Lyrics = basses { s1 }
\context Lyrics = sopranos \lyricsto sopranos \sopWords
\layout {
\context {
- % a little smaller so lyrics can be closer to the staff.
+ % a little smaller so lyrics
+ % can be closer to the staff
\Staff minimumVerticalExtent = #'(-3 . 3)
}
}
notes. As a compromise, bar lines are often printed between the
staves rather than on the staves.
-@lilypond[verbatim,linewidth=11.0\cm]
+@lilypond[quote,verbatim,linewidth=11.0\cm]
\version "2.3.22"
global = {
- % incipit
- \once \override Score.SystemStartBracket #'transparent = ##t
- \key f \major
- \time 2/2
- \once \override Staff.TimeSignature #'style = #'neomensural
- \override Voice.NoteHead #'style = #'neomensural
- \override Voice.Rest #'style = #'neomensural
- \set Staff.printKeyCancellation = ##f
- \cadenzaOn % turn off bar lines
- \skip 1*10
- \once \override Staff.BarLine #'transparent = ##f
- \bar "||"
- \skip 1*1 % need this extra \skip such that clef change comes
- % after bar line
- \bar ""
-
- % main
- \cadenzaOff % turn bar lines on again
- \once \override Staff.Clef #'full-size-change = ##t
- \set Staff.forceClef = ##t
- \key g \major
- \time 4/4
- \override Voice.NoteHead #'style = #'default
- \override Voice.Rest #'style = #'default
+ % incipit
+ \once \override Score.SystemStartBracket #'transparent = ##t
+ \key f \major
+ \time 2/2
+ \once \override Staff.TimeSignature #'style = #'neomensural
+ \override Voice.NoteHead #'style = #'neomensural
+ \override Voice.Rest #'style = #'neomensural
+ \set Staff.printKeyCancellation = ##f
+ \cadenzaOn % turn off bar lines
+ \skip 1*10
+ \once \override Staff.BarLine #'transparent = ##f
+ \bar "||"
+ \skip 1*1 % need this extra \skip such that clef change comes
+ % after bar line
+ \bar ""
+
+ % main
+ \cadenzaOff % turn bar lines on again
+ \once \override Staff.Clef #'full-size-change = ##t
+ \set Staff.forceClef = ##t
+ \key g \major
+ \time 4/4
+ \override Voice.NoteHead #'style = #'default
+ \override Voice.Rest #'style = #'default
- % FIXME: setting printKeyCancellation back to #t must not
- % occur in the first bar after the incipit. Dto. for forceClef.
- % Therefore, we need an extra \skip.
- \skip 1*1
- \set Staff.printKeyCancellation = ##t
- \set Staff.forceClef = ##f
+ % FIXME: setting printKeyCancellation back to #t must not
+ % occur in the first bar after the incipit. Dto. for forceClef.
+ % Therefore, we need an extra \skip.
+ \skip 1*1
+ \set Staff.printKeyCancellation = ##t
+ \set Staff.forceClef = ##f
- \skip 1*5
+ \skip 1*5
- % last bar contains a brevis (i.e. spans 2 bars);
- % therefore do not draw this particular bar
- \cadenzaOn
- \skip 1*2
- \cadenzaOff
+ % last bar contains a brevis (i.e. spans 2 bars);
+ % therefore do not draw this particular bar
+ \cadenzaOn
+ \skip 1*2
+ \cadenzaOff
- % let finis bar go through all staves
- \override Staff.BarLine #'transparent = ##f
+ % let finis bar go through all staves
+ \override Staff.BarLine #'transparent = ##f
- % finis bar
- \bar "|."
+ % finis bar
+ \bar "|."
}
discantusNotes = {
- \transpose c' c'' {
- \set Staff.instrument = "Discantus "
-
- % incipit
- \clef "neomensural-c1"
- c'1. s2 % two bars
- \skip 1*8 % eight bars
- \skip 1*1 % one bar
-
- % main
- \clef "treble"
- d'2. d'4 |
- b e' d'2 |
- c'4 e'4.( d'8 c' b |
- a4) b a2 |
- b4.( c'8 d'4) c'4 |
- \once \override NoteHead #'transparent = ##t c'1 |
- b\breve |
- }
+ \transpose c' c'' {
+ \set Staff.instrument = "Discantus "
+
+ % incipit
+ \clef "neomensural-c1"
+ c'1. s2 % two bars
+ \skip 1*8 % eight bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble"
+ d'2. d'4 |
+ b e' d'2 |
+ c'4 e'4.( d'8 c' b |
+ a4) b a2 |
+ b4.( c'8 d'4) c'4 |
+ \once \override NoteHead #'transparent = ##t c'1 |
+ b\breve |
+ }
}
discantusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- |
- la -- te De -- |
- o, om --
- nis ter -- |
- ra, __ om- |
- "..." |
- -us. |
+ % main
+ Ju -- bi -- |
+ la -- te De -- |
+ o, om --
+ nis ter -- |
+ ra, __ om- |
+ "..." |
+ -us. |
}
altusNotes = {
- \transpose c' c'' {
- \set Staff.instrument = "Altus "
-
- % incipit
- \clef "neomensural-c3"
- r1 % one bar
- f1. s2 % two bars
- \skip 1*7 % seven bars
- \skip 1*1 % one bar
-
- % main
- \clef "treble"
- r2 g2. e4 fis g | % two bars
- a2 g4 e |
- fis g4.( fis16 e fis4) |
- g1 |
- \once \override NoteHead #'transparent = ##t g1 |
- g\breve |
- }
+ \transpose c' c'' {
+ \set Staff.instrument = "Altus "
+
+ % incipit
+ \clef "neomensural-c3"
+ r1 % one bar
+ f1. s2 % two bars
+ \skip 1*7 % seven bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble"
+ r2 g2. e4 fis g | % two bars
+ a2 g4 e |
+ fis g4.( fis16 e fis4) |
+ g1 |
+ \once \override NoteHead #'transparent = ##t g1 |
+ g\breve |
+ }
}
altusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- la -- te | % two bars
- De -- o, om -- |
- nis ter -- ra, |
- "..." |
- -us. |
+ % main
+ Ju -- bi -- la -- te | % two bars
+ De -- o, om -- |
+ nis ter -- ra, |
+ "..." |
+ -us. |
}
tenorNotes = {
- \transpose c' c' {
- \set Staff.instrument = "Tenor "
-
- % incipit
- \clef "neomensural-c4"
- r\longa % four bars
- r\breve % two bars
- r1 % one bar
- c'1. s2 % two bars
- \skip 1*1 % one bar
- \skip 1*1 % one bar
-
- % main
- \clef "treble_8"
- R1 |
- R1 |
- R1 |
- r2 d'2. d'4 b e' | % two bars
- \once \override NoteHead #'transparent = ##t e'1 |
- d'\breve |
- }
+ \transpose c' c' {
+ \set Staff.instrument = "Tenor "
+
+ % incipit
+ \clef "neomensural-c4"
+ r\longa % four bars
+ r\breve % two bars
+ r1 % one bar
+ c'1. s2 % two bars
+ \skip 1*1 % one bar
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble_8"
+ R1 |
+ R1 |
+ R1 |
+ r2 d'2. d'4 b e' | % two bars
+ \once \override NoteHead #'transparent = ##t e'1 |
+ d'\breve |
+ }
}
tenorLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- la -- te | % two bars
- "..." |
- -us. |
+ % main
+ Ju -- bi -- la -- te | % two bars
+ "..." |
+ -us. |
}
bassusNotes = {
- \transpose c' c' {
- \set Staff.instrument = "Bassus "
-
- % incipit
- \clef "bass"
- r\maxima % eight bars
- f1. s2 % two bars
- \skip 1*1 % one bar
-
- % main
- \clef "bass"
- R1 |
- R1 |
- R1 |
- R1 |
- g2. e4 |
- \once \override NoteHead #'transparent = ##t e1 |
- g\breve |
- }
+ \transpose c' c' {
+ \set Staff.instrument = "Bassus "
+
+ % incipit
+ \clef "bass"
+ r\maxima % eight bars
+ f1. s2 % two bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "bass"
+ R1 |
+ R1 |
+ R1 |
+ R1 |
+ g2. e4 |
+ \once \override NoteHead #'transparent = ##t e1 |
+ g\breve |
+ }
}
bassusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi- |
- "..." |
- -us. |
+ % main
+ Ju -- bi- |
+ "..." |
+ -us. |
}
\score {
- \context StaffGroup = choirStaff <<
- \context Voice = discantusNotes << \global \discantusNotes >>
- \context Lyrics = discantusLyrics
- \lyricsto discantusNotes { \discantusLyrics }
- \context Voice = altusNotes << \global \altusNotes >>
- \context Lyrics = altusLyrics \lyricsto altusNotes { \altusLyrics }
- \context Voice = tenorNotes << \global \tenorNotes >>
- \context Lyrics = tenorLyrics \lyricsto tenorNotes { \tenorLyrics }
- \context Voice = bassusNotes << \global \bassusNotes >>
- \context Lyrics = bassusLyrics
- \lyricsto bassusNotes { \bassusLyrics }
- >>
- \layout {
- \context {
- \Score
- \override BarLine #'transparent = ##t
- \remove "System_start_delimiter_engraver"
- }
- \context {
- \Voice
- \override Slur #'transparent = ##t
- }
- }
+ \context StaffGroup = choirStaff <<
+ \context Voice =
+ discantusNotes << \global \discantusNotes >>
+ \context Lyrics =
+ discantusLyrics \lyricsto discantusNotes { \discantusLyrics }
+ \context Voice =
+ altusNotes << \global \altusNotes >>
+ \context Lyrics =
+ altusLyrics \lyricsto altusNotes { \altusLyrics }
+ \context Voice =
+ tenorNotes << \global \tenorNotes >>
+ \context Lyrics =
+ tenorLyrics \lyricsto tenorNotes { \tenorLyrics }
+ \context Voice =
+ bassusNotes << \global \bassusNotes >>
+ \context Lyrics =
+ bassusLyrics \lyricsto bassusNotes { \bassusLyrics }
+ >>
+ \layout {
+ \context {
+ \Score
+ \override BarLine #'transparent = ##t
+ \remove "System_start_delimiter_engraver"
+ }
+ \context {
+ \Voice
+ \override Slur #'transparent = ##t
+ }
+ }
}
@end lilypond
@c FIXME: produces a warning ; key change merge.
@c The `linewidth' argument is for the \header.
-@lilypond[verbatim,raggedright,linewidth]
+@lilypond[quote,verbatim,raggedright,linewidth]
\version "2.3.22"
\header {
title = "Song"
composer = "Me"
meter = "moderato"
piece = "Swing"
- tagline = "LilyPond example file by Amelie Zapf, Berlin 07/07/2003"
- texidoc = "Jazz tune for combo (horns, guitar, piano, bass, drums)."
+ tagline = "LilyPond example file by Amelie Zapf,
+ Berlin 07/07/2003"
+ texidoc = "Jazz tune for combo
+ (horns, guitar, piano, bass, drums)."
}
#(set-global-staff-size 16)
%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
sl = {
- \override NoteHead #'style = #'slash
- \override Stem #'transparent = ##t
+ \override NoteHead #'style = #'slash
+ \override Stem #'transparent = ##t
}
nsl = {
- \revert NoteHead #'style
- \revert Stem #'transparent
+ \revert NoteHead #'style
+ \revert Stem #'transparent
}
-cr = \override NoteHead #'style = #'cross
+cr = \override NoteHead #'style = #'cross
ncr = \revert NoteHead #'style
%% insert chord name style stuff here.
%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
-global = {
- \time 4/4
+global = {
+ \time 4/4
}
-Key = { \key c \major }
+Key = { \key c \major }
% ############ Horns ############
+
% ------ Trumpet ------
trpt = \transpose c d \relative c'' {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+trpharmony = \transpose c' d {
+ \jzchords
}
-
-trpharmony = \transpose c' d { \jzchords }
trumpet = {
- \global
- \set Staff.instrument = #"Trumpet"
- \clef treble
- \context Staff <<
- \trpt
- >>
+ \global
+ \set Staff.instrument = #"Trumpet"
+ \clef treble
+ \context Staff <<
+ \trpt
+ >>
}
% ------ Alto Saxophone ------
alto = \transpose c a \relative c' {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+altoharmony = \transpose c' a {
+ \jzchords
}
-
-altoharmony = \transpose c' a { \jzchords }
altosax = {
- \global
- \set Staff.instrument = #"Alto Sax"
- \clef treble
- \context Staff <<
- \alto
- >>
+ \global
+ \set Staff.instrument = #"Alto Sax"
+ \clef treble
+ \context Staff <<
+ \alto
+ >>
}
% ------ Baritone Saxophone ------
bari = \transpose c a' \relative c {
- \Key
- c1 c \sl d4^"Solo" d d d \nsl
+ \Key
+ c1 c \sl d4^"Solo" d d d \nsl
+}
+bariharmony = \transpose c' a \chordmode {
+ \jzchords s1 s d2:maj e:m7
}
-
-bariharmony = \transpose c' a \chordmode { \jzchords s1 s d2:maj e:m7 }
barisax = {
- \global
- \set Staff.instrument = #"Bari Sax"
- \clef treble
- \context Staff <<
- \bari
- >>
+ \global
+ \set Staff.instrument = #"Bari Sax"
+ \clef treble
+ \context Staff <<
+ \bari
+ >>
}
+
% ------ Trombone ------
tbone = \relative c {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+tboneharmony = \chordmode {
+ \jzchords
}
-
-tboneharmony = \chordmode { \jzchords }
trombone = {
- \global
- \set Staff.instrument = #"Trombone"
- \clef bass
- \context Staff <<
- \tbone
- >>
+ \global
+ \set Staff.instrument = #"Trombone"
+ \clef bass
+ \context Staff <<
+ \tbone
+ >>
}
+
% ############ Rhythm Section #############
+
% ------ Guitar ------
gtr = \relative c'' {
- \Key
- c1 \sl b4 b b b \nsl c1
+ \Key
+ c1 \sl b4 b b b \nsl c1
}
-
-gtrharmony = \chordmode { \jzchords
- s1 c2:min7+ d2:maj9
+gtrharmony = \chordmode {
+ \jzchords
+ s1 c2:min7+ d2:maj9
}
-
guitar = {
- \global
- \set Staff.instrument = #"Guitar"
- \clef treble
- \context Staff <<
- \gtr
- >>
+ \global
+ \set Staff.instrument = #"Guitar"
+ \clef treble
+ \context Staff <<
+ \gtr
+ >>
}
%% ------ Piano ------
-rhUpper = \relative c'' {
- \voiceOne
- \Key
- c1 c c
+rhUpper = \relative c'' {
+ \voiceOne
+ \Key
+ c1 c c
}
-
-rhLower = \relative c' {
- \voiceTwo
- \Key
- e1 e e
+rhLower = \relative c' {
+ \voiceTwo
+ \Key
+ e1 e e
}
-lhUpper = \relative c' {
- \voiceOne
- \Key
- g1 g g
+lhUpper = \relative c' {
+ \voiceOne
+ \Key
+ g1 g g
}
-
-lhLower = \relative c {
- \voiceTwo
- \Key
- c1 c c
+lhLower = \relative c {
+ \voiceTwo
+ \Key
+ c1 c c
}
PianoRH = {
- \clef treble
- \global
- \set Staff.midiInstrument = "acoustic grand"
- \context Staff <<
- \context Voice = one \rhUpper
- \context Voice = two \rhLower
- >>
+ \clef treble
+ \global
+ \set Staff.midiInstrument = "acoustic grand"
+ \context Staff <<
+ \context Voice = one \rhUpper
+ \context Voice = two \rhLower
+ >>
}
-
PianoLH = {
- \clef bass
- \global
- \set Staff.midiInstrument = "acoustic grand"
- \context Staff <<
- \context Voice = one \lhUpper
- \context Voice = two \lhLower
- >>
+ \clef bass
+ \global
+ \set Staff.midiInstrument = "acoustic grand"
+ \context Staff <<
+ \context Voice = one \lhUpper
+ \context Voice = two \lhLower
+ >>
}
piano = {
- \context PianoStaff <<
- \set PianoStaff.instrument = #"Piano"
- \context Staff = upper \PianoRH
- \context Staff = lower \PianoLH
- >>
+ \context PianoStaff <<
+ \set PianoStaff.instrument = #"Piano"
+ \context Staff = upper \PianoRH
+ \context Staff = lower \PianoLH
+ >>
}
% ------ Bass Guitar ------
-bass = \relative c {
- \Key
- c1 c c
+Bass = \relative c {
+ \Key
+ c1 c c
}
-
bass = {
- \global
- \set Staff.instrument = #"Bass"
- \clef bass
- \context Staff <<
- \bass
- >>
+ \global
+ \set Staff.instrument = #"Bass"
+ \clef bass
+ \context Staff <<
+ \Bass
+ >>
}
- % ------ Drums ------
-
+% ------ Drums ------
up = \drummode {
- hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
+ hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
+ hh4 <hh sn>4
+ hh4 <hh sn>4
+ hh4 <hh sn>4
}
down = \drummode {
- bd4 s bd s bd s bd s bd s bd s
+ bd4 s bd s bd s bd s bd s bd s
}
drumContents = {
- \global
- <<
- \set DrumStaff.instrument = #"Drums"
- \new DrumVoice { \voiceOne \up }
- \new DrumVoice { \voiceTwo \down }
- >>
+ \global
+ <<
+ \set DrumStaff.instrument = #"Drums"
+ \new DrumVoice { \voiceOne \up }
+ \new DrumVoice { \voiceTwo \down }
+ >>
}
%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
\score {
-<<
- \context StaffGroup = horns <<
- \context Staff = trumpet \trumpet
-
- \context Staff = altosax \altosax
-
- \context ChordNames = barichords \bariharmony
-
- \context Staff = barisax \barisax
-
- \context Staff = trombone \trombone
- >>
+ <<
+ \context StaffGroup = horns <<
+ \context Staff = trumpet \trumpet
+ \context Staff = altosax \altosax
+ \context ChordNames = barichords \bariharmony
+ \context Staff = barisax \barisax
+ \context Staff = trombone \trombone
+ >>
- \context StaffGroup = rhythm <<
- \context ChordNames = chords \gtrharmony
- \context Staff = guitar \guitar
- \context PianoStaff = piano \piano
+ \context StaffGroup = rhythm <<
+ \context ChordNames = chords \gtrharmony
+ \context Staff = guitar \guitar
+ \context PianoStaff = piano \piano
+ \context Staff = bass \bass
+ \new DrumStaff { \drumContents }
+ >>
+ >>
- \context Staff = bass \bass
+ \layout {
+ \context { \RemoveEmptyStaffContext }
+ \context {
+ \Score
+ \override BarNumber #'padding = #3
+ \override RehearsalMark #'padding = #2
+ skipBars = ##t
+ }
+ }
- \new DrumStaff { \drumContents }
- >>
->>
- \layout {
- \context { \RemoveEmptyStaffContext }
- \context {
- \Score
- \override BarNumber #'padding = #3
- \override RehearsalMark #'padding = #2
- skipBars = ##t
- }
- }
- \midi { \tempo 4 = 75 }
+ \midi { \tempo 4 = 75 }
}
-
@end lilypond
@node Other templates
"Petr Tchaikowski" on your music.
@ The `linewidth' is for \header.
-@lilypond[verbatim,raggedright,linewidth]
+@lilypond[quote,verbatim,raggedright,linewidth]
\version "2.3.22"
\header {
- dedication = "dedication"
- title = "Title"
- subtitle = "Subtitle"
- subsubtitle = "Subsubtitle"
- composer = "Composer (xxxx-yyyy)"
- opus = "Opus 0"
- piece = "Piece I"
- instrument = "Instrument"
- arranger = "Arranger"
- poet = "Poet"
- texttranslator = "Translator"
- copyright = "public domain"
-
-% These are headers used by the Mutopia Project http://www.mutopiaproject.org/
- mutopiatitle = ""
- mutopiacomposer = ""
- mutopiapoet = ""
- mutopiainstrument = ""
- date = "composer's dates"
- source = "urtext "
- maintainer = "your name here"
- maintainerEmail = "your email here"
- maintainerWeb = "your home page"
- lastupdated = "2004/Aug/26"
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+
+ % These are headers used by the Mutopia Project
+ % http://www.mutopiaproject.org/
+ mutopiatitle = ""
+ mutopiacomposer = ""
+ mutopiapoet = ""
+ mutopiainstrument = ""
+ date = "composer's dates"
+ source = "urtext "
+ maintainer = "your name here"
+ maintainerEmail = "your email here"
+ maintainerWeb = "your home page"
+ lastupdated = "2004/Aug/26"
}
\score {
- \header {
- piece = "piece1"
- opus = "opus1"
- }
- { c'4 }
+ \header {
+ piece = "piece1"
+ opus = "opus1"
+ }
+ { c'4 }
}
\score {
- \header {
- piece = "piece2"
- opus = "opus2"
- }
- { c'4 }
+ \header {
+ piece = "piece2"
+ opus = "opus2"
+ }
+ { c'4 }
}
-
@end lilypond
@subsection Gregorian template
quarter notes, and two types of barlines, a short one indicating a rest,
and a second one indicating a breath mark.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
barOne = { \once \override Staff.BarLine #'bar-size = #2
- \bar "|" }
+ \bar "|" }
barTwo = { \once \override Staff.BarLine #'extra-offset = #'(0 . 2)
- \once \override Staff.BarLine #'bar-size = #2
- \bar "|" }
+ \once \override Staff.BarLine #'bar-size = #2
+ \bar "|" }
chant = \relative c' {
- \set Score.timing = ##f
- \override Staff.Stem #'transparent = ##t
+ \set Score.timing = ##f
+ \override Staff.Stem #'transparent = ##t
- f4 a2 \barTwo
- g4 a2 f2 \barOne
- g4( f) f( g) a2
+ f4 a2 \barTwo
+ g4 a2 f2 \barOne
+ g4( f) f( g) a2
}
\score {
- \chant
- \layout{ }
- \midi { \tempo 4=60 }
+ \chant
+ \layout{ }
+ \midi { \tempo 4=60 }
}
-
@end lilypond
@subsection Bagpipe music
TODO - replace Bagpipe template with Andrew McNabb's work?
-@lilypond[verbatim]
-
+@lilypond[quote,verbatim]
taor = { \grace { g32[ d' g e'] } }
grip = { \grace { g32[ b g ] } }
thrd = { \grace { g32[ d' c'] } }
gcdg = { \grace { g'32[ c' d'] } }
\transpose a a' {
- #(add-grace-property 'Voice 'Stem 'length 6)
- \time 6/8 \partial 4
- \tieUp
- \slurUp
-
- f'4 |
- \gg f'4 e'8 \thrd d'4. |
- \eg a4.(a4) d'8 |
- \gg d'4 f'8 \dble e'4. ( | \noBreak
- e'8) d'4 \gg d'4 e'8 |
-
- \break
- \time 9/8
- \dblf f'2.( f'4) d'8 |
- \time 6/8
- \dblg g'4 a'8 \gg a'4. |
- \thrd d'4.( d'4) \eg a8 |
- \time 9/8
- \dble e'4 \lag e'8 \gg e'16[ d'8. e'8] \gg f'4 g'8 |
-
- \break
- \time 6/8
- \gg f'4 e'8 \thrd d'4. |
- \eg a4.( a4) d'8 |
- \dblg g'4 a'8 \gg a'4. |
- \thrd d'4.( d'4) f'8 |
-
- \break
- \dblg g'4 e'8( e'8) \dblf f'8.[ e'16] |
- \thrd d'4.( d'4) \cg d'8 |
- \gg c'4 e'8 \thrd d'4.( |
- d'4.) \gdcg d'4.
-
+ #(add-grace-property 'Voice 'Stem 'length 6)
+ \time 6/8 \partial 4
+ \tieUp
+ \slurUp
+
+ f'4 |
+ \gg f'4 e'8 \thrd d'4. |
+ \eg a4.(a4) d'8 |
+ \gg d'4 f'8 \dble e'4. ( | \noBreak
+ e'8) d'4 \gg d'4 e'8 |
+
+ \break
+ \time 9/8
+ \dblf f'2.( f'4) d'8 |
+ \time 6/8
+ \dblg g'4 a'8 \gg a'4. |
+ \thrd d'4.( d'4) \eg a8 |
+ \time 9/8
+ \dble e'4 \lag e'8 \gg e'16[ d'8. e'8] \gg f'4 g'8 |
+
+ \break
+ \time 6/8
+ \gg f'4 e'8 \thrd d'4. |
+ \eg a4.( a4) d'8 |
+ \dblg g'4 a'8 \gg a'4. |
+ \thrd d'4.( d'4) f'8 |
+
+ \break
+ \dblg g'4 e'8( e'8) \dblf f'8.[ e'16] |
+ \thrd d'4.( d'4) \cg d'8 |
+ \gg c'4 e'8 \thrd d'4.( |
+ d'4.) \gdcg d'4.
}
-
@end lilypond
constant rhythm. The spacing should reflect that. Unfortunately, the
eye deceives us a little; not only does it notice the distance between
note heads, it also takes into account the distance between
-consecutive stems. As a result, the notes of an up-stem/down-stem
+consecutive stems. As a result, the notes of an up-stem/@/down-stem
combination should be put farther apart, and the notes of a down-up
combination should be put closer together, all depending on the
combined vertical positions of the notes. The first two measures are
printed with this correction, the last two measures without. The notes
-in the last two measures form down-stem/up-stem clumps of notes.
+in the last two measures form down-stem/@/up-stem clumps of notes.
@cindex typography
vary from system to system. On occasion, this manual refers to
initialization and example files. Throughout this manual, we refer to
input files relative to the top-directory of the source archive. For
-example, @file{input/test/bla.ly} may refer to the file
-@file{lilypond-2.3.14/input/test/bla.ly}. On binary packages for the
-Unix platform, the documentation and examples can typically be found
-somewhere below @file{/usr/share/doc/lilypond/}. Initialization files,
-for example @file{scm/lily.scm}, or @file{ly/engraver-init.ly}, are
-usually found in the directory @file{/usr/share/lilypond/}.
+example, @file{input/@/test/@/bla@/.ly} may refer to the file
+@file{lilypond@/-2.3.14/@/input/@/test/@/bla@/.ly}. On binary packages
+for the Unix platform, the documentation and examples can typically be
+found somewhere below @file{/usr/@/share/@/doc/@/lilypond/}.
+Initialization files, for example @file{scm/@/lily@/.scm}, or
+@file{ly/@/engraver@/-init@/.ly}, are usually found in the directory
+@file{/usr/@/share/@/lilypond/}.
@cindex adjusting output
@cindex variables
Finally, this and all other manuals, are available online both as PDF
files and HTML from the web site, which can be found at
-@uref{http://www.lilypond.org/}.
+@uref{http://@/www@/.lilypond@/.org/}.
@cindex website
@cindex URL
This chapter details the technicalities of running LilyPond.
-
+
@menu
-* Invoking lilypond::
-* Error messages::
-* Reporting bugs::
-* Editor support::
-* Invoking lilypond-latex::
+* Invoking lilypond::
+* Error messages::
+* Reporting bugs::
+* Editor support::
+* Invoking lilypond-latex::
@end menu
@node Invoking lilypond
The @code{lilypond} may be called as follows from the command line.
@example
- lilypond [@var{option}]@dots{} @var{file}@dots{}
+lilypond [@var{option}]@dots{} @var{file}@dots{}
@end example
@item -h,--help
Show a summary of usage.
+
@item --include, -I=@var{directory}
Add @var{directory} to the search path for input files.
@cindex file searching
@cindex search path
+
@item -i,--init=@var{file}
Set init file to @var{file} (default: @file{init.ly}).
+
@item -o,--output=@var{FILE}
- Set the default output file to @var{FILE}.
+Set the default output file to @var{FILE}.
+
@item --ps
- Generate PostScript.
+Generate PostScript.
+
@item --dvi
- Generate DVI files. In this case, the @TeX{} backend should be
- specified, i.e. @code{-f tex}.
+Generate DVI files. In this case, the @TeX{} backend should be
+specified, i.e. @code{-f tex}.
+
@item --png
- Generate pictures of each page, in PNG format. This implies @code{--ps}.
+Generate pictures of each page, in PNG format. This implies @code{--ps}.
+
@item --pdf
- Generate PDF. This implies @code{--ps}.
+Generate PDF. This implies @code{--ps}.
+
@item --preview
- Generate an output file containing the titles and the first system
+Generate an output file containing the titles and the first system
+
@item --no-pages
- Do not generate the full pages. Useful in combination with
+Do not generate the full pages. Useful in combination with
@code{--preview}.
+
@item -s,--safe
-Do not trust the @code{.ly} input.
+Do not trust the @code{.ly} input.
When LilyPond formatting is available through a web server, the
@code{--safe} @b{MUST} be passed. This will prevent inline Scheme
-code from wreaking havoc, for example
+code from wreaking havoc, for example
+@quotation
@verbatim
- #(system "rm -rf /")
- {
- c4^#(ly:export (ly:gulp-file "/etc/passwd"))
- }
+#(system "rm -rf /")
+{
+ c4^#(ly:export (ly:gulp-file "/etc/passwd"))
+}
@end verbatim
+@end quotation
The @code{--safe} option works by evaluating in-line Scheme
expressions in a special safe module. This safe module is derived from
GUILE @file{safe-r5rs} module, but adds a number of functions of the
-LilyPond API. These functions are listed in @file{scm/safe-lily.scm}.
+LilyPond API. These functions are listed in @file{scm/@/safe@/-lily@/.scm}.
In addition, @code{--safe} disallows @code{\include} directives and
disables the use of backslashes in @TeX{} strings.
In @code{--safe} mode, it is not possible to import LilyPond variables
-into Scheme.
+into Scheme.
@code{--safe} does @emph{not} detect resource overuse. It is still
possible to make the program hang indefinitely, for example by feeding
information.
@item -w,--warranty
-Show the warranty with which GNU LilyPond comes. (It comes with
+Show the warranty with which GNU LilyPond comes. (It comes with
@strong{NO WARRANTY}!)
@end table
-@section Environment variables
+@section Environment variables
For processing both the @TeX{} and the PostScript output, the
appropriate environment variables must be set. The following scripts
do this:
@itemize @bullet
-@item @file{buildscripts/out/lilypond-profile}
+@item @file{buildscripts/@/out/@/lilypond@/-profile}
(for SH shells)
-@item @file{buildscripts/out/lilypond-login} (for C-shells)
+@item @file{buildscripts/@/out/@/lilypond@/-login} (for C-shells)
@end itemize
They should normally be sourced as part of the login process. If these
If you use sh, bash, or a similar shell, then add the following to
your @file{.profile}:
@example
- . @var{/the/path/to/}lilypond-profile
+. @var{/the/path/to/}lilypond-profile
@end example
If you use csh, tcsh or a similar shell, then add the following to
your @file{~/.login}:
@example
- source @var{/the/path/to/}lilypond-login
+source @var{/the/path/to/}lilypond-login
@end example
Of course, in both cases, you should substitute the proper location of
These scripts set the following variables:
@table @code
@item TEXMF
- To make sure that @TeX{} and lilypond find data files (among
+To make sure that @TeX{} and lilypond find data files (among
others @file{.tex}, @file{.mf} and @file{.tfm}),
you have to set @code{TEXMF} to point to the lilypond data
file tree. A typical setting would be
@cindex warning
@item Warning
- Something looks suspect. If you are requesting something out of the
+Something looks suspect. If you are requesting something out of the
ordinary then you will understand the message, and can ignore it.
However, warnings usually indicate that something is wrong with the
input file.
following form
@example
- @var{filename}:@var{lineno}:@var{columnno}: @var{message}
- @var{offending input line}
-@end example
+@var{filename}:@var{lineno}:@var{columnno}: @var{message}
+@var{offending input line}
+@end example
A line-break is inserted in offending line to indicate the column
-where the error was found. For example,
+where the error was found. For example,
@example
test.ly:2:19: error: not a duration: 5:
- @{ c'4 e'5
+ @{ c'4 e'5
g' @}
@end example
the report to @email{bug-lilypond@@gnu.org}.
When you've found a bug, have a look at our
-@uref{http://@/lilypond.org/@/doc/@/v2.3/@/bugs/,bug database} to see if it
-has already been reported. You could also try doing a few searches
+@uref{http://@/lilypond@/.org/@/doc/@/v2.3/@/bugs/,bug database} to see if
+it has already been reported. You could also try doing a few searches
on the mailing list for the bug. Sometimes the bug will have already
been reported and a fix or workaround is already known.
Here is an example of a good bug report:
-@verbatim
-
-It seems that placement of accidentals is broken. In the
+@example
+It seems that placement of accidentals is broken. In the
following example, the accidental touches the note head.
Using Mac OSX 10.3.5, fink package lilypond-unstable
\version "2.3.22"
-\relative c''{
+\relative c''@{
a4 b cis d
-}
-@end verbatim
+@}
+@end example
-@lilypond
+@lilypond[quote]
\version "2.3.22"
\relative c''{
- \override Accidental #'extra-offset = #'(1.0 . 0)
- a4 b cis d
+ \override Accidental #'extra-offset = #'(1.0 . 0)
+ a4 b cis d
}
@end lilypond
@cindex editors
@cindex vim
@cindex emacs
-@cindex modes, editor
+@cindex modes, editor
@cindex syntax coloring
@cindex coloring, syntax
@item VIM
-For @uref{http://www.vim.org,VIM}, a @file{vimrc} is supplied, along with
-syntax coloring tools. For more information, refer to the
+For @uref{http://@/www@/.vim@/.org,VIM}, a @file{vimrc} is supplied, along
+with syntax coloring tools. For more information, refer to the
@ifhtml
@uref{../../../topdocs/out-www/INSTALL.html,installation instructions}.
@end ifhtml
@item JEdit
-The @uref{http://www.jedit.org/,jEdit} editor has a LilyPond plugin.
+The @uref{http://@/www@/.jedit@/.org/,jEdit} editor has a LilyPond plugin.
This plugin includes a DVI viewer, integrated help and viewing via
GhostScript. It can be installed by doing @key{Plugins > Plugin
Manager}, and selecting @code{LilyTool} from the @key{Install} tab.
@node Invoking lilypond-latex
@section Invoking lilypond-latex
-Before LilyPond 3.0, the @code{lilypond} program only generated music
+Before LilyPond 2.4, the @code{lilypond} program only generated music
notation. Titles and page layout was done in a separate wrapper
program. For compatibility with older files, this wrapper program has
been retained as @code{lilypond-latex}. It uses the LilyPond program
The @code{lilypond-latex} wrapper is invoked from the command-line as
follows
@example
- @code{lilypond-latex} [@var{option}]@dots{} @var{file}@dots{}
+@code{lilypond-latex} [@var{option}]@dots{} @var{file}@dots{}
@end example
To have @code{lilypond-latex} read from stdin, use a dash @code{-} for
@table @code
@item -k,--keep
- Keep the temporary directory with all output
-files. The temporary directory is created in the current directory as @code{@code{lilypond}.dir}.
+Keep the temporary directory with all output files. The temporary
+directory is created in the current directory as @code{@code{lilypond}.dir}.
+
@item -h,--help
- Print usage help.
+Print usage help.
+
@item -I,--include=@var{dir}
- Add @var{dir} to LilyPond's include path.
+Add @var{dir} to LilyPond's include path.
+
@item -o,--output=@var{file}
- Generate output to @var{file}. The extension of @var{file} is ignored.
+Generate output to @var{file}. The extension of @var{file} is ignored.
+
@item --png
- Also generate pictures of each page, in PNG format.
+Also generate pictures of each page, in PNG format.
+
@item --preview
- Also generate a picture of the first system of the score.
+Also generate a picture of the first system of the score.
@cindex preview
@cindex picture
@cindex pixmap
@cindex thumbnail
@cindex screen shot
-
+
@item -s,--set=@var{key}=@var{val}
- Add @var{key}= @var{val} to the settings, overriding those specified
+Add @var{key}= @var{val} to the settings, overriding those specified
in the files. Possible keys: @code{language}, @code{latexheaders},
@code{latexpackages}, @code{latexoptions}, @code{papersize},
@code{linewidth}, @code{orientation},
@code{textheight}.
+
@item -v,--version
Show version information.
+
@item -V,--verbose
Be verbose. This prints out commands as they are executed, and more
information about the formatting process is printed.
+
@item --debug
Print even more information. This is useful when generating bug reports.
+
@item -w,--warranty
-Show the warranty with which GNU LilyPond comes. (It comes with
+Show the warranty with which GNU LilyPond comes. (It comes with
@strong{NO WARRANTY}!)
@end table
-
@subsection Additional parameters
The @code{lilypond} program responds to several parameters specified
@table @code
@item language
- Specify La@TeX{} language: the @code{babel} package will be
+Specify La@TeX{} language: the @code{babel} package will be
included. Default: unset.
- Read from the @code{\header} block.
+Read from the @code{\header} block.
@item latexheaders
- Specify additional La@TeX{} headers file.
- Normally read from the @code{\header} block. Default value: empty.
+Specify additional La@TeX{} headers file.
+Normally read from the @code{\header} block. Default value: empty.
@item latexpackages
- Specify additional La@TeX{} packages file. This works cumulative,
+Specify additional La@TeX{} packages file. This works cumulative,
so you can add multiple packages using multiple @code{-s=latexpackages} options.
- Normally read from the @code{\header} block. Default value:
+Normally read from the @code{\header} block. Default value:
@code{geometry}.
@item latexoptions
- Specify additional options for the La@TeX{}
+Specify additional options for the La@TeX{}
@code{\documentclass}. You can put any valid value here. This was
designed to allow @code{lilypond} to produce output for double-sided
paper, with balanced margins and page numbers on alternating sides. To
achieve this specify @code{twoside}.
@item orientation
- Set orientation. Choices are @code{portrait} or @code{landscape}. Is
+Set orientation. Choices are @code{portrait} or @code{landscape}. Is
read from the @code{\layout} block, if set.
-
+
@item textheight
- The vertical extension of the music on the page. It is normally
- calculated automatically, based on the paper size.
+The vertical extension of the music on the page. It is normally
+calculated automatically, based on the paper size.
@item linewidth
- The music line width. It is normally read from the @code{\layout}
+The music line width. It is normally read from the @code{\layout}
block.
@item papersize
- The paper size (as a name, e.g. @code{a4}). It is normally read from
+The paper size (as a name, e.g. @code{a4}). It is normally read from
the @code{\layout} block.
-
+
@item fontenc
- The font encoding, should be set identical to the @code{font-encoding}
- property in the score.
+The font encoding, should be set identical to the @code{font-encoding}
+property in the score.
@end table
-
-
-
recommended extension, you may need to manually specify what output
format you want. See @ref{Invoking lilypond-book} for details.
-@code{Lilypond-book} automatically selects the output format based
-on the filename.
+@code{lilypond-book} automatically selects the output format based
+on the filename. For example, running @code{lilypond-book myfile.lytex}
+will make @code{lilypond-book} produce latex output. If the file
+was merely @code{myfile}, then @code{lilypond-book} would not know
+which output format to produce (unless you specified it with
+@code{-f=latex}.
@table @code
@top GNU LilyPond --- The music typesetter
@c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX.
-This is the user manual for GNU LilyPond 2.3.x series.
+This is the user manual for GNU LilyPond 2.5.x series.
@ifhtml
(See the bottom of this page for the exact version number).
@end ifhtml
@cindex web site
A further source of information is the website, which can be found at
-@uref{http://www.lilypond.org/}. The website contains on-line copies of
-this and other documentation.
+@uref{http://@/www@/.lilypond@/.org/}. The website contains on-line copies
+of this and other documentation.
@include dedication.itely
@end table
The source archive includes a more elaborate Bib@TeX{} bibliography of
-over 100 entries in @file{Documentation/bibliography/}. It is also
+over 100 entries in @file{Documentation/@/bibliography/}. It is also
available online from the website.
somewhat familiar with LilyPond.
@menu
-* Note entry::
-* Easier music entry::
-* Staff notation::
-* Polyphony::
-* Beaming::
-* Accidentals::
-* Expressive marks::
-* Repeats::
-* Rhythmic music::
-* Piano music::
-* Vocal music::
-* Other instrument specific notation::
-* Tablatures::
-* Popular music::
-* Orchestral music::
-* Ancient notation::
-* Contemporary notation::
-* Educational use::
+* Note entry::
+* Easier music entry::
+* Staff notation::
+* Polyphony::
+* Beaming::
+* Accidentals::
+* Expressive marks::
+* Repeats::
+* Rhythmic music::
+* Piano music::
+* Vocal music::
+* Other instrument specific notation::
+* Tablatures::
+* Popular music::
+* Orchestral music::
+* Ancient notation::
+* Contemporary notation::
+* Educational use::
@end menu
@c FIXME: Note entry vs Music entry at top level menu is confusing.
related constructs, such as stems, tuplets and ties.
@menu
-* Notes::
-* Pitches::
-* Chromatic alterations::
-* Micro tones::
-* Chords::
-* Rests::
-* Skips::
-* Durations::
-* Augmentation dots::
-* Scaling durations::
-* Stems::
-* Ties::
-* Tuplets::
+* Notes::
+* Pitches::
+* Chromatic alterations::
+* Micro tones::
+* Chords::
+* Rests::
+* Skips::
+* Durations::
+* Augmentation dots::
+* Scaling durations::
+* Stems::
+* Ties::
+* Tuplets::
@end menu
to @code{b}. The pitch @code{c} is an octave below middle C and the
letters span the octave above that C
-@lilypond[fragment,verbatim,noindent]
+@lilypond[quote,fragment,verbatim]
\clef bass
a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
@end lilypond
ceses4
ces
c
-cis
+cis
cisis
@end lilypond
@anchor{note name}
@anchor{note names}
-@example
+@example
Note Names sharp flat
nederlands.ly c d e f g a bes b -is -es
english.ly c d e f g a bf b -s/-sharp -f/-flat
norsk.ly c d e f g a b h -iss/-is -ess/-es
svenska.ly c d e f g a b h -iss -ess
italiano.ly do re mi fa sol la sib si -d -b
-catalan.ly do re mi fa sol la sib si -d/-s -b
-espanol.ly do re mi fa sol la sib si -s -b
-
-@end example
+catalan.ly do re mi fa sol la sib si -d/-s -b
+espanol.ly do re mi fa sol la sib si -s -b
+@end example
@cindex @code{'}
@cindex @code{,}
Notes can be hidden and unhidden with the following commands
@cindex @code{\hideNotes}
-@code{\hideNotes},
+@code{\hideNotes},
@cindex @code{\unHideNotes}
@code{\unHideNotes}.
{ ceseh ceh cih cisih }
@end lilypond
-Micro tones are also exported to the MIDI file
+Micro tones are also exported to the MIDI file
@refbugs
commands. For example, the following results in an empty staff.
@lilypond[quote,raggedright,verbatim]
-{ s4 }
+{ s4 }
@end lilypond
The fragment @code{@{ \skip 4 @} } would produce an empty page.
notes longer than a whole you must use the variables @code{\longa} and
@code{\breve}
-@example
-c'\breve
+@example
+c'\breve
c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
-r\longa r\breve
-r1 r2 r4 r8 r16 r32 r64 r64
-@end example
+r\longa r\breve
+r1 r2 r4 r8 r16 r32 r64 r64
+@end example
-@lilypond[quote,noindent]
+@lilypond[quote]
\score {
\relative c'' {
a\breve*1/2 \autoBeamOff
- a1 a2 a4 a8 a16 a32 a64 a64
+ a1 a2 a4 a8 a16 a32 a64 a64
\bar "empty"
\break
r\longa*1/4 r\breve *1/2
- r1 r2 r4 r8 r16 r32 r64 r64
+ r1 r2 r4 r8 r16 r32 r64 r64
}
\layout {
raggedright = ##t
\context {
\Staff
\remove "Clef_engraver"
- \override StaffSymbol #'transparent = ##t
+ \override StaffSymbol #'transparent = ##t
\override TimeSignature #'transparent = ##t
\override BarLine #'transparent = ##t
\consists "Pitch_squash_engraver"
duration. The default for the first note is a quarter note.
@lilypond[quote,raggedright,verbatim,fragment]
-{
-a a a2 a a4 a a1 a
-}
+{ a a a2 a a4 a a1 a }
@end lilypond
direction manually
@cindex @code{\dotsUp}
-@code{\dotsUp},
+@code{\dotsUp},
@cindex @code{\dotsDown}
-@code{\dotsDown},
+@code{\dotsDown},
@cindex @code{\dotsNeutral}
@code{\dotsNeutral}.
@seealso
-Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
+Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
@node Scaling durations
@subsection Scaling durations
@refcommands
@cindex @code{\stemUp}
-@code{\stemUp},
+@code{\stemUp},
@cindex @code{\stemDown}
-@code{\stemDown},
+@code{\stemDown},
@cindex @code{\stemNeutral}
-@code{\stemNeutral}.
+@code{\stemNeutral}.
@node Ties
@lilypond[fragment,quote,raggedright]
\relative {
- r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
+ r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
}
@end lilypond
@cindex @code{\tieUp}
-@code{\tieUp},
+@code{\tieUp},
@cindex @code{\tieDown}
-@code{\tieDown},
+@code{\tieDown},
@cindex @code{\tieNeutral}
-@code{\tieNeutral},
+@code{\tieNeutral},
@cindex @code{\tieDotted}
-@code{\tieDotted},
+@code{\tieDotted},
@cindex @code{\tieSolid}
@code{\tieSolid}.
-@seealso
+@seealso
In this manual: @ref{Automatic note splitting}.
Switching staves when a tie is active will not produce a slanted tie.
Formatting of ties is a difficult subject. The results are often not
-optimal.
+optimal.
@node Tuplets
@subsection Tuplets
@cindex @code{tupletNumberFormatFunction}
-@cindex tuplet formatting
+@cindex tuplet formatting
@refcommands
@cindex @code{\tupletUp}
-@code{\tupletUp},
+@code{\tupletUp},
@cindex @code{\tupletDown}
-@code{\tupletDown},
+@code{\tupletDown},
@cindex @code{\tupletNeutral}
@code{\tupletNeutral}.
Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
-Examples: @inputfileref{input/regression,tuplet-nest.ly}.
+Examples: @inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
@refbugs
Nested tuplets are not formatted automatically. In this case, outer
tuplet brackets should be moved manually, which is demonstrated in
-@inputfileref{input/regression,tuplet-nest.ly}.
+@inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
@menu
-* Relative octaves::
-* Octave check::
-* Bar check::
-* Skipping corrected music::
-* Automatic note splitting::
+* Relative octaves::
+* Octave check::
+* Bar check::
+* Skipping corrected music::
+* Automatic note splitting::
@end menu
@cindex @code{\relative}
@example
- \relative @var{startpitch} @var{musicexpr}
+\relative @var{startpitch} @var{musicexpr}
@end example
+
+@noindent
or
+
@example
- \relative @var{musicexpr}
+\relative @var{musicexpr}
@end example
-
+
The octave of notes that appear in @var{musicexpr} are calculated as
follows: if no octave changing marks are used, the basic interval
between this and the last note is always taken to be a fourth or
Here is the relative mode shown in action
@lilypond[quote,fragment,raggedright,verbatim]
\relative c'' {
- b c d c b c bes a
+ b c d c b c bes a
}
@end lilypond
@lilypond[quote,raggedright,fragment,verbatim]
\relative c' {
- c <c e g>
+ c <c e g>
<c' e g>
<c, e' g>
}
followed by @code{=}@var{quotes} which indicates what its absolute
octave should be. In the following example,
@example
-\relative c'' @{ c='' b=' d,='' @}
+\relative c'' @{ c='' b=' d,='' @}
@end example
@noindent
check passes successfully, so the check could be deleted without changing
the output of the piece.
-@lilypond[quote,raggedright,verbatim,fragment]
+@lilypond[quote,raggedright,verbatim,fragment]
\relative c' {
e
\octave b
- a
+ a
}
@end lilypond
does not, a warning is printed. In the next example, the second bar
check will signal an error
@example
-\time 3/4 c2 e4 | g2 |
+\time 3/4 c2 e4 | g2 |
@end example
-Bar checks can also be used in lyrics, for example
+Bar checks can also be used in lyrics, for example
@example
\lyricmode @{
\time 2/4
Twin -- kle | Twin -- kle
-@}
+@}
@end example
pipeSymbol = \bar "||"
{ c'2 c' | c'2 c }
-@end lilypond
+@end lilypond
@node Skipping corrected music
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
} {
- c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
+ c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
}
@end lilypond
@seealso
-Examples: @inputfileref{input/regression,completion-heads.ly}.
+Examples: @inputfileref{input/@/regression,completion@/-heads@/.ly}.
@noindent
@cindex Staff notation
@menu
-* Staff symbol::
-* Key signature::
-* Clef::
-* Ottava brackets::
-* Time signature::
-* Partial measures::
-* Unmetered music::
-* Bar lines::
-* Time administration::
-* Controlling formatting of prefatory matter::
+* Staff symbol::
+* Key signature::
+* Clef::
+* Ottava brackets::
+* Time signature::
+* Partial measures::
+* Unmetered music::
+* Bar lines::
+* Time administration::
+* Controlling formatting of prefatory matter::
@end menu
@node Staff symbol
Notes, dynamic signs, etc. are grouped
with a set of horizontal lines, into a staff (plural `staves'). In our
system, these lines are drawn using a separate layout object called
-staff symbol.
+staff symbol.
@cindex staff lines, setting number of
@cindex staff lines, setting thickness of
-@cindex thickness of staff lines, setting
-@cindex number of staff lines, setting
+@cindex thickness of staff lines, setting
+@cindex number of staff lines, setting
@seealso
Program reference: @internalsref{StaffSymbol}.
-Examples: @inputfileref{input/test,staff-lines.ly},
-@inputfileref{input/test,staff-size.ly}.
+Examples: @inputfileref{input/@/test,staff@/-lines@/.ly},
+@inputfileref{input/@/test,staff@/-size@/.ly}.
@refbugs
Setting or changing the key signature is done with the @code{\key}
command
@example
- @code{\key} @var{pitch} @var{type}
+@code{\key} @var{pitch} @var{type}
@end example
@cindex @code{\minor}
@item treble, violin, G, G2
G clef on 2nd line
@item alto, C
-@cindex alto clef
+@cindex alto clef
C clef on 3rd line
@item tenor
-@cindex tenor clef
- C clef on 4th line.
+@cindex tenor clef
+ C clef on 4th line.
@item bass, F
@cindex bass clef
F clef on 4th line
example,
-@cindex choral tenor clef
+@cindex choral tenor clef
@lilypond[quote,raggedright,verbatim,fragment,relative=1]
\clef "G_8" c4
@end lilypond
when any of these properties are changed. The following example shows
possibilities when setting properties manually.
-@lilypond[raggedright,verbatim]
+@lilypond[quote,raggedright,verbatim]
{
\set Staff.clefGlyph = #"clefs-F"
\set Staff.clefPosition = #2
c'4
\set Staff.clefGlyph = #"clefs-C"
c'4
- \set Staff.clefOctavation = #7
+ \set Staff.clefOctavation = #7
c'4
- \set Staff.clefOctavation = #0
+ \set Staff.clefOctavation = #0
\set Staff.clefPosition = #0
c'4
\clef "bass"
\relative c''' {
a2 b
#(set-octavation 1)
- a b
+ a b
#(set-octavation 0)
a b
}
Program reference: @internalsref{OttavaBracket}.
-Examples: @inputfileref{input/regression,ottava.ly},
-@inputfileref{input/regression,ottava-broken.ly}.
+Examples: @inputfileref{input/@/regression,ottava@/.ly},
+@inputfileref{input/@/regression,ottava@/-broken@/.ly}.
@refbugs
The time signature is set or changed by the @code{\time}
command
@lilypond[quote,raggedright,fragment,verbatim]
-\time 2/4 c'2 \time 3/4 c'2.
+\time 2/4 c'2 \time 3/4 c'2.
@end lilypond
The symbol that is printed can be customized with the @code{style}
\score {
\relative c'' {
#(set-time-signature 9 8 '(2 2 2 3))
- g8[ g] d[ d] g[ g] a8[( bes g]) |
+ g8[ g] d[ d] g[ g] a8[( bes g]) |
#(set-time-signature 5 8 '(3 2))
a4. g4
}
\partial 16*5 c16 cis d dis e | a2. c,4 | b2
@end lilypond
-The syntax for this command is
+The syntax for this command is
@example
- \partial @var{duration}
+\partial @var{duration}
@end example
This is internally translated into
@example
- \set Timing.measurePosition = -@var{length of duration}
+\set Timing.measurePosition = -@var{length of duration}
@end example
@cindex @code{|}
The property @code{measurePosition} contains a rational number
@lilypond[verbatim,quote,raggedright,relative,fragment]
{
- \grace f16
+ \grace f16
\partial 4
g4
- a2 g2
+ a2 g2
}
@end lilypond
off. Empty bar lines,
@example
- \bar ""
+\bar ""
@end example
@noindent
@refcommands
@cindex @code{\cadenzaOn}
-@code{\cadenzaOn},
+@code{\cadenzaOn},
@cindex @code{\cadenzaOff}
@code{\cadenzaOff}.
For allowing line breaks, there is a special command,
@example
- \bar ""
-@end example
+\bar ""
+@end example
This will insert an invisible bar line, and allow line breaks at this
point.
@seealso
-In this manual: @ref{Repeats}, @ref{System start delimiters}
+In this manual: @ref{Repeats}, @ref{System start delimiters}.
Program reference: @internalsref{BarLine} (created at
-Examples: @inputfileref{input/test,bar-lines.ly},
+Examples: @inputfileref{input/@/test,bar@/-lines@/.ly},
@node Time administration
@table @code
@item currentBarNumber
- the measure number
+The measure number.
+
@item measureLength
- the length of the measures in the current time signature. For a 4/4
- time this is 1, and for 6/8 it is 3/4.
+The length of the measures in the current time signature. For a 4/4
+time this is@tie{}1, and for 6/8 it is 3/4.
+
@item measurePosition
- the point within the measure where we currently are. This quantity
- is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
- @code{currentBarNumber} is incremented.
+The point within the measure where we currently are. This quantity
+is reset to@tie{}0 whenever it exceeds @code{measureLength}. When that
+happens, @code{currentBarNumber} is incremented.
+
@item timing
- if set to true, the above variables are updated for every time
- step. When set to false, the engraver stays in the current measure
- indefinitely.
+If set to true, the above variables are updated for every time
+step. When set to false, the engraver stays in the current measure
+indefinitely.
@end table
Timing can be changed by setting any of these variables explicitly.
In the next example, the 4/4 time signature is printed, but
@code{measureLength} is set to 5/4. After a while, the measure is
shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
-the measure, so the next bar line will fall at 2/4 + 3/8.
+the measure, so the next bar line will fall at 2/4 + 3/8.
-@lilypond[raggedright,verbatim,relative,fragment]
- \set Score.measureLength = #(ly:make-moment 5 4)
- c1 c4
- c1 c4
- c4 c4
- \set Score.measurePosition = #(ly:make-moment -3 8)
- b8 b b
- c4 c1
+@lilypond[quote,raggedright,verbatim,relative,fragment]
+\set Score.measureLength = #(ly:make-moment 5 4)
+c1 c4
+c1 c4
+c4 c4
+\set Score.measurePosition = #(ly:make-moment -3 8)
+b8 b b
+c4 c1
@end lilypond
TODO Somebody needs to explain this example, but I don't know what
they're trying to do, so it won't be me. -gp
-@lilypond[verbatim]
+@lilypond[quote,verbatim]
\transpose c c' {
- \override Staff.Clef #'break-visibility = #end-of-line-visible
- \override Staff.KeySignature #'break-visibility = #end-of-line-visible
- \set Staff.explicitClefVisibility = #end-of-line-visible
- \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
-
- % We want the time sig to take space, otherwise there is not
- % enough white at the start of the line.
- %
-
- \override Staff.TimeSignature #'transparent = ##t
- \set Score.defaultBarType = #"empty"
-
- c1 d e f g a b c
- \key d \major
- \break
-
- % see above.
- \time 4/4
-
- d e fis g a b cis d
- \key g \major
- \break
- \time 4/4
+ \override Staff.Clef
+ #'break-visibility = #end-of-line-visible
+ \override Staff.KeySignature
+ #'break-visibility = #end-of-line-visible
+ \set Staff.explicitClefVisibility = #end-of-line-visible
+ \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
+
+ % We want the time sig to take space, otherwise there is not
+ % enough white at the start of the line.
+
+ \override Staff.TimeSignature #'transparent = ##t
+ \set Score.defaultBarType = #"empty"
+
+ c1 d e f g a b c
+ \key d \major
+ \break
+
+ % see above.
+ \time 4/4
+
+ d e fis g a b cis d
+ \key g \major
+ \break
+ \time 4/4
}
@end lilypond
\relative c''
\context Staff <<
\new Voice { \voiceOne cis2 b }
- \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
+ \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
\new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
@end lilypond
the @internalsref{NoteCollision} object, they are merged
@lilypond[quote,verbatim,fragment,raggedright,relative=2]
\context Voice << {
- g8 g8
- \override Staff.NoteCollision
+ g8 g8
+ \override Staff.NoteCollision
#'merge-differently-dotted = ##t
g8 g8
} \\ { g8.[ f16] g8.[ f16] } >>
@cindex @code{\oneVoice}
-@code{\oneVoice},
+@code{\oneVoice},
@cindex @code{\voiceOne}
-@code{\voiceOne},
+@code{\voiceOne},
@cindex @code{\voiceTwo}
-@code{\voiceTwo},
+@code{\voiceTwo},
@cindex @code{\voiceThree}
-@code{\voiceThree},
+@code{\voiceThree},
@cindex @code{\voiceFour}
@code{\voiceFour}.
@cindex @code{\shiftOn}
-@code{\shiftOn},
+@code{\shiftOn},
@cindex @code{\shiftOnn}
-@code{\shiftOnn},
+@code{\shiftOnn},
@cindex @code{\shiftOnnn}
-@code{\shiftOnnn},
+@code{\shiftOnnn},
@cindex @code{\shiftOff}
@code{\shiftOff}: these commands specify in what chords of the current
voice should be shifted. The outer voices (normally: voice one and
property of the @internalsref{NoteColumn} object and pitched rests can
be used to override typesetting decisions.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\relative <<
{
<d g>
<b f'>
\once \override NoteColumn #'force-hshift = #1.7
<b f'>
-} >>
+} >>
@end lilypond
Program reference: the objects responsible for resolving collisions are
@internalsref{NoteCollision} and @internalsref{RestCollision}.
-Examples:
+Examples:
@inputfileref{input/@/regression,collision@/-dots@/.ly},
@inputfileref{input/@/regression,collision@/-head-chords@/.ly},
@inputfileref{input/@/regression,collision@/-heads@/.ly},
@cindex Automatic beams
@menu
* Automatic beams::
-* Manual beams::
-* Setting automatic beam behavior::
-* Beam formatting::
+* Manual beams::
+* Setting automatic beam behavior::
+* Beam formatting::
@end menu
@node Automatic beams
@seealso
-Program reference: @internalsref{Beam}.
+Program reference: @internalsref{Beam}.
@node Manual beams
@code{beatLength} property.
-@lilypond[fragment,quote,relative=2,verbatim,noindent]
+@lilypond[fragment,quote,relative=2,verbatim]
c16[ c c c c c c c]
\set subdivideBeams = ##t
c16[ c c c c c c c]
@node Setting automatic beam behavior
-@subsection Setting automatic beam behavior
+@subsection Setting automatic beam behavior
@cindex @code{autoBeamSettings}
@cindex @code{(end * * * *)}
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}.
+are defined in @file{scm/@/auto@/-beam@/.scm}.
The value of @code{autoBeamSettings} is changed with two functions,
@example
- #(override-auto-beam-setting
- '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
- [@var{context}])
- #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
+#(override-auto-beam-setting
+ '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
+ [@var{context}])
+#(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
@end example
Here, @var{be} is the symbol @code{begin} or @code{end}, and
@var{context} is an optional context (default: @code{'Voice}). It
For example, if automatic beams should end on every quarter note, use
the following
@example
- #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
+#(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
@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)}.
The same syntax can be used to specify beam starting points. In this
example, automatic beams can only end on a dotted quarter note
@example
- #(override-auto-beam-setting '(end * * * *) 3 8)
+#(override-auto-beam-setting '(end * * * *) 3 8)
@end example
In 4/4 time signature, this means that automatic beams could end only on
3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
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{})
+#(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
@refcommands
@cindex @code{\autoBeamOff}
-@code{\autoBeamOff},
+@code{\autoBeamOff},
@cindex @code{\autoBeamOn}
@code{\autoBeamOn}.
@lilypond[quote,raggedright,relative=2,fragment,verbatim]
{
- b8[ b]
+ b8[ b]
\override Beam #'neutral-direction = #-1
- b[ b]
+ b[ b]
\override Beam #'neutral-direction = #1
- b[ b]
+ b[ b]
}
@end lilypond
+
@node Accidentals
@section Accidentals
The @code{voice} option should be used if the voices
are to be read solely by individual musicians. If the staff is to be
-used by one musician (e.g. a conductor) then
+used by one musician (e.g. a conductor) then
@code{modern} or @code{modern-cautionary}
should be used instead.
are not remembered at all---and hence all accidentals are
typeset relative to the key signature, regardless of what was
before in the music
-
+
@lilypond[quote,raggedright,fragment,verbatim,relative=1]
#(set-accidental-style 'forget)
\key d\major c4 c cis cis d d dis dis
notes and rhythms.
@menu
-* Slurs::
-* Phrasing slurs::
-* Breath marks::
-* Metronome marks::
-* Text scripts::
-* Text spanners::
-* Analysis brackets::
-* Articulations::
-* Running trills::
-* Fingering instructions::
-* Grace notes::
-* Glissando::
-* Dynamics::
+* Slurs::
+* Phrasing slurs::
+* Breath marks::
+* Metronome marks::
+* Text scripts::
+* Text spanners::
+* Analysis brackets::
+* Articulations::
+* Running trills::
+* Fingering instructions::
+* Grace notes::
+* Glissando::
+* Dynamics::
@end menu
@node Slurs
They are entered using parentheses
@lilypond[quote,raggedright,relative=2,fragment,verbatim]
- f( g a) a8 b( a4 g2 f4)
- <c e>2( <b d>2)
+f( g a) a8 b( a4 g2 f4)
+<c e>2( <b d>2)
@end lilypond
The direction of a slur can be set with the
generic commands
@example
- \override Slur #'direction = #UP
- \slurUp % shortcut for the previous line
+\override Slur #'direction = #UP
+\slurUp % shortcut for the previous line
@end example
@noindent
However, there is a convenient shorthand for forcing slur
directions. By adding @code{_} or @code{^} before the opening
-parentheses, the direction is also set. For example,
+parentheses, the direction is also set. For example,
@lilypond[relative=2,raggedright,quote,verbatim,fragment]
- c4_( c) c^( c)
+c4_( c) c^( c)
@end lilypond
Some composers write two slurs when they want legato chords. This can
be achieved in LilyPond by setting @code{doubleSlurs},
@lilypond[verbatim,raggedright,relative,fragment,quote]
- \set doubleSlurs = ##t
- <c e>4 ( <d f> <c e> <d f> )
-@end lilypond
+\set doubleSlurs = ##t
+<c e>4 ( <d f> <c e> <d f> )
+@end lilypond
+
-
@refcommands
@cindex @code{\slurUp}
-@code{\slurUp},
+@code{\slurUp},
@cindex @code{\slurDown}
-@code{\slurDown},
+@code{\slurDown},
@cindex @code{\slurNeutral}
-@code{\slurNeutral},
+@code{\slurNeutral},
@cindex @code{\slurDotted}
-@code{\slurDotted},
+@code{\slurDotted},
@cindex @code{\slurSolid}
@code{\slurSolid}.
respectively
@lilypond[quote,raggedright,fragment,verbatim,relative=1]
- \time 6/4 c'\( d( e) f( e) d\)
+\time 6/4 c'\( d( e) f( e) d\)
@end lilypond
Typographically, the phrasing slur behaves almost exactly like a
@refcommands
@cindex @code{\phrasingSlurUp}
-@code{\phrasingSlurUp},
+@code{\phrasingSlurUp},
@cindex @code{\phrasingSlurDown}
-@code{\phrasingSlurDown},
+@code{\phrasingSlurDown},
@cindex @code{\phrasingSlurNeutral}
@code{\phrasingSlurNeutral}.
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
- c'4 \breathe d4
+c'4 \breathe d4
@end lilypond
The glyph of the breath mark can be tuned by overriding the
@code{text} property of the @code{BreathingSign} layout object with
any markup text. For example,
@lilypond[quote,raggedright,fragment,verbatim,relative=1]
- c'4
- \override BreathingSign #'text
- = #(make-musicglyph-markup "scripts-rvarcomma")
- \breathe
- d4
+c'4
+\override BreathingSign #'text
+ = #(make-musicglyph-markup "scripts-rvarcomma")
+\breathe
+d4
@end lilypond
-@seealso
+@seealso
Program reference: @internalsref{BreathingSign},
@internalsref{BreathingSignEvent}.
-Examples: @inputfileref{input/regression,breathing-sign.ly}.
+Examples: @inputfileref{input/@/regression,breathing@/-sign@/.ly}.
@node Metronome marks
@cindex metronome marking
Metronome settings can be entered as follows
-@example
- \tempo @var{duration} = @var{per-minute}
+@example
+\tempo @var{duration} = @var{per-minute}
@end example
In the MIDI output, they are interpreted as a tempo change. In the
layout output, a metronome marking is printed
@cindex @code{\tempo}
@lilypond[quote,raggedright,verbatim,fragment]
- \tempo 8.=120 c''1
+\tempo 8.=120 c''1
@end lilypond
@seealso
Program reference: @internalsref{MetronomeChangeEvent}.
-
+
@node Text scripts
@subsection Text scripts
will be taken into account
@c
@lilypond[quote,fragment,raggedright,verbatim,relative=1]
- c4^"longtext" \fatText c4_"longlongtext" c4
+c4^"longtext" \fatText c4_"longlongtext" c4
@end lilypond
More complex formatting may also be added to a note by using the
markup command,
@lilypond[fragment,raggedright,verbatim,quote]
- c'4^\markup { bla \bold bla }
+c'4^\markup { bla \bold bla }
@end lilypond
The @code{\markup} is described in more detail in
@ref{Text markup}.
-
+
@refcommands
@cindex @code{\fatText}
-@code{\fatText},
+@code{\fatText},
@cindex @code{\emptyText}
@code{\emptyText}.
properties
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
- c1
- \override TextSpanner #'direction = #-1
- \override TextSpanner #'edge-text = #'("rall " . "")
- c2\startTextSpan b c\stopTextSpan a
+c1
+\override TextSpanner #'direction = #-1
+\override TextSpanner #'edge-text = #'("rall " . "")
+c2\startTextSpan b c\stopTextSpan a
@end lilypond
Internals @internalsref{TextSpanEvent},
@internalsref{TextSpanner}.
-Examples: @inputfileref{input/regression,text-spanner.ly}.
+Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}.
@node Analysis brackets
@lilypond[quote,raggedright,verbatim]
\score {
- \relative c'' {
+ \relative c'' {
c4\startGroup\startGroup
c4\stopGroup
c4\startGroup
Program reference: @internalsref{HorizontalBracket},
@internalsref{NoteGroupingEvent}.
-Examples: @inputfileref{input/regression,note-group-bracket.ly}.
+Examples: @inputfileref{input/@/regression,note@/-group@/-bracket@/.ly}.
@node Articulations
@lilypondfile[quote,raggedright]{script-abbreviations.ly}
The meanings of these shorthands can be changed. See
-@file{ly/script-init.ly} for examples.
+@file{ly/@/script@/-init@/.ly} for examples.
The script is automatically placed, but the direction can be forced as
@lilypond[quote,raggedright,fragment,verbatim]
- c''4^^ c''4_^
+c''4^^ c''4_^
@end lilypond
Other symbols can be added using the syntax
e.g.
@lilypond[quote,raggedright,verbatim,fragment,relative=2]
- c\fermata c^\fermata c_\fermata
+c\fermata c^\fermata c_\fermata
@end lilypond
@lilypond[verbatim,relative=3,raggedright,fragment,quote]
- \once \override TextScript #'script-priority = #-100
- a4^\prall^\markup { \sharp }
-
- \once \override Script #'script-priority = #-100
- a4^\prall^\markup { \sharp }
+\once \override TextScript #'script-priority = #-100
+a4^\prall^\markup { \sharp }
+
+\once \override Script #'script-priority = #-100
+a4^\prall^\markup { \sharp }
@end lilypond
Fingering instructions can be entered using
@example
- @var{note}-@var{digit}
+@var{note}-@var{digit}
@end example
For finger changes, use markup texts
@c
@lilypond[quote,verbatim,raggedright,fragment,relative=1]
- c4-1 c-2 c-3 c-4
- c^\markup { \finger "2-3" }
+c4-1 c-2 c-3 c-4
+c^\markup { \finger "2-3" }
@end lilypond
@cindex finger change
played with the thumb (e.g. in cello music)
@lilypond[quote,verbatim,raggedright,fragment,relative=2]
- <a_\thumb a'-3>8 <b_\thumb b'-3>
+<a_\thumb a'-3>8 <b_\thumb b'-3>
@end lilypond
Fingerings for chords can also be added to individual notes
of the chord by adding them after the pitches
@lilypond[quote,verbatim,raggedright,fragment,relative=2]
- < c-1 e-2 g-3 b-5 >4
+< c-1 e-2 g-3 b-5 >4
@end lilypond
@noindent
to note heads
@lilypond[quote,verbatim,raggedright,fragment,relative=1]
- \set fingeringOrientations = #'(left down)
- <c-1 es-2 g-4 bes-5 > 4
- \set fingeringOrientations = #'(up right down)
- <c-1 es-2 g-4 bes-5 > 4
+\set fingeringOrientations = #'(left down)
+<c-1 es-2 g-4 bes-5 > 4
+\set fingeringOrientations = #'(up right down)
+<c-1 es-2 g-4 bes-5 > 4
@end lilypond
Using this feature, it is also possible to put fingering instructions
very close to note heads in monophonic music,
@lilypond[verbatim,raggedright,quote,fragment]
- \set fingeringOrientations = #'(right)
- <es'-2>4
+\set fingeringOrientations = #'(right)
+<es'-2>4
@end lilypond
-
+
@seealso
Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
-Examples: @inputfileref{input/regression,finger-chords.ly}.
+Examples: @inputfileref{input/@/regression,finger@/-chords@/.ly}.
@cindex acciaccatura
@lilypond[quote,raggedright,relative=2,verbatim,fragment]
- b4 \acciaccatura d8 c4 \appoggiatura e8 d4
- \acciaccatura { g16[ f] } e4
+b4 \acciaccatura d8 c4 \appoggiatura e8 d4
+\acciaccatura { g16[ f] } e4
@end lilypond
Both are special forms of the @code{\grace} command. By prefixing this
printed in a smaller font and takes up no logical time in a measure.
@lilypond[quote,raggedright,relative=2,verbatim,fragment]
- c4 \grace c16 c4
- \grace { c16[ d16] } c2 c4
+c4 \grace c16 c4
+\grace { c16[ d16] } c2 c4
@end lilypond
@noindent
@lilypond[quote,raggedright]
<<
- \relative c''{
+ \relative c''{
c4 \grace c16 c4 \grace {
- c16[ d16] } c2 c4
+ c16[ d16] } c2 c4
}
\new Lyrics \lyricmode {
\override LyricText #'font-family = #'typewriter
-
+
\markup { (0,0) } 4
\grace { \markup {
( \fraction 1 4 , \fraction -1 16 ) } 16 }
\grace {
\markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
\markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
- }
+ }
\markup { ( \fraction 2 4 , 0 ) }
}
>>
In the following example, there are two sixteenth graces notes for
every eighth grace note
-@lilypond[quote,raggedright,relative=2,verbatim,fragment]
+@lilypond[quote,raggedright,relative=2,verbatim,fragment]
<< \new Staff { e4 \grace { c16[ d e f] } e4 }
\new Staff { c4 \grace { g8[ b] } c4 } >>
@end lilypond
@example
\new Staff @{
- #(add-grace-property 'Voice 'Stem 'direction '())
- @dots{}
+ #(add-grace-property 'Voice 'Stem 'direction '())
+ @dots{}
@}
@end example
@code{stopGraceMusic}, @code{startAcciaccaturaMusic},
@code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
@code{stopAppoggiaturaMusic}. More information is in the file
-@file{ly/grace-init.ly}.
+@file{ly/@/grace@/-init@/.ly}.
@seealso
This can be remedied by inserting grace skips, for the above example
@example
-\new Staff @{ c4 \bar "|:" \grace s16 d4 @}
+\new Staff @{ c4 \bar "|:" \grace s16 d4 @}
@end example
Grace sections should only be used within sequential music
@node Glissando
@subsection Glissando
-@cindex Glissando
+@cindex Glissando
@cindex @code{\glissando}
A glissando is a smooth change in pitch. It is denoted by a line or a
-wavy line between two notes. It is requested by attaching
+wavy line between two notes. It is requested by attaching
@code{\glissando} to a note
@lilypond[quote,raggedright,fragment,relative=2,verbatim]
Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
-Example files: @file{input/regression/glissando.ly}.
+Example files: @file{input/@/regression/@/glissando@/.ly}.
+
-
@refbugs
@code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
@lilypond[quote,verbatim,raggedright,fragment,relative=2]
- c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
- c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
+c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
+c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
@end lilypond
@cindex @code{\<}
A crescendo mark is started with @code{\<} and terminated with
@code{\!}. A decrescendo is started with @code{\>} and also terminated
with @code{\!}. Because these marks are bound to notes, if you must
-use spacer notes if multiple marks are needed during one note
+use spacer notes if multiple marks are needed during one note
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
- c\< c\! d\> e\!
- << f1 { s4 s4\< s4\! \> s4\! } >>
+c\< c\! d\> e\!
+<< f1 { s4 s4\< s4\! \> s4\! } >>
@end lilypond
This may give rise to very short hairpins. Use @code{minimum-length}
in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
example
@example
- \override Staff.Hairpin #'minimum-length = #5
+\override Staff.Hairpin #'minimum-length = #5
@end example
You can also use a text saying @emph{cresc.} instead of hairpins. Here
is an example how to do it
@lilypond[quote,raggedright,fragment,relative=2,verbatim]
- \setTextCresc
- c \< d e f\!
- \setHairpinCresc
- e\> d c b\!
+\setTextCresc
+c \< d e f\!
+\setHairpinCresc
+e\> d c b\!
@end lilypond
@cindex crescendo
You can also supply your own texts
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
- \set crescendoText = \markup { \italic "cresc. poco" }
- \set crescendoSpanner = #'dashed-line
- a'2\< a a a\!\mf
+\set crescendoText = \markup { \italic "cresc. poco" }
+\set crescendoSpanner = #'dashed-line
+a'2\< a a a\!\mf
@end lilypond
@cindex diminuendo
@refcommands
@cindex @code{\dynamicUp}
-@code{\dynamicUp},
+@code{\dynamicUp},
@cindex @code{\dynamicDown}
-@code{\dynamicDown},
+@code{\dynamicDown},
@cindex @code{\dynamicNeutral}
@code{\dynamicNeutral}.
@menu
* Repeat types::
-* Repeat syntax::
-* Repeats and MIDI::
-* Manual repeat commands::
-* Tremolo repeats::
-* Tremolo subdivisions::
-* Measure repeats::
+* Repeat syntax::
+* Repeats and MIDI::
+* Manual repeat commands::
+* Tremolo repeats::
+* Tremolo subdivisions::
+* Measure repeats::
@end menu
@node Repeat types
@item fold
Alternative endings are written stacked. This has limited use but may be
used to typeset two lines of lyrics in songs with repeats, see
-@inputfileref{input,star-spangled-banner.ly}.
+@inputfileref{input,star-spangled-banner@/.ly}.
@end ignore
@c tremolo, beamed
Make beat or measure repeats. These look like percent signs. These are not played
in MIDI output by default.
-@end table
+@end table
@node Repeat syntax
@subsection Repeat syntax
repeats. The syntax is
@example
- \repeat @var{variant} @var{repeatcount} @var{repeatbody}
+\repeat @var{variant} @var{repeatcount} @var{repeatbody}
@end example
If you have alternative endings, you may add
@cindex @code{\alternative}
@example
- \alternative @code{@{} @var{alternative1}
- @var{alternative2}
- @var{alternative3} @dots{} @code{@}}
+\alternative @{ @var{alternative1}
+ @var{alternative2}
+ @var{alternative3} @dots{} @}
@end example
where each @var{alternative} is a music expression. If you do not
give enough alternatives for all of the repeats, the first alternative
With alternative endings
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
c1
-\repeat volta 2 {c4 d e f}
+\repeat volta 2 {c4 d e f}
\alternative { {d2 d} {f f,} }
@end lilypond
It is possible to shorten volta brackets
by setting @code{voltaSpannerDuration}. In the next example, the
-bracket only lasts one measure, which is a duration of 3/4.
+bracket only lasts one measure, which is a duration of 3/4.
@lilypond[verbatim,raggedright,quote]
\relative c''{
- \time 3/4
- c c c
- \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
- \repeat "volta" 5 { d d d }
- \alternative { { e e e f f f }
- { g g g } }
+ \time 3/4
+ c c c
+ \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
+ \repeat "volta" 5 { d d d }
+ \alternative { { e e e f f f }
+ { g g g } }
}
@end lilypond
-
+
@seealso
Brackets for the repeat are normally only printed over the topmost
staff. This can be adjusted by setting the @code{voltaOnThisStaff}
-property @inputfileref{input/regression,volta-multi-staff.ly},
-@inputfileref{input/regression,volta-chord-names.ly}
+property @inputfileref{input/@/regression,volta@/-multi@/-staff@/.ly},
+@inputfileref{input/@/regression,volta@/-chord@/-names@/.ly}
@refbugs
A nested repeat like
-@example
+@example
\repeat @dots{}
\repeat @dots{}
-\alternative
-@end example
+\alternative
+@end example
@noindent
is ambiguous, since it is is not clear to which @code{\repeat} the
@code{\unfoldrepeats} music function. This functions changes all
repeats to unfold repeats.
-@lilypond[verbatim,raggedright,fragment]
+@lilypond[quote,verbatim,fragment,linewidth=8.0\cm]
\unfoldrepeats {
\repeat tremolo 8 {c'32 e' }
\repeat percent 2 { c''8 d'' }
- \repeat volta 2 {c'4 d' e' f'}
+ \repeat volta 2 {c'4 d' e' f'}
\alternative {
{ g' a' a' g' }
{f' e' d' c' }
percent repeats). For example,
@example
- \score @{
- @var{..music..}
- \layout @{ .. @}
- @}
- \score @{
- \unfoldrepeats @var{..music..}
- \midi @{ .. @}
- @}
+\score @{
+ @var{..music..}
+ \layout @{ .. @}
+@}
+\score @{
+ \unfoldrepeats @var{..music..}
+ \midi @{ .. @}
+@}
@end example
@node Manual repeat commands
@cindex @code{repeatCommands}
The property @code{repeatCommands} can be used to control the layout of
-repeats. Its value is a Scheme list of repeat commands, where each repeat
-command can be
+repeats. Its value is a Scheme list of repeat commands.
@table @asis
-@item @code{start-repeat},
- which prints a @code{|:} bar line;
-@item @code{end-repeat},
- which prints a @code{:|} bar line;
-@item @code{(volta @var{text})},
- which prints a volta bracket saying @var{text}: The text can be specified as
+@item @code{start-repeat}
+Print a @code{|:} bar line.
+
+@item @code{end-repeat}
+Print a @code{:|} bar line.
+
+@item @code{(volta @var{text})}
+Print a volta bracket saying @var{text}: The text can be specified as
a text string or as a markup text, see @ref{Text markup}. Do not
forget to change the font, as the default number font does not contain
alphabetic characters;
-@item @code{(volta #f)}, which
- stops a running volta bracket.
+
+@item @code{(volta #f)}
+Stop a running volta bracket.
@end table
@lilypond[quote,raggedright,verbatim,fragment,relative=2]
@lilypond[quote,verbatim,raggedright]
\new Voice \relative c' {
\repeat "tremolo" 8 { c16 d16 }
- \repeat "tremolo" 4 { c16 d16 }
+ \repeat "tremolo" 4 { c16 d16 }
\repeat "tremolo" 2 { c16 d16 }
}
@end lilypond
Tremolo marks can also be put on a single note. In this case, the
note should not be surrounded by braces.
@lilypond[quote,verbatim,raggedright]
- \repeat "tremolo" 4 c'16
+\repeat "tremolo" 4 c'16
@end lilypond
Similar output is obtained using the tremolo subdivision, described in
tremolos are @internalsref{StemTremolo} objects. The music expression is
@internalsref{TremoloEvent}.
-Example files: @inputfileref{input/regression,chord-tremolo.ly},
-@inputfileref{input/regression,stem-tremolo.ly}.
+Example files: @inputfileref{input/@/regression,chord@/-tremolo@/.ly},
+@inputfileref{input/@/regression,stem@/-tremolo@/.ly}.
@node Tremolo subdivisions
@subsection Tremolo subdivisions
used
@lilypond[quote,raggedright,verbatim,fragment]
- c'2:8 c':32 | c': c': |
+c'2:8 c':32 | c': c': |
@end lilypond
-@c [TODO : stok is te kort bij 32en]
-@c somebody want to translate that into English? :)
+@c [TODO: stok is te kort bij 32en]
+@c somebody want to translate that into English?
+@c `Stem is too short for 32nds' (wl)
@refbugs
also be used to show the rhythms of melodies.
@menu
-* Showing melody rhythms::
-* Entering percussion::
-* Percussion staves::
+* Showing melody rhythms::
+* Entering percussion::
+* Percussion staves::
@end menu
Program reference: @internalsref{RhythmicStaff}.
-Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
+Examples: @inputfileref{input/@/regression,rhythmic@/-staff@/.ly}.
@node Entering percussion
@end lilypond
The complete list of drum names is in the init file
-@file{ly/drumpitch-init.ly}.
+@file{ly/@/drumpitch@/-init@/.ly}.
@c TODO: properly document this.
@seealso
up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
down = \drummode { bassdrum4 snare8 bd r bd sn4 }
\new DrumStaff <<
- \new DrumVoice { \voiceOne \up }
- \new DrumVoice { \voiceTwo \down }
+ \new DrumVoice { \voiceOne \up }
+ \new DrumVoice { \voiceTwo \down }
>>
@end lilypond
The above example shows verbose polyphonic notation. The short
polyphonic notation, described in @ref{Polyphony}, can also be used if
-the @internalsref{DrumVoices} are instantiated by hand first. For example,
+the @internalsref{DrumVoices} are instantiated by hand first. For example,
-@lilypond[quote,raggedright,fragment,verbatim]
+@lilypond[quote,raggedright,fragment,verbatim]
\new DrumStaff <<
\context DrumVoice = "1" { s1 *2 }
\context DrumVoice = "2" { s1 *2 }
\\
{ bd4 sn4 bd4 sn4 }
>>
- }
+ }
>>
@end lilypond
@item drums-style
This is the default. It typesets a typical drum kit on a five-line staff
-@lilypond[quote,raggedright,noindent]
-nam = \lyricmode { cymc cyms cymr hh hhc hho hhho hhp cb hc
- bd sn ss tomh tommh tomml toml tomfh tomfl }
-mus = \drummode { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
- bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
+@lilypond[quote,linewidth=10.0\cm]
+nam = \lyricmode {
+ cymc cyms cymr hh hhc hho hhho hhp
+ cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
+mus = \drummode {
+ cymc cyms cymr hh hhc hho hhho hhp \break
+ cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
\score {
- << \new DrumStaff\with {
- \remove Bar_engraver
- \remove Time_signature_engraver
- \override Stem #'transparent = ##t
- \override Stem #'Y-extent-callback = ##f
- minimumVerticalExtent = #'(-4.0 . 5.0)
- } \mus
- \context Lyrics \nam
- >>
- \layout {
- %% need to do this, because of indented @itemize
- linewidth= 9 \cm
- \context { \Score
- \override LyricText #'font-family = #'typewriter
- \override BarNumber #'transparent =##T
-}}}
+ << \new DrumStaff \with {
+ \remove Bar_engraver
+ \remove Time_signature_engraver
+ \override Stem #'transparent = ##t
+ \override Stem #'Y-extent-callback = ##f
+ minimumVerticalExtent = #'(-4.0 . 5.0)
+ } \mus
+ \context Lyrics \nam
+ >>
+ \layout {
+ \context {
+ \Score
+ \override LyricText #'font-family = #'typewriter
+ \override BarNumber #'transparent =##T
+ }
+ }
+}
@end lilypond
The drum scheme supports six different toms. When there fewer toms, simply
@lilypond[quote,raggedright]
nam = \lyricmode { timh ssh timl ssl cb }
-mus = \drummode { timh ssh timl ssl cb s16 }
+mus = \drummode { timh ssh timl ssl cb s16 }
<<
- \context DrumStaff \with {
- \remove Bar_engraver
- \remove Time_signature_engraver
- \override Stem #'transparent = ##t
- \override Stem #'Y-extent-callback = ##f
- \override StaffSymbol #'line-count = #2
- \override StaffSymbol #'staff-space = #2
- minimumVerticalExtent = #'(-3.0 . 4.0)
- drumStyleTable = #timbales-style
- } \mus
- \context Lyrics {
- \override LyricText #'font-family = #'typewriter
-
- \nam }
+ \context DrumStaff \with {
+ \remove Bar_engraver
+ \remove Time_signature_engraver
+ \override Stem #'transparent = ##t
+ \override Stem #'Y-extent-callback = ##f
+ \override StaffSymbol #'line-count = #2
+ \override StaffSymbol #'staff-space = #2
+ minimumVerticalExtent = #'(-3.0 . 4.0)
+ drumStyleTable = #timbales-style
+ } \mus
+ \context Lyrics {
+ \override LyricText #'font-family = #'typewriter
+ \nam
+ }
>>
@end lilypond
+
@item congas-style
This typesets congas on a two line staff
@lilypond[quote,raggedright]
nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
-mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
+mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
+
<<
- \context DrumStaff\with {
- \remove Bar_engraver
- \remove Time_signature_engraver
- drumStyleTable = #congas-style
- \override StaffSymbol #'line-count = #2
-
- %% this sucks; it will lengthen stems.
- \override StaffSymbol #'staff-space = #2
- \override Stem #'transparent = ##t
- \override Stem #'Y-extent-callback = ##f
- } \mus
- \context Lyrics {
- \override LyricText #'font-family = #'typewriter
-\nam }
+ \context DrumStaff \with {
+ \remove Bar_engraver
+ \remove Time_signature_engraver
+ drumStyleTable = #congas-style
+ \override StaffSymbol #'line-count = #2
+
+ %% this sucks; it will lengthen stems.
+ \override StaffSymbol #'staff-space = #2
+ \override Stem #'transparent = ##t
+ \override Stem #'Y-extent-callback = ##f
+ } \mus
+ \context Lyrics {
+ \override LyricText #'font-family = #'typewriter
+ \nam
+ }
>>
@end lilypond
+
@item bongos-style
This typesets bongos on a two line staff
@lilypond[quote,raggedright]
nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
-mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
+mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
+
<<
- \context DrumStaff\with {
- \remove Bar_engraver
- \remove Time_signature_engraver
- \override StaffSymbol #'line-count = #2
- drumStyleTable = #bongos-style
-
- %% this sucks; it will lengthen stems.
- \override StaffSymbol #'staff-space = #2
- \override Stem #'transparent = ##t
- \override Stem #'Y-extent-callback = ##f
- } \mus
- \context Lyrics {
- \override LyricText #'font-family = #'typewriter
-\nam }
+ \context DrumStaff\with {
+ \remove Bar_engraver
+ \remove Time_signature_engraver
+ \override StaffSymbol #'line-count = #2
+ drumStyleTable = #bongos-style
+
+ %% this sucks; it will lengthen stems.
+ \override StaffSymbol #'staff-space = #2
+ \override Stem #'transparent = ##t
+ \override Stem #'Y-extent-callback = ##f
+ } \mus
+ \context Lyrics {
+ \override LyricText #'font-family = #'typewriter
+ \nam
+ }
>>
@end lilypond
@item percussion-style
-to typeset all kinds of simple percussion on one line staves
+To typeset all kinds of simple percussion on one line staves.
+
@lilypond[quote,raggedright]
nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
-mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
+mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
+
<<
- \context DrumStaff\with{
- \remove Bar_engraver
- drumStyleTable = #percussion-style
- \override StaffSymbol #'line-count = #1
- \remove Time_signature_engraver
- \override Stem #'transparent = ##t
- \override Stem #'Y-extent-callback = ##f
- } \mus
- \context Lyrics {
- \override LyricText #'font-family = #'typewriter
- \nam
- }
+ \context DrumStaff\with{
+ \remove Bar_engraver
+ drumStyleTable = #percussion-style
+ \override StaffSymbol #'line-count = #1
+ \remove Time_signature_engraver
+ \override Stem #'transparent = ##t
+ \override Stem #'Y-extent-callback = ##f
+ } \mus
+ \context Lyrics {
+ \override LyricText #'font-family = #'typewriter
+ \nam
+ }
>>
@end lilypond
@end table
@lilypond[quote,raggedright,verbatim]
#(define mydrums '(
- (bassdrum default #f -1)
- (snare default #f 0)
- (hihat cross #f 1)
- (pedalhihat xcircle "stopped" 2)
- (lowtom diamond #f 3)))
+ (bassdrum default #f -1)
+ (snare default #f 0)
+ (hihat cross #f 1)
+ (pedalhihat xcircle "stopped" 2)
+ (lowtom diamond #f 3)))
up = \drummode { hh8 hh hh hh hhp4 hhp }
down = \drummode { bd4 sn bd toml8 toml }
\new DrumStaff <<
- \set DrumStaff.drumStyleTable
- = #(alist->hash-table mydrums)
- \new DrumVoice { \voiceOne \up }
- \new DrumVoice { \voiceTwo \down }
+ \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
+ \new DrumVoice { \voiceOne \up }
+ \new DrumVoice { \voiceTwo \down }
>>
@end lilypond
@seealso
-Init files: @file{ly/drumpitch-init.ly}.
+Init files: @file{ly/@/drumpitch@/-init@/.ly}.
Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
@menu
-* Automatic staff changes::
-* Manual staff switches::
-* Pedals::
-* Arpeggio::
-* Staff switch lines::
-* Cross staff stems::
-@end menu
+* Automatic staff changes::
+* Manual staff switches::
+* Pedals::
+* Arpeggio::
+* Staff switch lines::
+* Cross staff stems::
+@end menu
@refbugs
The distance between the two staves is the same for all systems in the
score. It is possible to override this per system, but it does require
an arcane command incantation. See
-@inputfileref{input/test,piano-staff-distance.ly}.
+@inputfileref{input/@/test,piano@/-staff@/-distance@/.ly}.
@node Automatic staff changes
@quotation
@example
- \autochange @dots{}@var{music}@dots{}
+\autochange @dots{}@var{music}@dots{}
@end example
@end quotation
The autochanger switches on basis of pitch (middle C is the turning
point), and it looks ahead skipping over rests to switch in
advance. Here is a practical example
-
+
@lilypond[quote,verbatim,raggedright]
\context PianoStaff
\autochange \relative c'
quality output, staff switches should be specified manually.
-@code{\autochange} cannot be inside @code{\times}.
+@code{\autochange} cannot be inside @code{\times}.
Internally, the @code{\partcombine} interprets both arguments as
@code{Voice}s named @code{one} and @code{two}, and then decides when
\skip 1 * 10 %@emph{idem}
@}
>>
-@end example
+@end example
and the @context{Voice} is inserted afterwards
note or chord
@lilypond[quote,raggedright,fragment,verbatim]
- c'4\sustainDown c'4\sustainUp
+c'4\sustainDown c'4\sustainUp
@end lilypond
What is printed can be modified by setting @code{pedal@var{X}Strings},
@code{pedalSustainStyle} property to bracket objects
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
- \set Staff.pedalSustainStyle = #'bracket
- c\sustainDown d e
- b\sustainUp\sustainDown
- b g \sustainUp a \sustainDown \bar "|."
+\set Staff.pedalSustainStyle = #'bracket
+c\sustainDown d e
+b\sustainUp\sustainDown
+b g \sustainUp a \sustainDown \bar "|."
@end lilypond
A third style of pedal notation is a mixture of text and brackets,
@code{mixed}
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
- \set Staff.pedalSustainStyle = #'mixed
- c\sustainDown d e
- b\sustainUp\sustainDown
- b g \sustainUp a \sustainDown \bar "|."
+\set Staff.pedalSustainStyle = #'mixed
+c\sustainDown d e
+b\sustainUp\sustainDown
+b g \sustainUp a \sustainDown \bar "|."
@end lilypond
The default `*Ped.' style for sustain and damper pedals corresponds to
default.
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
- c\sostenutoDown d e c, f g a\sostenutoUp
+c\sostenutoDown d e c, f g a\sostenutoUp
@end lilypond
For fine-tuning of the appearance of a pedal bracket, the properties
bracket may be extended to the right edge of the note head
@lilypond[quote,raggedright,fragment,verbatim,relative=2]
- \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
- c\sostenutoDown d e c, f g a\sostenutoUp
+\override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
+c\sostenutoDown d e c, f g a\sostenutoUp
@end lilypond
@node Arpeggio
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
- <c e g c>\arpeggio
+<c e g c>\arpeggio
@end lilypond
When an arpeggio crosses staves, you attach an arpeggio to the chords
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
\context PianoStaff <<
\set PianoStaff.connectArpeggios = ##t
- \new Staff { <c' e g c>\arpeggio }
- \new Staff { \clef bass <c,, e g>\arpeggio }
+ \new Staff { <c' e g c>\arpeggio }
+ \new Staff { \clef bass <c,, e g>\arpeggio }
>>
@end lilypond
@c todo: ugh, lousy typography. Look for real example. --hwn
@lilypond[quote,raggedright,fragment,relative=1,verbatim]
- \arpeggioBracket
- <c' e g c>\arpeggio
+\arpeggioBracket
+<c' e g c>\arpeggio
@end lilypond
@refcommands
b2 a
}
\context Staff=two { \clef bass \skip 1*2 }
->>
+>>
@end lilypond
@seealso
@refcommands
@cindex @code{\showStaffSwitch}
-@code{\showStaffSwitch},
+@code{\showStaffSwitch},
@cindex @code{\hideStaffSwitch}
@code{\hideStaffSwitch}.
@itemize @bullet
@item
- Song texts must be entered as texts, not notes. For example, the
-input @code{d} should be interpreted as a one letter syllable, not the note D.
+Song texts must be entered as texts, not notes. For example, the
+input@tie{}@code{d} should be interpreted as a one letter syllable, not the
+note@tie{}D.
+
@item
- Song texts must be printed as text, not as notes.
+Song texts must be printed as text, not as notes.
+
@item
- Song texts must be aligned with the notes of their melody
+Song texts must be aligned with the notes of their melody
@end itemize
The simplest solution to printing music uses the @code{\addlyrics}
function to solve all these problems at once. However, these
three functions can be controlled separately, which is necessary
-for complex vocal music.
+for complex vocal music.
@menu
-* Setting simple songs::
-* Entering lyrics::
-* Hyphens and extenders::
-* The Lyrics context::
-* Flexibility in alignment::
-* More stanzas::
-* Ambitus::
+* Setting simple songs::
+* Entering lyrics::
+* Hyphens and extenders::
+* The Lyrics context::
+* Flexibility in alignment::
+* More stanzas::
+* Ambitus::
@end menu
@node Setting simple songs
The easiest way to add lyrics to a melody is to append
@cindex \addlyrics
@example
- \addlyrics @{ @var{the lyrics} @}
+\addlyrics @{ @var{the lyrics} @}
@end example
@noindent
to a melody. Here is an example,
@lilypond[raggedright,verbatim,fragment,quote]
- \time 3/4
- \relative { c2 e4 g2. }
- \addlyrics { play the game }
+\time 3/4
+\relative { c2 e4 g2. }
+\addlyrics { play the game }
@end lilypond
More stanzas can be added by adding more
-@code{\addlyrics} sections
+@code{\addlyrics} sections
@lilypond[raggedright,verbatim,fragment,quote]
- \time 3/4
- \relative { c2 e4 g2. }
- \addlyrics { play the game }
- \addlyrics { speel het spel }
- \addlyrics { joue le jeu }
+\time 3/4
+\relative { c2 e4 g2. }
+\addlyrics { play the game }
+\addlyrics { speel het spel }
+\addlyrics { joue le jeu }
@end lilypond
@c TODO - this isn't such a great place for this note, but I can't
@code{\lyricsto} or @code{\lyricmode}.
@example
- @{ MUSIC @}
- \addlyrics @{ LYRICS @}
+@{ MUSIC @}
+\addlyrics @{ LYRICS @}
@end example
+@noindent
is the same as
@example
- \context Voice = blah @{ music @}
- \lyricsto "blah" \lyricsmode \new lyrics @{ LYRICS @}
+\context Voice = blah @{ music @}
+\lyricsto "blah" \lyricsmode \new lyrics @{ LYRICS @}
@end example
a pitch, but rather as a one letter syllable. Syllables are entered
like notes, but with pitches replaced by text. For example,
@example
- \lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
+\lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
@end example
usually a mistake in the input file. The syllable includes a @code{@}}, so the
opening brace is not balanced
@example
- \lyricmode @{ twinkle@}
+\lyricmode @{ twinkle @}
@end example
@cindex @code{\property}, in @code{\lyricmode}
the resulting string. As a consequence, spaces must be inserted around
property commands
@example
- \override Score . LyricText #'font-shape = #'italic
+\override Score . LyricText #'font-shape = #'italic
@end example
@cindex @code{_}
following example incorporates double quotes
@example
- \lyricmode @{ He said: "\"Let" my peo ple "go\"" @}
+\lyricmode @{ He said: "\"Let" my peo ple "go\"" @}
@end example
This example is slightly academic, since it gives better looking
results to use single quotes, @code{``} and @code{''}
@example
- \lyricmode @{ He said: ``Let my peo ple go'' @}
+\lyricmode @{ He said: ``Let my peo ple go'' @}
@end example
@seealso
-Program reference: @internalsref{HyphenEvent},
+Program reference: @internalsref{HyphenEvent},
@internalsref{ExtenderEvent}, @internalsref{LyricHyphen}, and
@internalsref{LyricExtender}
-Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
+Examples: @inputfileref{input/@/test,lyric@/-hyphen@/-retain@/.ly}.
Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
@example
- \context Lyrics \lyricmode @dots{}
+\context Lyrics \lyricmode @dots{}
@end example
@cindex automatic syllable durations
correct duration for each syllable. This is achieved by combining the
melody and the lyrics with the @code{\lyricsto} expression
@example
-\lyricsto @var{name} \new Lyrics @dots{}
+\lyricsto @var{name} \new Lyrics @dots{}
@end example
This aligns the lyrics to the
For different or more complex orderings, the best way is to setup the
hierarchy of staves and lyrics first, e.g.
@example
-\context ChoirStaff <<
+\context ChoirStaff <<
\context Lyrics = sopranoLyrics @{ s1 @}
\context Voice = soprano @{ @emph{music} @}
\context Lyrics = tenorLyrics @{ s1 @}
@end example
and then combine the appropriate melodies and lyric lines
@example
- \lyricsto "soprano" \context Lyrics = sopranoLyrics
- @emph{the lyrics}
+\lyricsto "soprano" \context Lyrics = sopranoLyrics
+ @emph{the lyrics}
@end example
@noindent
\lyricsto "alto" @emph{etc}
@emph{etc}
>>
-@end example
+@end example
The @code{\lyricsto} command detects melismata: it only puts one
\context Voice = "lala" {
\time 3/4
f4 g8
- \melisma
+ \melisma
f e f
\melismaEnd
e2
}
\lyricsto "lala" \new Lyrics {
- la di __ daah
+ la di __ daah
}
>>
@end lilypond
Lyrics can also be entered without @code{\lyricsto}. In this case the
durations of each syllable must be entered explicitly, for example,
-@verbatim
- play2 the4 game2.
- sink2 or4 swim2.
-@end verbatim
+@example
+play2 the4 game2.
+sink2 or4 swim2.
+@end example
The alignment to a melody can be specified with the
@code{associatedVoice} property,
-@verbatim
- \set associatedVoice = #"lala"
-@end verbatim
+@example
+\set associatedVoice = #"lala"
+@end example
@noindent
The value of the property (here: @code{"lala"}) should be the name of
<< \context Voice = melody {
\time 3/4
c2 e4 g2.
- }
+ }
\new Lyrics \lyricmode {
\set associatedVoice = #"melody"
play2 the4 game2.
@internalsref{Lyrics}, @internalsref{Melisma_translator}.
Examples: @ref{Small ensembles},
-@inputfileref{input/regression,lyric-combine-new.ly},
-@c TODO: make separate section for melismata
-@inputfileref{input/test,lyrics-melisma-variants.ly}.
-@inputfileref{input/test,lyrics-melisma-faster.ly}.
-
+@inputfileref{input/@/regression,lyric@/-combine@/-new@/.ly},
+@c TODO: make separate section for melismata
+@inputfileref{input/@/test,lyrics@/-melisma@/-variants@/.ly}.
+@inputfileref{input/@/test,lyrics@/-melisma@/-faster@/.ly}.
+
@refbugs
Melismata are not detected automatically, and extender lines must be
@lilypond[verbatim,raggedright,quote]
<<
\relative \context Voice = "lahlah" {
- \set Staff.autoBeaming = ##f
+ \set Staff.autoBeaming = ##f
c4
\slurDotted
f8.[( g16])
More complex variations in text underlay are possible. It is possible
to switch the melody for a line of lyrics during the text. This is
-done by setting the @code{associatedVoice} property. In the example
+done by setting the @code{associatedVoice} property. In the example
@lilypond[raggedright,quote]
-
<<
\relative \context Voice = "lahlah" {
- \set Staff.autoBeaming = ##f
+ \set Staff.autoBeaming = ##f
c4
<<
\context Voice = alternative {
}
\new Lyrics \lyricsto "lahlah" {
% Tricky: need to set associatedVoice
- % one syllable too soon!
+ % one syllable too soon!
\set associatedVoice = alternative % applies to "ran"
Ty --
ran --
@noindent
the text for the first stanza is set to a melody called ``lahlah'',
-@verbatim
-\new Lyrics \lyricsto "lahlah" {
+@example
+\new Lyrics \lyricsto "lahlah" @{
Ju -- ras -- sic Park
-}
-@end verbatim
+@}
+@end example
The second stanza initially is set to the @code{lahlah} context, but
for the syllable ``ran'', it switches to a different melody.
This is achieved with
@example
- \set associatedVoice = alternative
+\set associatedVoice = alternative
@end example
@noindent
Again, the command must be one syllable too early, before ``Ty'' in
this case.
-@verbatim
-\new Lyrics \lyricsto "lahlah" {
+@example
+\new Lyrics \lyricsto "lahlah" @{
\set associatedVoice = alternative % applies to "ran"
Ty --
- ran --
+ ran --
no --
\set associatedVoice = lahlah % applies to "rus"
sau -- rus Rex
-}
-@end verbatim
+@}
+@end example
@noindent
The underlay is switched back to the starting situation by assigning
@cindex stanza number
@cindex singer's names
-@cindex name of singer
+@cindex name of singer
Stanza numbers can be added by setting @code{stanza}, e.g.
for example,
@example
- \layout @{
- \context @{
- \Voice
- \consists Ambitus_engraver
- @}
+\layout @{
+ \context @{
+ \Voice
+ \consists Ambitus_engraver
@}
+@}
@end example
This results in the following output
This example uses one advanced feature,
@example
- \override Ambitus #'X-offset-callbacks
- = #(list (lambda (grob axis) -1.0))
+\override Ambitus #'X-offset-callbacks
+ = #(list (lambda (grob axis) -1.0))
@end example
@noindent
This code moves the ambitus to the left. The same effect could have
been achieved with @code{extra-offset}, but then the formatting system
-would not reserve space for the moved object.
+would not reserve space for the moved object.
@seealso
@internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
@internalsref{AmbitusAccidental}.
-Examples: @inputfileref{input/regression,ambitus.ly}.
+Examples: @inputfileref{input/@/regression,ambitus@/.ly}.
@refbugs
include extra information for other instruments in the future.
@menu
-* Harmonic notes::
+* Harmonic notes::
@end menu
@node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
@cindex harmonics
Artificial harmonics are notated with a different notehead style. They
-are entered by
+are entered by
marking the harmonic pitch with @code{\harmonic}.
@lilypond[raggedright,verbatim,quote,fragment]
- <c' g'\harmonic>4
+<c' g'\harmonic>4
@end lilypond
offers limited support for tablature.
@menu
-* Tablatures basic::
-* Non-guitar tablatures::
+* Tablatures basic::
+* Non-guitar tablatures::
@end menu
@node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
@internalsref{TabVoice} contexts
@lilypond[quote,raggedright,fragment,verbatim]
- \context TabStaff {
+\context TabStaff {
a,4\5 c'\2 a\3 e'\1
e\4 c'\2 a\3 e'\1
}
\set TabStaff.minimumFret = #8
e16 fis gis a b4
@end example
-@lilypond[quote,noindent,raggedright]
+@lilypond[quote,raggedright]
frag = {
\key e \major
e16 fis gis a b4
@cindex Non-guitar tablatures
You can change the number of strings, by setting the number of lines
-in the @internalsref{TabStaff}.
+in the @internalsref{TabStaff}.
You can change the tuning of the strings. A string tuning is given as
a Scheme list with one integer number for each string, the number
@code{stringTunings} is set for the pitches e, a, d, and g
@lilypond[quote,raggedright,fragment,verbatim]
- \context TabStaff <<
- \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
-
- {
- a,4 c' a e' e c' a e'
- }
- >>
+\context TabStaff <<
+ \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
+ {
+ a,4 c' a e' e c' a e'
+ }
+>>
@end lilypond
@refbugs
@node Popular music, Orchestral music, Tablatures, Notation manual
-@section Popular music
+@section Popular music
This section discusses issues that arise when writing popular music.
@menu
-* Chord names::
-* Chords mode::
-* Printing chord names::
-* Fret diagrams::
-* Improvisation::
+* Chord names::
+* Chords mode::
+* Printing chord names::
+* Fret diagrams::
+* Improvisation::
@end menu
@node Chord names, Chords mode, Popular music, Popular music
}
<< \context ChordNames \twoWays
- \context Voice \twoWays >>
+ \context Voice \twoWays >>
@end lilypond
This example also shows that the chord printing routines do not try to
@c this menu isn't needed.
@ignore
@menu
-* Chords mode::
-* Printing chord names::
+* Chords mode::
+* Printing chord names::
@end menu
@end ignore
normal pitch
@lilypond[quote,raggedright,fragment,verbatim]
- \chordmode { es4. d8 c2 }
+\chordmode { es4. d8 c2 }
@end lilypond
@noindent
modifier (which may include a number if desired)
@c
@lilypond[quote,fragment,verbatim]
- \chordmode { e1:m e1:7 e1:m7 }
+\chordmode { e1:m e1:7 e1:m7 }
@end lilypond
The first number following the root is taken to be the `type' of the
chord, thirds are added to the root until it reaches the specified
number
@lilypond[quote,fragment,verbatim]
- \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
+\chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
@end lilypond
@cindex root of chord
the colon, and are separated by dots
@c
@lilypond[quote,verbatim,fragment]
- \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
+\chordmode { c:5.6 c:3.7.8 c:3.6.13 }
@end lilypond
Chord steps can be altered by suffixing a @code{-} or @code{+} sign
to the number
@lilypond[quote,verbatim,fragment]
- \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
+\chordmode { c:7+ c:5+.3- c:3-.5-.7- }
@end lilypond
Removals are specified similarly, and are introduced by a caret. They
must come after the additions
@lilypond[quote,verbatim,fragment]
- \chordmode { c^3 c:7^5 c:9^3.5 }
+\chordmode { c^3 c:7^5 c:9^3.5 }
@end lilypond
Modifiers can be used to change pitches. The following modifiers are
supported
+
@table @code
@item m
- is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
+The minor chord. This modifier lowers the 3rd and (if present) the 7th step.
+
@item dim
- is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
- the 7th step.
+The diminished chord. This modifier lowers the 3rd, 5th and (if present)
+the 7th step.
+
@item aug
- is the augmented chord. This modifier raises the 5th step.
+The augmented chord. This modifier raises the 5th step.
+
@item maj
- is the major 7th chord. This modifier raises the 7th step if present.
+The major 7th chord. This modifier raises the 7th step if present.
+
@item sus
- is the suspended 4th or 2nd. This modifier removes the 3rd
+The suspended 4th or 2nd. This modifier removes the 3rd
step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
the chord.
@end table
+
Modifiers can be mixed with additions
@lilypond[quote,verbatim,fragment]
- \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
+ \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
@end lilypond
-@cindex modifiers, in chords.
+@cindex modifiers, in chords.
@cindex @code{aug}
@cindex @code{dim}
@cindex @code{maj}
explicitly)
@c
@lilypond[quote,raggedright,fragment,verbatim]
- \chordmode { c:13 c:13.11 c:m13 }
+\chordmode { c:13 c:13.11 c:m13 }
@end lilypond
@cindex @code{/}
as bass notes, can be specified by appending
@code{/}@var{pitch} to the chord
@lilypond[quote,raggedright,fragment,verbatim]
- \chordmode { c1 c/g c/f }
+\chordmode { c1 c/g c/f }
@end lilypond
@cindex @code{/+}
display chord names when there is a change in the chords scheme and at
the start of a new line
-@c originally this had linewidth=9\cm, but I though that raggedright would be better
@lilypond[quote,verbatim,raggedright]
harmonies = \chordmode {
c1:m c:m \break c:m c:m d
voltaOnThisStaff = ##t
\consists Bar_engraver
\consists "Volta_engraver"
-}
+}
\repeat volta 2 \chordmode {
f1:maj f:7 bes:7
- c:maj
+ c:maj
} \alternative {
es e
}
@item chordNameExceptions
This is a list that contains the chords that have special formatting.
-The exceptions list should be encoded as encoded as
-@verbatim
- @{ <c f g bes>1 \markup @{ \\super \"7\" \"wahh\" @} @}
-@end verbatim
+The exceptions list should be encoded as
+@example
+@{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
+@end example
To get this information into @code{chordNameExceptions} takes a little
manoeuvring. The following code transforms @code{chExceptionMusic}
(which is a sequential music) into a list of exceptions.
@example
- (sequential-music-to-chord-exceptions chExceptionMusic #t)
+(sequential-music-to-chord-exceptions chExceptionMusic #t)
@end example
Then,
@example
ignatzekExceptions)
@end example
adds the new exceptions to the default ones, which are defined in
-@file{ly/chord-modifier-init.ly}.
+@file{ly/@/chord@/-modifier@/-init@/.ly}.
For an example of tuning this property, see also
-@inputfileref{input/regression,chord-name-exceptions.ly}.
+@inputfileref{input/@/regression,chord@/-name@/-exceptions@/.ly}.
@cindex exceptions, chord names.
This property contains the markup object used for the 7th step, when
it is major. Predefined options are @code{whiteTriangleMarkup} and
@code{blackTriangleMarkup}. See
-@inputfileref{input/regression,chord-name-major7.ly} for an example.
+@inputfileref{input/@/regression,chord@/-name@/-major7@/.ly} for an example.
@cindex @code{chordNameSeparator}
@item chordNameSeparator
Jazz chord notation, and a systematic scheme called Banter chords. The
alternate jazz notation is also shown on the chart in @ref{Chord name
chart}. Turning on these styles is described in the input file
-@inputfileref{input/test,chord-names-jazz.ly}.
+@inputfileref{input/@/test,chord@/-names@/-jazz@/.ly}.
@cindex Banter
@cindex jazz chords
-@cindex chords, jazz
+@cindex chords, jazz
@refcommands
@cindex @code{\germanChords}
-@code{\germanChords},
+@code{\germanChords},
@cindex @code{\semiGermanChords}
@code{\semiGermanChords}.
@seealso
-Examples: @inputfileref{input/regression,chord-name-major7.ly},
-@inputfileref{input/regression,chord-name-exceptions.ly},
-@inputfileref{input/test,chord-names-jazz.ly},
-@inputfileref{input/test,chords-without-melody.ly}.
+Examples: @inputfileref{input/@/regression,chord@/-name@/-major7@/.ly},
+@inputfileref{input/@/regression,chord@/-name@/-exceptions@/.ly},
+@inputfileref{input/@/test,chord@/-names@/-jazz@/.ly},
+@inputfileref{input/@/test,chords@/-without@/-melody@/.ly}.
-Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
+Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
+@file{scm/@/chord@/-entry@/.scm}.
@refbugs
@lilypond[verbatim, raggedright, quote]
\context Voice {
d' ^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
+ d' d' d'
fis' ^\markup \override #'(size . 0.75) {
\override #'(finger-code . below-string) {
\fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
(place-fret 1 2 1))
}
}
+ fis' fis' fis'
c' ^\markup \override #'(dot-radius . 0.35) {
\override #'(finger-code . in-dot) {
\override #'(dot-color . white) {
}
}
}
+ c' c' c'
}
@end lilypond
There are three different fret-diagram markup interfaces: standard, terse,
and verbose. The three interfaces produce equivalent markups, but have
varying amounts of information in the markup string. Details about the
-markup interfaces are found at @ref{Overview of text markup commands}.
+markup interfaces are found at @ref{Overview of text markup commands}.
You can set a number of graphical properties according to your preference.
-Details about the property interface to fret diagrams are found at
+Details about the property interface to fret diagrams are found at
@internalsref{fret-diagram-interface}.
@seealso
-Examples: @inputfileref{input/test,fret-diagram.ly}
+Examples: @inputfileref{input/@/test,fret@/-diagram@/.ly}
@node Improvisation
following command
@example
- \set squashedPosition = #0
- \override NoteHead #'style = #'slash
+\set squashedPosition = #0
+\override NoteHead #'style = #'slash
@end example
@noindent
@menu
-* System start delimiters::
-* Aligning to cadenzas::
-* Rehearsal marks::
-* Bar numbers::
-* Instrument names::
-* Transpose::
-* Instrument transpositions::
-* Multi measure rests::
-* Automatic part combining::
-* Hiding staves::
-* Different editions from one source::
-* Quoting other voices::
-* Formatting cue notes::
+* System start delimiters::
+* Aligning to cadenzas::
+* Rehearsal marks::
+* Bar numbers::
+* Instrument names::
+* Transpose::
+* Instrument transpositions::
+* Multi measure rests::
+* Automatic part combining::
+* Hiding staves::
+* Different editions from one source::
+* Quoting other voices::
+* Formatting cue notes::
@end menu
@node System start delimiters
\new Staff { c1 c }
\new Staff { c c }
>>
-@end lilypond
+@end lilypond
@item The group is started with a bracket, and bar lines are connected. This is done with the
\new Staff { c1 c }
\new Staff { c c }
>>
-@end lilypond
+@end lilypond
@item The group is started with a vertical line. Bar lines are not
\new Staff { c1 c }
\new Staff { c c }
>>
-@end lilypond
+@end lilypond
@end itemize
In an orchestral context, cadenzas present a special problem:
when constructing a score that includes a cadenza, all other
instruments should skip just as many notes as the length of the
-cadenza, otherwise they will start too soon or too late.
+cadenza, otherwise they will start too soon or too late.
A solution to this problem are the functions @code{mmrest-of-length}
and @code{skip-of-length}. These Scheme functions take a piece music
as argument, and generate a @code{\skip} or multi rest, exactly as
long as the piece. The use of @code{mmrest-of-length} is demonstrated
-in the following example.
+in the following example.
@lilypond[verbatim,raggedright,quote]
cadenza = \relative c' {
c4 d8 << { e f g } \\ { d4. } >>
g4 f2 g4 g
}
-
+
\new GrandStaff <<
- \new Staff { \cadenza c'4 }
+ \new Staff { \cadenza c'4 }
\new Staff {
#(ly:export (mmrest-of-length cadenza))
c'4
To print a rehearsal mark, use the @code{\mark} command
-@lilypond[quote,raggedright,fragment,verbatim,relative=1]
- c1 \mark \default
- c1 \mark \default
- c1 \mark #8
- c1 \mark \default
- c1 \mark \default
+@lilypond[quote,raggedright,fragment,verbatim,relative=2]
+c1 \mark \default
+c1 \mark \default
+c1 \mark #8
+c1 \mark \default
+c1 \mark \default
@end lilypond
@noindent
function taking the current mark (an integer) and the current context
as argument. It should return a markup object. In the following
example, @code{markFormatter} is set to a canned procedure. After a
-few measures, it is set to function that produces a boxed number.
+few measures, it is set to function that produces a boxed number.
-@c fragproblem? -gp
-@lilypond[quote,raggedright,verbatim,relative=2]
-{
- \set Score.markFormatter = #format-mark-numbers
- c1 \mark \default
- c1 \mark \default
- \set Score.markFormatter
- = #(lambda (mark context)
- (make-bold-markup
- (make-box-markup (number->string mark))))
- c1 \mark \default
- c1 \mark \default
-}
+@lilypond[fragment,quote,raggedright,verbatim,relative=2]
+\set Score.markFormatter = #format-mark-numbers
+c1 \mark \default
+c1 \mark \default
+\set Score.markFormatter
+ = #(lambda (mark context)
+ (make-bold-markup
+ (make-box-markup (number->string mark))))
+c1 \mark \default
+c1 \mark \default
+c1
@end lilypond
-The file @file{scm/translation-functions.scm} contains the definitions
+The file @file{scm/@/translation@/-functions@/.scm} contains the definitions
of @code{format-mark-numbers} (the default format) and
@code{format-mark-letters}. These can be used as inspiration for other
formatting functions.
segno and fermatas on a bar line. Use @code{\markup} to
to access the appropriate symbol
-@c fragproblem? -gp
-@lilypond[quote,raggedright,verbatim,relative=2]
-{
- c1 \mark \markup { \musicglyph #"scripts-ufermata" }
- c1
-}
+@lilypond[fragment,quote,raggedright,verbatim,relative=2]
+c1 \mark \markup { \musicglyph #"scripts-ufermata" }
+c1
@end lilypond
In the case of a line break, marks must also be printed at the end of
the line, and not at the beginning. Use the following to force that
behavior
@example
- \override Score.RehearsalMark
- #'break-visibility = #begin-of-line-invisible
+\override Score.RehearsalMark
+ #'break-visibility = #begin-of-line-invisible
@end example
@cindex fermatas
@cindex coda
@cindex segno
-@cindex bar lines, putting symbols on
+@cindex bar lines, putting symbols on
@seealso
Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
-Init files: @file{scm/translation-functions.scm} contains the
+Init files: @file{scm/@/translation@/-functions@/.scm} contains the
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},
+Examples: @inputfileref{input/@/regression,rehearsal@/-mark@/-letter@/.ly},
-@inputfileref{input/regression,rehearsal-mark-number.ly}.
+@inputfileref{input/@/regression,rehearsal@/-mark@/-number@/.ly}.
@node Bar numbers
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}
+@inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}
@lilypondfile[raggedright,quote]{bar-number-regular-interval.ly}
Bar numbers can be manually changed by setting the
@code{Staff.currentBarNumber} property
-@c fragproblem? -gp
-@lilypond[raggedright,quote]
+@lilypond[verbatim,raggedright,quote]
\relative c' {
\repeat unfold 4 {c4 c c c} \break
\set Score.currentBarNumber = #50
Program reference: @internalsref{BarNumber}.
-Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
-and @inputfileref{input/test,bar-number-regular-interval.ly}.
+Examples:
+@inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly},
+and @inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}.
@refbugs
used, for the next ones @code{instr} is used.
@lilypond[quote,verbatim,raggedright,relative=1,fragment]
- \set Staff.instrument = "Ploink "
- \set Staff.instr = "Plk "
- c1
- \break
- c''
+\set Staff.instrument = "Ploink "
+\set Staff.instr = "Plk "
+c1
+\break
+c''
@end lilypond
You can also use markup texts to construct more complicated instrument
names, for example
@lilypond[quote,fragment,verbatim,raggedright]
- \set Staff.instrument = \markup {
- \column < "Clarinetti" { "in B"
- \smaller \flat } > }
-{ c''1 }
+\set Staff.instrument = \markup {
+ \column < "Clarinetti"
+ { "in B" \smaller \flat } > }
+c''1
@end lilypond
For longer instrument names, it may be useful to increase the
A music expression can be transposed with @code{\transpose}. The
syntax is
@example
- \transpose @var{from} @var{to} @var{musicexpr}
+\transpose @var{from} @var{to} @var{musicexpr}
@end example
This means that @var{musicexpr} is transposed by the interval between
this piece is a little too low for its performer, it can be
transposed up to E major with
@example
- \transpose d e @dots{}
+\transpose d e @dots{}
@end example
Consider a part written for violin (a C instrument). If
transposition will produce the appropriate part
@example
- \transpose a c @dots{}
-@end example
+\transpose a c @dots{}
+@end example
@code{\transpose} distinguishes between enharmonic pitches: both
@code{\transpose c cis} or @code{\transpose c des} will transpose up
The transposition is entered after the keyword @code{\transposition}
@example
- \transposition bes %% B-flat clarinet
+\transposition bes %% B-flat clarinet
@end example
@noindent
The pitch to use for @code{\transposition} should correspond to the
transposition of the notes. For example, when entering a score in
-concert pitch, typically all voices are entered in C, so
+concert pitch, typically all voices are entered in C, so
they should be entered as
@example
- clarinet = @{
- \transposition c'
- ...
- @}
- saxophone = @{
- \transposition c'
- ..
- @}
+clarinet = @{
+ \transposition c'
+ ...
+@}
+saxophone = @{
+ \transposition c'
+ ...
+@}
@end example
The command @code{\transposition} should be used when the music is
@code{\transposition}, e.g.
@example
- \transposition d'
- c'4^"in D"
- ...
- \transposition g'
- c'4^"in G"
- ...
+\transposition d'
+c'4^"in D"
+...
+\transposition g'
+c'4^"in G"
+...
@end example
-
+
@cindex transposition, MIDI
be expanded, and the appropriate number is added automatically
@lilypond[quote,raggedright,fragment,verbatim]
- \time 4/4 r1 | R1 | R1*2
- \set Score.skipBars = ##t R1*17 R1*4
+\time 4/4 r1 | R1 | R1*2
+\set Score.skipBars = ##t R1*17 R1*4
@end lilypond
The @code{1} in @code{R1} is similar to the duration notation used for
durations. This can be done with augmentation dots or fractions
@lilypond[quote,raggedright,fragment,verbatim]
- \set Score.skipBars = ##t
- \time 3/4
- R2. | R2.*2
- \time 13/8
- R1*13/8
- R1*13/8*12 |
- \time 10/8 R4*5*4 |
+\set Score.skipBars = ##t
+\time 3/4
+R2. | R2.*2
+\time 13/8
+R1*13/8
+R1*13/8*12 |
+\time 10/8 R4*5*4 |
@end lilypond
An @code{R} spanning a single measure is printed as either a whole rest
rest, use @code{MultiMeasureRest.expand-limit}.
@lilypond[quote,raggedright,fragment,verbatim]
- \set Score.skipBars = ##t
- R1*2 | R1*5 | R1*9
- \override MultiMeasureRest #'expand-limit = 1
- R1*2 | R1*5 | R1*9
+\set Score.skipBars = ##t
+R1*2 | R1*5 | R1*9
+\override MultiMeasureRest #'expand-limit = 1
+R1*2 | R1*5 | R1*9
@end lilypond
@cindex fermata on multi-measure rest
Texts can be added to multi-measure rests by using the
-@var{note}-@code{markup} syntax (see @ref{Text markup}).
+@var{note}-@code{markup} syntax (see @ref{Text markup}).
A variable (@code{\fermataMarkup}) is provided for
adding fermatas
@lilypond[quote,raggedright,verbatim,fragment]
- \set Score.skipBars = ##t
- \time 3/4
- R2.*10^\markup { "Ad lib" }
- R2.^\fermataMarkup
+\set Score.skipBars = ##t
+\time 3/4
+R2.*10^\markup { \italic "ad lib." }
+R2.^\fermataMarkup
@end lilypond
If you want to have a text on the left end of a multi-measure rest,
attach the text to a zero-length skip note, i.e.
@example
- s1*0^"Allegro"
- R1*4
+s1*0^"Allegro"
+R1*4
@end example
-@cindex whole rests for a full measure
+@cindex whole rests for a full measure
@seealso
Be careful when entering multimeasure rests followed by whole
notes. The following will enter two notes lasting four measures each
@example
- R1*4 cis cis
+R1*4 cis cis
@end example
When @code{skipBars} is set, the result will look OK, but the bar
numbering will be off.
The syntax for part combining is
@example
- \partcombine @var{musicexpr1} @var{musicexpr2}
+\partcombine @var{musicexpr1} @var{musicexpr2}
@end example
same notes on and off, the part combiner may typeset @code{a2} more
than once in a measure.
-@code{\partcombine} cannot be inside @code{\times}.
+@code{\partcombine} cannot be inside @code{\times}.
-@code{\partcombine} cannot be inside @code{\relative}.
+@code{\partcombine} cannot be inside @code{\relative}.
Internally, the @code{\partcombine} interprets both arguments as
@code{Voice}s named @code{one} and @code{two}, and then decides when
In orchestral scores, staff lines that only have rests are usually
removed. This saves some space. This style is called `French Score'.
-For @internalsref{Lyrics},
+For @internalsref{Lyrics},
@internalsref{ChordNames} and @internalsref{FiguredBass}, this is
switched on by default. When these line of these contexts turn out
empty after the line-breaking process, they are removed.
Another application is making ossia sections, i.e. alternative
melodies on a separate piece of staff, with help of a Frenched
-staff. See @inputfileref{input/test,ossia.ly} for an example.
+staff. See @inputfileref{input/@/test,ossia@/.ly} for an example.
@node Different editions from one source
for the full score, and one with cue notes for the instrumental part
@example
- c1
- <<
- \tag #'part <<
- R1 \\
- @{
- \set fontSize = #-1
- c4_"cue" f2 g4 @}
- >>
- \tag #'score R1
+c1
+<<
+ \tag #'part <<
+ R1 \\
+ @{
+ \set fontSize = #-1
+ c4_"cue" f2 g4 @}
>>
- c1
+ \tag #'score R1
+>>
+c1
@end example
The same can be applied to articulations, texts, etc.: they are
made by prepending
@example
- -\tag #@var{your-tag}
+-\tag #@var{your-tag}
@end example
-to an articulation, for example,
+to an articulation, for example,
@example
- c1-\tag #'part ^4
+c1-\tag #'part ^4
@end example
This defines a note with a conditional fingering indication.
The argument of the @code{\tag} command should be a symbol, or a list
of symbols, for example,
@example
- \tag #'(original-part transposed-part) @dots{}
+\tag #'(original-part transposed-part) @dots{}
@end example
@seealso
-Examples: @inputfileref{input/regression,tag-filter.ly}.
+Examples: @inputfileref{input/@/regression,tag@/-filter@/.ly}.
@refbugs
quotable. This is done with code @code{\addquote} command.
@example
- \addquote @var{name} @var{music}
+\addquote @var{name} @var{music}
@end example
Here, @var{name} is an identifying string. The @var{music} is any kind
of music. This is an example of @code{\addquote}
-@verbatim
-\addquote clarinet \relative c' {
+@example
+\addquote clarinet \relative c' @{
f4 fis g gis
-}
-@end verbatim
+@}
+@end example
This command must be entered at toplevel, i.e. outside any music
blocks.
@code{\quote},
@example
- \quote @var{name} @var{duration}
+\quote @var{name} @var{duration}
@end example
During a part, a piece of music can be quoted with the @code{\quote}
-command.
-
+command.
+
@example
\quote clarinet 2.
@end example
printed, and extracts the notes at the corresponding point of the
@code{\addquote}d voice. Therefore, the argument to @code{\addquote}
should be the entire part of the voice to be quoted, including any
-rests at the beginning.
+rests at the beginning.
Quotations take into account the transposition of both source and target
instruments, if they are specified using the @code{\transposition} command.
Setting
@example
- \set Staff.quotedEventTypes = #'(note-event articulation-event dynamic-event)
+\set Staff.quotedEventTypes =
+ #'(note-event articulation-event dynamic-event)
@end example
@noindent
will quote notes (but no rests), together with scripts and dynamics.
-
+
@refbugs
Only the contents of the first @internalsref{Voice} occurring in an
In this manual: @ref{Instrument transpositions}.
-Examples: @inputfileref{input/regression,quote.ly}
-@inputfileref{input/regression,quote-transposition.ly}
+Examples: @inputfileref{input/@/regression,quote@/.ly}
+@inputfileref{input/@/regression,quote@/-transposition@/.ly}
Program reference: @internalsref{QuoteMusic}.
@lilypond[raggedright,verbatim]
smaller = {
- \set fontSize = #-1
+ \set fontSize = #-2
\override Stem #'length = #5.5
\override Beam #'thickness = #0.384
\override Beam #'space-function =
marked with the instrument playing the cue.
@end itemize
-@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
@node Ancient notation
Here are all suptopics at a glance:
@menu
-* Ancient note heads::
-* Ancient accidentals::
-* Ancient rests::
-* Ancient clefs::
-* Ancient flags::
-* Ancient time signatures::
-* Ancient articulations::
-* Custodes::
-* Divisiones::
-* Ligatures::
-* Gregorian Chant contexts::
-* Mensural contexts::
-* Figured bass::
+* Ancient note heads::
+* Ancient accidentals::
+* Ancient rests::
+* Ancient clefs::
+* Ancient flags::
+* Ancient time signatures::
+* Ancient articulations::
+* Custodes::
+* Divisiones::
+* Ligatures::
+* Gregorian Chant contexts::
+* Mensural contexts::
+* Figured bass::
@end menu
The following example demonstrates the @code{neomensural} style
@lilypond[quote,fragment,raggedright,verbatim]
- \set Score.skipBars = ##t
- \override NoteHead #'style = #'neomensural
- a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
+\set Score.skipBars = ##t
+\override NoteHead #'style = #'neomensural
+a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
@end lilypond
When typesetting a piece in Gregorian Chant notation, the
@seealso
-Examples: @inputfileref{input/regression,note-head-style.ly} gives an
+Examples: @inputfileref{input/@/regression,note@/-head@/-style@/.ly} gives an
overview over all available note head styles.
\fatText
s^\markup {
\column <
- "vaticana"
+ "vaticana"
{ " " \musicglyph #"accidentals-vaticana-1"
" " \musicglyph #"accidentals-vaticana0" }
>
As shown, not all accidentals are supported by each style. When
trying to access an unsupported accidental, LilyPond will switch to a
different style, as demonstrated in
-@inputfileref{input/test,ancient-accidentals.ly}.
+@inputfileref{input/@/test,ancient@/-accidentals@/.ly}.
Similarly to local accidentals, the style of the key signature can be
controlled by the @code{style} property of the
Program reference: @internalsref{KeySignature}.
-Examples: @inputfileref{input/test,ancient-accidentals.ly}.
+Examples: @inputfileref{input/@/test,ancient@/-accidentals@/.ly}.
@node Ancient rests
@subsection Ancient rests
The following example demonstrates the @code{neomensural} style
@lilypond[quote,fragment,raggedright,verbatim]
- \set Score.skipBars = ##t
- \override Rest #'style = #'neomensural
- r\longa r\breve r1 r2 r4 r8 r16
+\set Score.skipBars = ##t
+\override Rest #'style = #'neomensural
+r\longa r\breve r1 r2 r4 r8 r16
@end lilypond
There are no 32th and 64th rests specifically for the mensural or
neo-mensural style. Instead, the rests from the default style will be
-taken. See @inputfileref{input/test,rests.ly} for a chart of all
+taken. See @inputfileref{input/@/test,rests@/.ly} for a chart of all
rests.
There are no rests in Gregorian Chant notation; instead, it uses
right side of each clef in the example column denotes the @code{c'}
with respect to that clef.
-@multitable @columnfractions .4 .4 .2
-
+@multitable @columnfractions .4 .4 .2
@item
-@b{Description} @tab
-@b{Supported Clefs} @tab
+@b{Description}
+@tab
+@b{Supported Clefs}
+@tab
@b{Example}
@item
-modern style mensural C clef @tab
-@code{neomensural-c1}, @code{neomensural-c2},
-@code{neomensural-c3}, @code{neomensural-c4} @tab
-@lilypond[fragment,raggedright,quote,relative=1,notime]
+modern style mensural C clef
+@tab
+@code{neomensural-c1}, @code{neomensural-c2},@*
+@code{neomensural-c3}, @code{neomensural-c4}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "neomensural-c2" c
@end lilypond
@item
petrucci style mensural C clefs, for use on different staff lines
-(the examples shows the 2nd staff line C clef).
-
+(the examples shows the 2nd staff line C clef)
@tab
-@code{petrucci-c1}
-@code{petrucci-c2}
-@code{petrucci-c3}
-@code{petrucci-c4}
+@code{petrucci-c1}, @code{petrucci-c2},@*
+@code{petrucci-c3}, @code{petrucci-c4},@*
@code{petrucci-c5}
-
@tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+@lilypond[fragment,relative=1,notime]
\clef "petrucci-c2" c
@end lilypond
@item
-petrucci style mensural F clef @tab
-@code{petrucci-f} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+petrucci style mensural F clef
+@tab
+@code{petrucci-f}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "petrucci-f" c
@end lilypond
@item
-petrucci style mensural G clef @tab
-@code{petrucci-g} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+petrucci style mensural G clef
+@tab
+@code{petrucci-g}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "petrucci-g" c
@end lilypond
@item
-historic style mensural C clef @tab
-@code{mensural-c1}, @code{mensural-c2}, @code{mensural-c3},
-@code{mensural-c4} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style mensural C clef
+@tab
+@code{mensural-c1}, @code{mensural-c2},@*
+@code{mensural-c3}, @code{mensural-c4}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "mensural-c2" c
@end lilypond
@item
-historic style mensural F clef @tab
-@code{mensural-f} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style mensural F clef
+@tab
+@code{mensural-f}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "mensural-f" c
@end lilypond
@item
-historic style mensural G clef @tab
-@code{mensural-g} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style mensural G clef
+@tab
+@code{mensural-g}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "mensural-g" c
@end lilypond
@item
-Editio Vaticana style do clef @tab
-@code{vaticana-do1}, @code{vaticana-do2}, @code{vaticana-do3} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+Editio Vaticana style do clef
+@tab
+@code{vaticana-do1}, @code{vaticana-do2},@*
+@code{vaticana-do3}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "vaticana-do2" c
@end lilypond
@item
-Editio Vaticana style fa clef @tab
-@code{vaticana-fa1}, @code{vaticana-fa2} @tab
-@lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
+Editio Vaticana style fa clef
+@tab
+@code{vaticana-fa1}, @code{vaticana-fa2}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "vaticana-fa2" c
@end lilypond
@item
-Editio Medicaea style do clef @tab
-@code{medicaea-do1}, @code{medicaea-do2}, @code{medicaea-do3} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+Editio Medicaea style do clef
+@tab
+@code{medicaea-do1}, @code{medicaea-do2},@*
+@code{medicaea-do3}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "medicaea-do2" c
@end lilypond
@item
-Editio Medicaea style fa clef @tab
-@code{medicaea-fa1}, @code{medicaea-fa2} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+Editio Medicaea style fa clef
+@tab
+@code{medicaea-fa1}, @code{medicaea-fa2}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "medicaea-fa2" c
@end lilypond
@item
-historic style hufnagel do clef @tab
-@code{hufnagel-do1}, @code{hufnagel-do2}, @code{hufnagel-do3} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style hufnagel do clef
+@tab
+@code{hufnagel-do1}, @code{hufnagel-do2},@*
+@code{hufnagel-do3}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "hufnagel-do2" c
@end lilypond
@item
-historic style hufnagel fa clef @tab
-@code{hufnagel-fa1}, @code{hufnagel-fa2} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style hufnagel fa clef
+@tab
+@code{hufnagel-fa1}, @code{hufnagel-fa2}
+@tab
+@lilypond[fragment,relative=1,notime]
\override Staff.StaffSymbol #'line-count = #4
\clef "hufnagel-fa2" c
@end lilypond
@item
-historic style hufnagel combined do/fa clef @tab
-@code{hufnagel-do-fa} @tab
-@lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
+historic style hufnagel combined do/fa clef
+@tab
+@code{hufnagel-do-fa}
+@tab
+@lilypond[fragment,relative=1,notime]
\clef "hufnagel-do-fa" c
@end lilypond
-
@end multitable
only @code{mensural} style is supported
@lilypond[quote,fragment,raggedright,verbatim]
- \override Stem #'flag-style = #'mensural
- \override Stem #'thickness = #1.0
- \override NoteHead #'style = #'mensural
- \autoBeamOff
- c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
- c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
+\override Stem #'flag-style = #'mensural
+\override Stem #'thickness = #1.0
+\override NoteHead #'style = #'mensural
+\autoBeamOff
+c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
+c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
@end lilypond
Note that the innermost flare of each mensural flag always is
\time 2/2
c1^\markup { \hspace #-2.0 \typewriter default }
- \override Staff.TimeSignature #'style = #'numbered
+ \override Staff.TimeSignature #'style = #'numbered
\time 2/2
c1^\markup { \hspace #-2.0 \typewriter numbered }
\override Staff.TimeSignature #'style = #'mensural
\time 2/2
c1^\markup { \hspace #-2.0 \typewriter mensural }
-
+
\override Staff.TimeSignature #'style = #'neomensural
\time 2/2
c1^\markup { \hspace #-2.0 \typewriter neomensural }
be made by hand, by setting
@example
- breveTP = #(ly:make-duration -1 0 3 2)
- @dots{}
- @{ c\breveTP f1 @}
+breveTP = #(ly:make-duration -1 0 3 2)
+@dots{}
+@{ c\breveTP f1 @}
@end example
@noindent
-This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
+This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
addressable with @code{\time}. Use a @code{\markup} instead
provided. These are specifically designed for use with notation in
Editio Vaticana style.
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\include "gregorian-init.ly"
\score {
\context VaticanaVoice {
@lilypond[quote,raggedright,fragment]
\new Lyrics \lyricmode {
\markup { \column <
- \typewriter "vaticana"
+ \typewriter "vaticana"
{ " " \musicglyph #"custodes-vaticana-u0" }
> }
\markup { \column <
{ " " \musicglyph #"custodes-mensural-u0" }
>}
}
-
@end lilypond
@seealso
Program reference: @internalsref{Custos}.
-Examples: @inputfileref{input/regression,custos.ly}.
+Examples: @inputfileref{input/@/regression,custos@/.ly}.
@node Divisiones
single antiphonal/responsorial chant to mark the end of each section.
-To use divisiones, include the file @code{gregorian-init.ly}. It
+To use divisiones, include the file @file{gregorian@/-init@/.ly}. It
contains definitions that you can apply by just inserting
@code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
and @code{\finalis} at proper places in the input. Some editions use
@emph{virgula} or @emph{caesura} instead of divisio minima.
-Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
+Therefore, @file{gregorian@/-init@/.ly} also defines @code{\virgula} and
@code{\caesura}
@lilypondfile[quote,raggedright]{divisiones.ly}
Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
-Examples: @inputfileref{input/test,divisiones.ly}.
+Examples: @inputfileref{input/@/test,divisiones@/.ly}.
@node Ligatures
@subsection Ligatures
@menu
-* White mensural ligatures::
-* Gregorian square neumes ligatures::
+* White mensural ligatures::
+* Gregorian square neumes ligatures::
@end menu
@node White mensural ligatures
@cindex Mensural ligatures
@cindex White mensural ligatures
-There is limited support for white mensural ligatures.
+There is limited support for white mensural ligatures.
To engrave white mensural ligatures, in the layout block the
@internalsref{Mensural_ligature_engraver} has to be put into the
For example,
@example
- \set Score.timing = ##f
- \set Score.defaultBarType = "empty"
- \override NoteHead #'style = #'neomensural
- \override Staff.TimeSignature #'style = #'neomensural
- \clef "petrucci-g"
- \[ g\longa c\breve a\breve f\breve d'\longa \]
- s4
- \[ e1 f1 a\breve g\longa \]
+\set Score.timing = ##f
+\set Score.defaultBarType = "empty"
+\override NoteHead #'style = #'neomensural
+\override Staff.TimeSignature #'style = #'neomensural
+\clef "petrucci-g"
+\[ g\longa c\breve a\breve f\breve d'\longa \]
+s4
+\[ e1 f1 a\breve g\longa \]
@end example
@lilypond[quote,raggedright]
\score {
@multitable @columnfractions .4 .2 .2 .2
@item
-@b{Neuma aut@*Neumarum Elementa} @tab
-@b{Figurae@*Rectae} @tab
-@b{Figurae@*Liquescentes Auctae} @tab
-@b{Figurae@*Liquescentes Deminutae}
+@b{Neuma aut@*
+Neumarum Elementa}
+@tab
+@b{Figurae@*
+Rectae}
+@tab
+@b{Figurae@*
+Liquescentes@*
+Auctae}
+@tab
+@b{Figurae@*
+Liquescentes@*
+Deminutae}
@c TODO: \layout block is identical in all of the below examples.
@c Therefore, it should somehow be included rather than duplicated all
@item
@code{1. Punctum}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.5\cm]
+@lilypond[staffsize=26,linewidth=1.5\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=2.5\cm]
+@lilypond[staffsize=26,linewidth=2.5\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{2. Virga}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{3. Apostropha vel Stropha}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{4. Oriscus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{5. Clivis vel Flexa}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=2.0\cm]
+@lilypond[staffsize=26,linewidth=2.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{6. Podatus vel Pes}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=2.0\cm]
+@lilypond[staffsize=26,linewidth=2.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{7. Pes Quassus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{8. Quilisma Pes}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{9. Podatus Initio Debilis}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{10. Torculus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{11. Torculus Initio Debilis}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{12. Porrectus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{13. Climacus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{14. Scandicus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{15. Salicus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
\layout { \neumeDemoLayout }}
@end lilypond
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
@item
@code{16. Trigonus}
@tab
-@lilypond[quote,noindent,staffsize=26,linewidth=1.0\cm]
+@lilypond[staffsize=26,linewidth=1.0\cm]
\include "gregorian-init.ly"
\score {
\transpose c c' {
ligature. The third column shows the code fragment that produces this
ligature, using @code{g}, @code{a} and @code{b} as example pitches.
-@multitable @columnfractions .1 .4 .5
-
+@multitable @columnfractions .02 .31 .67
@item
-@b{#} @tab
-@b{Name} @tab
+@b{#}
+@tab
+@b{Name}
+@tab
@b{Input Language}
@item
-a @tab
-Punctum @tab
+a
+@tab
+Punctum
+@tab
@code{\[ b \]}
@item
-b @tab
-Punctum Inclinatum @tab
+b
+@tab
+Punctum Inclinatum
+@tab
@code{\[ \inclinatum b \]}
@item
-c @tab
-Punctum Auctum Ascendens @tab
+c
+@tab
+Punctum Auctum@*
+Ascendens
+@tab
@code{\[ \auctum \ascendens b \]}
@item
-d @tab
-Punctum Auctum Descendens @tab
+d
+@tab
+Punctum Auctum@*
+Descendens
+@tab
@code{\[ \auctum \descendens b \]}
@item
-e @tab
-Punctum Inclinatum Auctum @tab
+e
+@tab
+Punctum Inclinatum@*
+Auctum
+@tab
@code{\[ \inclinatum \auctum b \]}
@item
-f @tab
-Punctum Inclinatum Parvum @tab
+f
+@tab
+Punctum Inclinatum@*
+Parvum @tab
@code{\[ \inclinatum \deminutum b \]}
@item
-g @tab
-Virga @tab
+g
+@tab
+Virga
+@tab
@code{\[ \virga b \]}
@item
-h @tab
-Stropha @tab
+h
+@tab
+Stropha
+@tab
@code{\[ \stropha b \]}
@item
-i @tab
-Stropha Aucta @tab
+i
+@tab
+Stropha Aucta
+@tab
@code{\[ \stropha \auctum b \]}
@item
-j @tab
-Oriscus @tab
+j
+@tab
+Oriscus
+@tab
@code{\[ \oriscus b \]}
@item
-k @tab
-Clivis vel Flexa @tab
+k
+@tab
+Clivis vel Flexa
+@tab
@code{\[ b \flexa g \]}
@item
-l @tab
-Clivis Aucta Descendens @tab
+l
+@tab
+Clivis Aucta@*
+Descendens
+@tab
@code{\[ b \flexa \auctum \descendens g \]}
@item
-m @tab
-Clivis Aucta Ascendens @tab
+m
+@tab
+Clivis Aucta@*
+Ascendens
+@tab
@code{\[ b \flexa \auctum \ascendens g \]}
@item
-n @tab
-Cephalicus @tab
+n
+@tab
+Cephalicus
+@tab
@code{\[ b \flexa \deminutum g \]}
@item
-o @tab
-Podatus vel Pes @tab
+o
+@tab
+Podatus vel Pes
+@tab
@code{\[ g \pes b \]}
@item
-p @tab
-Pes Auctus Descendens @tab
+p
+@tab
+Pes Auctus@*
+Descendens
+@tab
@code{\[ g \pes \auctum \descendens b \]}
@item
-q @tab
-Pes Auctus Ascendens @tab
+q
+@tab
+Pes Auctus@*
+Ascendens
+@tab
@code{\[ g \pes \auctum \ascendens b \]}
@item
-r @tab
-Epiphonus @tab
+r
+@tab
+Epiphonus
+@tab
@code{\[ g \pes \deminutum b \]}
@item
-s @tab
-Pes Quassus @tab
+s
+@tab
+Pes Quassus
+@tab
@code{\[ \oriscus g \pes \virga b \]}
@item
-t @tab
-Pes Quassus Auctus Descendens @tab
+t
+@tab
+Pes Quassus@*
+Auctus Descendens @tab
@code{\[ \oriscus g \pes \auctum \descendens b \]}
@item
-u @tab
-Quilisma Pes @tab
+u
+@tab
+Quilisma Pes
+@tab
@code{\[ \quilisma g \pes b \]}
@item
-v @tab
-Quilisma Pes Auctus Descendens @tab
+v
+@tab
+Quilisma Pes@*
+Auctus Descendens
+@tab
@code{\[ \quilisma g \pes \auctum \descendens b \]}
@item
-w @tab
-Pes Initio Debilis @tab
+w
+@tab
+Pes Initio Debilis
+@tab
@code{\[ \deminutum g \pes b \]}
@item
-x @tab
-Pes Auctus Descendens Initio Debilis @tab
+x
+@tab
+Pes Auctus Descendens@*
+Initio Debilis
+@tab
@code{\[ \deminutum g \pes \auctum \descendens b \]}
@item
-y @tab
-Torculus @tab
+y
+@tab
+Torculus
+@tab
@code{\[ a \pes b \flexa g \]}
@item
-z @tab
-Torculus Auctus Descendens @tab
+z
+@tab
+Torculus Auctus@*
+Descendens
+@tab
@code{\[ a \pes b \flexa \auctum \descendens g \]}
@item
-A @tab
-Torculus Deminutus @tab
+A
+@tab
+Torculus Deminutus
+@tab
@code{\[ a \pes b \flexa \deminutum g \]}
@item
-B @tab
-Torculus Initio Debilis @tab
+B
+@tab
+Torculus Initio Debilis
+@tab
@code{\[ \deminutum a \pes b \flexa g \]}
@item
-C @tab
-Torculus Auctus Descendens Initio Debilis @tab
+C
+@tab
+Torculus Auctus@*
+Descendens Initio Debilis
+@tab
@code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
@item
-D @tab
-Torculus Deminutus Initio Debilis @tab
+D
+@tab
+Torculus Deminutus@*
+Initio Debilis
+@tab
@code{\[ \deminutum a \pes b \flexa \deminutum g \]}
@item
-E @tab
-Porrectus @tab
+E
+@tab
+Porrectus
+@tab
@code{\[ a \flexa g \pes b \]}
@item
-F @tab
-Porrectus Auctus Descendens @tab
+F
+@tab
+Porrectus Auctus@*
+Descendens
+@tab
@code{\[ a \flexa g \pes \auctum \descendens b \]}
@item
-G @tab
-Porrectus Deminutus @tab
+G
+@tab
+Porrectus Deminutus
+@tab
@code{\[ a \flexa g \pes \deminutum b \]}
@item
-H @tab
-Climacus @tab
+H
+@tab
+Climacus
+@tab
@code{\[ \virga b \inclinatum a \inclinatum g \]}
@item
-I @tab
-Climacus Auctus @tab
+I
+@tab
+Climacus Auctus
+@tab
@code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
@item
-J @tab
-Climacus Deminutus @tab
+J
+@tab
+Climacus Deminutus
+@tab
@code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
@item
-K @tab
-Scandicus @tab
+K
+@tab
+Scandicus
+@tab
@code{\[ g \pes a \virga b \]}
@item
-L @tab
-Scandicus Auctus Descendens @tab
+L
+@tab
+Scandicus Auctus@*
+Descendens
+@tab
@code{\[ g \pes a \pes \auctum \descendens b \]}
@item
-M @tab
-Scandicus Deminutus @tab
+M
+@tab
+Scandicus Deminutus
+@tab
@code{\[ g \pes a \pes \deminutum b \]}
@item
-N @tab
-Salicus @tab
+N
+@tab
+Salicus
+@tab
@code{\[ g \oriscus a \pes \virga b \]}
@item
-O @tab
-Salicus Auctus Descendens @tab
+O
+@tab
+Salicus Auctus Descendens
+@tab
@code{\[ g \oriscus a \pes \auctum \descendens b \]}
@item
-P @tab
-Trigonus @tab
+P
+@tab
+Trigonus
+@tab
@code{\[ \stropha b \stropha b \stropha a \]}
-
@end multitable
@refcommands
proper values, so you can immediately go ahead entering the chant, as
the following excerpt demonstrates
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\include "gregorian-init.ly"
\score {
<<
grob properties to proper values, so you can immediately go ahead
entering the chant, as the following excerpt demonstrates
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\score {
<<
\context MensuralVoice = "discantus" \transpose c c' {
\override Score.BarNumber #'transparent = ##t {
- c'1\melisma bes a g\melismaEnd
- f\breve
- \[ f1\melisma a c'\breve d'\melismaEnd \]
- c'\longa
- c'\breve\melisma a1 g1\melismaEnd
- fis\longa^\signumcongruentiae
+ c'1\melisma bes a g\melismaEnd
+ f\breve
+ \[ f1\melisma a c'\breve d'\melismaEnd \]
+ c'\longa
+ c'\breve\melisma a1 g1\melismaEnd
+ fis\longa^\signumcongruentiae
}
}
\lyricsto "discantus" \new Lyrics {
<4- 6+ 7!>
@end example
@lilypond[quote,raggedright,fragment]
- \context FiguredBass
- \figuremode { <4- 6+ 7!> }
+\context FiguredBass
+\figuremode { <4- 6+ 7!> }
@end lilypond
Spaces or dashes may be inserted by using @code{_}. Brackets are
introduced with @code{[} and @code{]}
@example
-< [4 6] 8 [_! 12]>
+< [4 6] 8 [_! 12] >
@end example
@lilypond[quote,raggedright,fragment]
- \context FiguredBass
- \figuremode { < [4 6] 8 [_! 12]> }
+\context FiguredBass
+\figuremode { < [4 6] 8 [_! 12] > }
@end lilypond
Although the support for figured bass may superficially resemble chord
@seealso
-Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
+Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
and @internalsref{FiguredBass} context.
@refbugs
@menu
-* Polymetric notation::
-* Clusters::
-* Special fermatas::
-* Feathered beams::
+* Polymetric notation::
+* Clusters::
+* Special fermatas::
+* Feathered beams::
@end menu
@node Polymetric notation
@internalsref{TimeSignature} grob.
@lilypond[verbatim,raggedright]
-
% create 2/4 + 5/8
tsMarkup =\markup {
- \number {
+ \number {
\column < "2" "4" >
- \musicglyph #"scripts-stopped"
+ \musicglyph #"scripts-stopped"
\bracket \column < "5" "8" >
}
}
moving the @internalsref{Timing_engraver} to @internalsref{Staff}
context.
-@verbatim
-\layout{
- \context{ \Score \remove "Timing_engraver" }
- \context{ \Staff \consists "Timing_engraver" }
-}
-@end verbatim
+@example
+\layout @{
+ \context @{ \Score \remove "Timing_engraver" @}
+ \context @{ \Staff \consists "Timing_engraver" @}
+@}
+@end example
Now, each staff has its own time signature.
-@verbatim
+@example
<<
- \new Staff {
+ \new Staff @{
\time 3/4
c4 c c | c c c |
- }
- \new Staff {
+ @}
+ \new Staff @{
\time 2/4
c4 c | c c | c c
- }
- \new Staff {
+ @}
+ \new Staff @{
\time 3/8
c4. c8 c c c4. c8 c c
- }
+ @}
>>
-@end verbatim
+@end example
@lilypond[quote,raggedright]
\layout{
\context{ \Score \remove "Timing_engraver" }
\context{ \Staff \consists "Timing_engraver" }
-}
+}
\relative c' <<
\new Staff {
In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
-used in parallel. In the second staff, shown durations are multiplied by
-2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
+used in parallel. In the second staff, shown durations are multiplied by
+2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
-@lilypond[raggedright,verbatim,fragment]
+@lilypond[quote,raggedright,verbatim,fragment]
\relative c' { <<
\new Staff {
\time 3/4
chords, e.g.
@c
@lilypond[quote,raggedright,relative=2,fragment,verbatim]
- \makeClusters { <c e > <b f'> }
+\makeClusters { <c e > <b f'> }
@end lilypond
The following example (from
-@inputfileref{input/regression,cluster.ly}) shows what the result
+@inputfileref{input/@/regression,cluster@/.ly}) shows what the result
looks like
@lilypondfile[raggedright,quote]{cluster.ly}
@internalsref{Cluster_spanner_engraver}, and
@internalsref{ClusterNoteEvent}.
-Examples: @inputfileref{input/regression,cluster.ly}.
+Examples: @inputfileref{input/@/regression,cluster@/.ly}.
@refbugs
}
\new Voice {
\stemUp
- \once \override Voice.Beam #'positions = #'(0 . -0.5)
+ \once \override Voice.Beam #'positions = #'(0 . -0.5)
c[ c c c c]
}
>>
teaching tools in addition to great musical scores.
@menu
-* Balloon help::
-* Blank music sheet::
-* Hidden notes::
-* Easy Notation note heads::
+* Balloon help::
+* Blank music sheet::
+* Hidden notes::
+* Easy Notation note heads::
@end menu
@node Balloon help
@noindent
The function @code{add-balloon-text} takes the name of a grob, the
-label to print, and the position where to put the label relative to
-the object. In the above example, the text ``heads or tails?'' ends
+label to print, and the position where to put the label relative to
+the object. In the above example, the text ``heads or tails?'' ends
3 spaces below and 1 space to the right of the marked head.
@cindex balloon
Program reference: @internalsref{text-balloon-interface}.
-Examples: @inputfileref{input/regression,balloon.ly}.
+Examples: @inputfileref{input/@/regression,balloon@/.ly}.
removing @code{Bar_number_engraver}.
-@lilypond[]
+@lilypond[quote,verbatim]
emptymusic = {
- \repeat unfold 2 % Change this for more lines.
+ \repeat unfold 2 % Change this for more lines.
{ s1\break }
\bar "|."
}
or composition exercises.
@lilypond[quote,raggedright,verbatim,relative=2,fragment]
- c4 d4
- \hideNotes
- e4 f4
- \unHideNotes
- g4 a
+c4 d4
+\hideNotes
+e4 f4
+\unHideNotes
+g4 a
@end lilypond
Hidden notes are also great for performing weird tricks. For example,
as possible.
@lilypond[quote,raggedright,verbatim,relative=0,fragment]
- \clef bass
- << {
- c4^"pizz"( \hideNotes c)
- \unHideNotes c( \hideNotes c)
- } {
- s4 r s r
- } >>
+\clef bass
+<< {
+ c4^"pizz"( \hideNotes c)
+ \unHideNotes c( \hideNotes c)
+} {
+ s4 r s r
+} >>
@end lilypond
specials, but does not use the kpathsea library, so it cannot find
LilyPond font and PostScript library files.}, version 22.36 or newer.
It is available from
-@uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}.
+@uref{ftp://@/ftp@/.math@/.berkeley@/.edu/@/pub/@/Software/@/TeX/@/xdvi@/.tar@/.gz,
+ftp@/.math@/.berkeley@/.edu}.
Most @TeX{} distributions ship with xdvik, which is always a few
versions behind the official Xdvi. To find out which Xdvi you are
running, try @code{xdvi -version} or @code{xdvi.bin -version}.
-@item an editor with a client/server interface (or a lightweight GUI
+@item an editor with a client/@/server interface (or a lightweight GUI
editor):
@itemize @bullet
@item Emacs. Emacs is an extensible text-editor. It is available from
-@uref{http://www.gnu.org/software/emacs/}. You need version 21 to use
-column location.
+@uref{http://@/www@/.gnu@/.org/@/software/@/emacs/}. You need version 21
+to use column location.
@c move this elsewhere?
@cindex XEmacs
@item NEdit. NEdit runs under Windows, and Unix.
- It is available from @uref{http://www.nedit.org}.
+It is available from @uref{http://@/www@/.nedit@/.org}.
@cindex NEdit
@item GVim. GVim is a GUI variant of VIM, the popular VI
-clone. It is available from @uref{http://www.vim.org}.
+clone. It is available from @uref{http://@/www@/.vim@/.org}.
@cindex GVim
@cindex Vim
@cindex Emacs
For using point-and-click with Emacs, add the following
-In your Emacs startup file (usually @file{~/.emacs}):
+In your Emacs startup file (usually @file{~/@/.emacs}):
@example
(server-start)
@end example
Examples of the use of @code{\applymusic} are in the next section.
@seealso
-@file{ly/music-functions-init.ly}.
+@file{ly/@/music@/-functions@/-init@/.ly}.
@node Manipulating music expressions
@subsection Manipulating music expressions
@end example
A slightly more elaborate example is in
-@inputfileref{input/test,reverse-music.ly}.
+@inputfileref{input/@/test,reverse@/-music@/.ly}.
Some of the input syntax is also implemented as recursive music
functions. For example, the syntax for polyphony
@end example
Other applications of @code{\applymusic} are writing out repeats
-automatically (@inputfileref{input/test,unfold-all-repeats.ly}),
-saving keystrokes (@inputfileref{input/test,music-box.ly}) and
+automatically (@inputfileref{input/@/test,unfold@/-all@/-repeats@/.ly}),
+saving keystrokes (@inputfileref{input/@/test,music@/-box@/.ly}) and
exporting LilyPond input to other formats
-(@inputfileref{input/test,to-xml.ly})
+(@inputfileref{input/@/test,to@/-xml@/.ly})
@cindex internal storage
@cindex @code{\displayMusic}
@seealso
-@file{scm/music-functions.scm}, @file{scm/music-types.scm},
-@inputfileref{input/test,add-staccato.ly},
-@inputfileref{input/test,unfold-all-repeats.ly}, and
-@inputfileref{input/test,music-box.ly}.
+@file{scm/@/music@/-functions@/.scm}, @file{scm/@/music@/-types@/.scm},
+@inputfileref{input/@/test,add@/-staccato@/.ly},
+@inputfileref{input/@/test,unfold@/-all@/-repeats@/.ly}, and
+@inputfileref{input/@/test,music@/-box@/.ly}.
@node Using LilyPond syntax inside Scheme
The @code{raise-markup} first creates the stencil for the @code{foo}
string, and then it raises that Stencil by 0.5 staff space. This is a
rather simple example; more complex examples are in the rest of this
-section, and in @file{scm/define-markup-commands.scm}.
+section, and in @file{scm/@/define@/-markup@/-commands@/.scm}.
@node Markup command definition
@subsection Markup command definition
input syntax, and as internal mechanism to glue together modules of
the program. This section is a very brief overview of entering data in
Scheme.@footnote{If you want to know more about Scheme, see
-@uref{http://www.schemers.org}.}
+@uref{http://@/www@/.schemers@/.org}.}
The most basic thing of a language is data: numbers, character
strings, lists, etc. Here is a list of data types that are relevant to
Not all midi players correctly handle tempo change in the midi
output. Players that are known to work include
-@uref{http://timidity.sourceforge.net/,timidity}.
+@uref{http://@/timidity@/.sourceforge@/.net/,timidity}.
Context definitions follow precisely the same syntax as within the
\layout block. Translation modules for sound are called performers.
-The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
+The contexts for MIDI output are defined in @file{ly/@/performer@/-init@/.ly}.
@node MIDI instrument names
Try it on this image
@lilypond[fragment,quote,raggedright,relative=2]
- c-\markup { \bold \huge { Click here. } }
+c-\markup { \bold \huge { Click here. } }
@end lilypond
@end ifhtml
@samp{a} through @samp{g}. So, if you enter
@example
- c d e f g a b
+c d e f g a b
@end example
@noindent
the result looks like this
@lilypond[fragment,quote,notime,relative=1]
- c d e f g a b
+c d e f g a b
@end lilypond
The duration of a note is specified by a number after the note name.
@c FIXME: have NOTIME also remove Score.timing?
@lilypond[fragment,quote,notime,relative=2]
- \set Score.timing = ##f
- \set Staff.autoBeaming = ##f
- { a1 a2 a4 a16 a32 s16_" " }
+\set Score.timing = ##f
+\set Staff.autoBeaming = ##f
+{ a1 a2 a4 a16 a32 s16_" " }
@end lilypond
If you do not specify a @rglos{duration}, the duration last entered is
defaults to a quarter
@example
- a a8 a a2 a
+a a8 a a2 a
@end example
@lilypond[fragment,quote,notime,relative=2]
- \set Score.timing = ##f
- { a a8 a a2 a s16_" " }
+\set Score.timing = ##f
+{ a a8 a a2 a s16_" " }
@end lilypond
@cindex rests
@example
- r2 r4 r8 r16
+r2 r4 r8 r16
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- r2 r4 r8 r16 s16_" "
+\set Score.timing = ##f
+r2 r4 r8 r16 s16_" "
@end lilypond
Add a dot @samp{.} after the duration to get a @rglos{dotted note}
@example
- a2. a4 a8. a16
+a2. a4 a8. a16
@end example
@lilypond[fragment,quote,notime,relative=1]
- \set Score.timing = ##f
- { a2. a4 a8. a16 s16_" " }
+\set Score.timing = ##f
+{ a2. a4 a8. a16 s16_" " }
@end lilypond
The @rglos{meter} (or @rglos{time signature}) can be set with the
@code{\time} command
@example
- \time 3/4
- \time 6/8
- \time 4/4
+\time 3/4
+\time 6/8
+\time 4/4
@end example
@c A clef here may lead to confusion, remove it.
@lilypond[fragment,quote]
- \override Staff.Clef #'transparent = ##t
- \time 3/4
- s4_" "
- \time 6/8
- s4_" "
- \time 4/4
- s16_" "
+\override Staff.Clef #'transparent = ##t
+\time 3/4
+s4_" "
+\time 6/8
+s4_" "
+\time 4/4
+s16_" "
@end lilypond
The @rglos{clef} can be set using the @code{\clef} command
@example
- \clef treble
- \clef bass
- \clef alto
- \clef tenor
+\clef treble
+\clef bass
+\clef alto
+\clef tenor
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- \clef treble
- s4_" "
- \clef bass
- s4_" "
- \clef alto
- s4_" "
- \clef tenor
- s16_" "
+\set Score.timing = ##f
+\clef treble
+s4_" "
+\clef bass
+s4_" "
+\clef alto
+s4_" "
+\clef tenor
+s16_" "
@end lilypond
@code{@{@tie{}@dots{}@tie{}@}} to convert it to printable output.
@lilypond[fragment,quote,noindent,linewidth=55\staffspace]
- \time 3/4
- \clef bass
- c2 e4 g2.
- f4 e d c2 r4
+\time 3/4
+\clef bass
+c2 e4 g2.
+f4 e d c2 r4
@end lilypond
For more elaborate information on
input and save the file as @file{test.ly}
@example
- @{ c'4 e' g' @}
+@{ c'4 e' g' @}
@end example
@noindent
You will see something resembling
@example
-lilypond (GNU LilyPond) 2.2.0
-Running lilypond...
-Now processing `/home/fred/ly/test.ly'
+lilypond test.ly
+GNU LilyPond 2.5.0
+Processing `test.ly'
Parsing...
-Interpreting music...[1]
-@emph{... more interesting stuff ... }
-DVI output to `test.dvi'...
-PDF output to `test.pdf'...
-PS output to `test.ps'...
+Interpreting music... [1]
+Preprocessing graphical objects...
+Calculating line breaks... [2]
+Layout output to `test.tex'...
+Converting to `test.dvi'...
+Converting to `test.ps'...
+Converting to `test.pdf'...
@end example
@cindex DVI file
} which you can print or with the standard facilities of your
operating system.@footnote{If your system does not have any tools
installed, you can try
-@uref{http://www.cs.wisc.edu/~ghost/,Ghostscript}, a freely available
-package for viewing and printing PDF and PostScript files.}
+@uref{http://@/www@/.cs@/.wisc@/.edu/@/~ghost/,Ghostscript}, a freely
+available package for viewing and printing PDF and PostScript files.}
On Windows, start up a text-editor@footnote{Any simple or
programmer-oriented editor will do, for example Notepad. Do not use a
LilyPond.} and enter
@example
- @{ c'4 e' g' @}
+@{ c'4 e' g' @}
@end example
Save it on the desktop as @file{test.ly} and make sure that it is not
like German and Dutch.}
@example
- cis1 ees fisis aeses
+cis1 ees fisis aeses
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- \transpose c c' { cis1 ees fisis aeses s16_" " }
+\set Score.timing = ##f
+\transpose c c' { cis1 ees fisis aeses s16_" " }
@end lilypond
@cindex key signature, setting
a pitch and @code{\major} or @code{\minor}
@example
- \key d \major
- g1
- \key c \minor
- g
+\key d \major
+g1
+\key c \minor
+g
@end example
@lilypond[fragment,quote,notime,fragment]
- \key d \major
- g'1
- \key c \minor
- g'
+\key d \major
+g'1
+\key c \minor
+g'
@end lilypond
@noindent
In this example
@lilypond[quote,notime,fragment]
- \key d \major
- d' cis' fis'
+\key d \major
+d' cis' fis'
@end lilypond
@noindent
no note has an explicit accidental, but you still must enter
@example
- \key d \major
- d cis fis
+\key d \major
+d cis fis
@end example
@noindent
of A-flat major, it does get an accidental
@lilypond[quote,notime,fragment,relative=1,verbatim]
- \key as \major
- d
+\key as \major
+d
@end lilypond
Adding all alterations explicitly might require a little more effort
being tied
@lilypond[quote,notime,fragment,verbatim,relative=3]
- g4~ g a2~ a4
+g4~ g a2~ a4
@end lilypond
For more information on Ties see @ref{Ties}.
Beams are drawn automatically
@lilypond[quote,fragment,relative=2,verbatim]
- a8 ais d es r d
+a8 ais d es r d
@end lilypond
@noindent
with @samp{]}.
@lilypond[quote,fragment,relative=2,verbatim]
- a8[ ais] d[ es r d]
+a8[ ais] d[ es r d]
@end lilypond
For more information on beams, see @ref{Beaming}.
An example of the use of quotes is in the following Mozart fragment
@lilypond[quote,raggedright,fragment,verbatim]
- \key a \major
- \time 6/8
- cis''8. d''16 cis''8 e''4 e''8
- b'8. cis''16 b'8 d''4 d''8
+\key a \major
+\time 6/8
+cis''8. d''16 cis''8 e''4 e''8
+b'8. cis''16 b'8 d''4 d''8
@end lilypond
@noindent
a single note is a music expression
@lilypond[fragment,quote,verbatim,relative=3]
- a4
+a4
@end lilypond
Enclosing group of notes in braces creates a new music
expression
@lilypond[fragment,quote,verbatim,relative=3]
- { a4 g4 }
+{ a4 g4 }
@end lilypond
Putting a bunch of music expressions (notes) in braces, means that
notes
@lilypond[fragment,quote,verbatim,relative=3]
- { { a4 g } f g }
+{ { a4 g } f g }
@end lilypond
This technique is useful for non-monophonic music. To enter music
single character
@lilypond[fragment,quote,verbatim,relative=2]
- c-. c-- c-> c-^ c-+ c-_
+c-. c-- c-> c-^ c-+ c-_
@end lilypond
@cindex fingering
(@samp{-}) and the digit to be printed
@lilypond[fragment,quote,verbatim,relative=2]
- c-3 e-5 b-2 a-1
+c-3 e-5 b-2 a-1
@end lilypond
Articulations and fingerings are usually placed automatically, but you
best to let LilyPond determine the articulation directions.
@lilypond[fragment,quote,verbatim,relative=2]
- c_-^1 d^. f^4_2-> e^-_+
+c_-^1 d^. f^4_2-> e^-_+
@end lilypond
Dynamic signs are made by adding the markings (with a backslash) to
the note
@lilypond[fragment,quote,verbatim,relative=2]
- c\ff c\mf
+c\ff c\mf
@end lilypond
@cindex dynamics
crescendo, or the command @code{\!} can be used
@lilypond[fragment,quote,verbatim,relative=2]
- c2\< c2\ff\> c2 c2\!
+c2\< c2\ff\> c2 c2\!
@end lilypond
@samp{(} and @samp{)}, respectively
@lilypond[fragment,quote,fragment,relative=2,verbatim]
- d4( c16) cis( d e c cis d) e( d4)
+d4( c16) cis( d e c cis d) e( d4)
@end lilypond
@cindex slurs versus ties
nested
@lilypond[quote,fragment,relative=2]
- c2~( c8 fis fis4 ~ fis2 g2)
+c2~( c8 fis fis4 ~ fis2 g2)
@end lilypond
@cindex phrasing slurs
same time.
@lilypond[quote,fragment,relative=2,verbatim]
- a8(\( ais b c) cis2 b'2 a4 cis, c\)
+a8(\( ais b c) cis2 b'2 a4 cis, c\)
@end lilypond
Angle brackets are the symbols @samp{<} and @samp{>}.
@lilypond[quote,relative=1,fragment,verbatim]
- r4 <c e g>4 <c f a>8
+r4 <c e g>4 <c f a>8
@end lilypond
be placed outside the angled brackets
@lilypond[quote,relative=1,fragment,verbatim]
- r4 <c e g>8[ <c f a>]~ <c f a>
+r4 <c e g>8[ <c f a>]~ <c f a>
@end lilypond
@example
- r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
@end example
@lilypond[quote,relative=1,fragment]
- \slurUp
- r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+\slurUp
+r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
@end lilypond
and @code{\partial 8} an eighth note
@lilypond[quote,relative=2,verbatim,fragment]
- \partial 8
- f8 c2 d e
+\partial 8
+f8 c2 d e
@end lilypond
@cindex tuplets
2/3 of their notated duration, so a triplet has 2/3 as its fraction
@lilypond[quote,relative=1,verbatim,fragment]
- \times 2/3 { f8 g a }
- \times 2/3 { c r c }
+\times 2/3 { f8 g a }
+\times 2/3 { c r c }
@end lilypond
@cindex grace notes
@cindex acciaccatura
@lilypond[quote,relative=2,verbatim,fragment]
- c4 \appoggiatura b16 c4
- c4 \acciaccatura b16 c4
+c4 \appoggiatura b16 c4
+c4 \acciaccatura b16 c4
@end lilypond
@noindent
To mark a file for version 2.4.0, use
@example
- \version "2.4.0"
+\version "2.4.0"
@end example
@noindent
Such chords can be entered like notes,
@lilypond[quote,verbatim,raggedright]
- \chordmode { c2 f4. g8 }
+\chordmode { c2 f4. g8 }
@end lilypond
@noindent
following example shows a few common modifiers
@lilypond[quote,verbatim,raggedright]
- \chordmode { c2 f4:m g4:maj7 gis1:dim7 }
+\chordmode { c2 f4:m g4:maj7 gis1:dim7 }
@end lilypond
For lead sheets, chords are not printed on staves, but as names on a
following result.
@lilypond[quote,verbatim,raggedright]
- \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
+\chords { c2 f4.:m g4.:maj7 gis8:dim7 }
@end lilypond
@cindex lead sheet
@code{PianoStaff}
@example
- \new PianoStaff << \new Staff @dots{} >>
+\new PianoStaff << \new Staff @dots{} >>
@end example
Here is a small example
up complex music expressions. An identifier is assigned as follows
@example
- namedMusic = @{ @dots{} @}
+namedMusic = @{ @dots{} @}
@end example
@noindent
input. For example,
@example
- width = 4.5\cm
- name = "Wendy"
- aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+width = 4.5\cm
+name = "Wendy"
+aFivePaper = \paper @{ paperheight = 21.0 \cm @}
@end example
Depending on its contents, the identifier can be used in different
places. The following example uses the above variables
@example
- \paper @{
- \aFivePaper
- linewidth = \width
- @}
- @{ c4^\name @}
+\paper @{
+ \aFivePaper
+ linewidth = \width
+@}
+@{ c4^\name @}
@end example
More information on the possible uses of identifiers is in the
It is convenient to define the notes in a special file. For example,
suppose that the file @file{horn-music.ly} contains the following part
-of a horn/bassoon duo
+of a horn/@/bassoon duo
@example
hornNotes = \relative c @{
in the following output
@lilypond[quote,raggedright]
- \transpose f c' \relative c {
- \time 2/4
- r4 f8 a cis4 f e d
- }
+\transpose f c' \relative c {
+ \time 2/4
+ r4 f8 a cis4 f e d
+}
@end lilypond
In ensemble pieces, one of the voices often does not play for many
takes 3@tie{}measures in 2/4 time
@example
- R2*3
+R2*3
@end example
When printing the part, multi-rests
must be condensed. This is done by setting a run-time variable
@example
- \set Score.skipBars = ##t
+\set Score.skipBars = ##t
@end example
@noindent
leading to
@lilypond[quote,raggedright]
- \relative c <<
- \new Staff {
- \time 2/4 R2*3
- r4 f8 a cis4 f e d
- }
- \new Staff {
- \clef bass
- r4 d,8 f | gis4 c | b bes |
- a8 e f4 | g d | gis f
- }
- >>
+\relative c <<
+ \new Staff {
+ \time 2/4 R2*3
+ r4 f8 a cis4 f e d
+ }
+ \new Staff {
+ \clef bass
+ r4 d,8 f | gis4 c | b bes |
+ a8 e f4 | g d | gis f
+ }
+>>
@end lilypond
More in-depth information on preparing parts and scores can be found
ln -s $(abs-srcdir)/scm
cd $(builddir)/share/lilypond/tex && \
ln -s $(abs-srcdir)/tex source && \
- ln -s ../../../mf/$(outconfbase) generate
+ ln -s ../../../tex/$(outconfbase) tex-out && \
+ ln -s ../../../mf/$(outconfbase) mf-out
cd $(builddir)/share/lilypond/fonts && \
ln -s $(abs-srcdir)/mf source && \
ln -s ../../../mf/$(outconfbase) afm && \
cpppath = []
if env.has_key ('CPPPATH'):
cpppath = env['CPPPATH']
+
+ ## FIXME: linkage, check for libguile.h and scm_boot_guile
#this could happen after flower...
env.ParseConfig ('guile-config compile')
('mf', 'share/lilypond/fonts/tfm'),
('mf', 'share/lilypond/fonts/type1'),
('#tex', 'share/lilypond/tex/source'),
- ('mf', 'share/lilypond/tex/generate'),
+ ('tex', 'share/lilypond/tex/tex-out'),
+ ('mf', 'share/lilypond/tex/mf-out'),
('#ly', 'share/lilypond/ly'),
('#scm', 'share/lilypond/scm'),
('#ps', 'share/lilypond/ps'),
Heikki Junes
Hendrik Maryns
Kristof Bastiaensen
+Lisa Opus Goldstein
Mats Bengtsson
Michael Welsh Duggan
Peter Lutek
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=4
-PATCH_LEVEL=0
+PATCH_LEVEL=1
MY_PATCH_LEVEL=
#!@PYTHON@
-# mf-to-table.py -- convert spacing info in MF logs .afm and .tex
-#
+# mf-to-table.py -- convert spacing info in MF logs .afm and .tex
+#
# source file of the GNU LilyPond music typesetter
-#
+#
# (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
import os
def read_log_file (fn):
str = open (fn).read ()
- str = re.sub ('\n', '', str)
- str = re.sub ('[\t ]+', ' ', str)
+ str = re.sub ('\n', '', str)
+ str = re.sub ('[\t ]+', ' ', str)
deps = []
autolines = []
return (autolines, deps)
-
class Char_metric:
def __init__ (self):
pass
def tfm_checksum (fn):
- sys.stderr.write ("Reading checksum from `%s'\n" % fn)
+ sys.stderr.write ("Reading checksum from `%s'\n" % fn)
s = open (fn).read ()
s = s[ 12 * 2 : ]
cs_bytes = s[:4]
return cs
+
## ugh. What's font_family supposed to be? It's not an afm thing.
font_family = 'feta'
+
def parse_logfile (fn):
(autolines, deps) = read_log_file (fn)
charmetrics = []
group = ''
for l in autolines:
- tags = string.split(l, '@:')
+ tags = string.split (l, '@:')
if tags[0] == 'group':
group = tags[1]
elif tags[0] == 'puorg':
if group:
name = group + '-' + name
m = {
- 'description': tags[1],
- 'name': name,
+ 'description': tags[1],
+ 'name': name,
'tex': tags[10],
'code': string.atoi (tags[2]),
- 'breapth':string.atof (tags[3]),
+ 'breapth': string.atof (tags[3]),
'width': string.atof (tags[4]),
- 'depth':string.atof (tags[5]),
- 'height':string.atof (tags[6]),
+ 'depth': string.atof (tags[5]),
+ 'height': string.atof (tags[6]),
'wx': string.atof (tags[7]),
- 'wy':string.atof (tags[8]),
- }
+ 'wy': string.atof (tags[8]),
+ }
charmetrics.append (m)
elif tags[0] == 'font':
global font_family
# To omit 'GNU' (foundry) from font name proper:
# name = tags[2:]
#urg
- if 0: #testing
+ if 0: # testing
tags.append ('Regular')
-
encoding = re.sub (' ','-', tags[5])
tags = tags[:-1]
name = tags[1:]
'-')
if 1:
global_info['Weight'] = tags[4]
- else: #testing
+ else: # testing
global_info['Weight'] = tags[-1]
-
+
global_info['FontBBox'] = '0 0 1000 1000'
global_info['Ascender'] = '0'
global_info['Descender'] = '0'
global_info['EncodingScheme'] = encoding
-
- return (global_info, charmetrics, deps)
+ return (global_info, charmetrics, deps)
-def write_afm_char_metric(file, charmetric):
+def write_afm_char_metric (file, charmetric):
f = 1000;
tup = (charmetric['code'],
- charmetric['name'],
- -charmetric['breapth'] *f,
- -charmetric['depth']*f,
- charmetric['width']*f,
- charmetric['height']*f,
+ charmetric['name'],
+ -charmetric['breapth'] * f,
+ -charmetric['depth'] * f,
+ charmetric['width'] * f,
+ charmetric['height'] * f,
charmetric['wx'] * f,
charmetric['wy'] * f)
-
+
file.write ('C %d ; N %s ; B %d %d %d %d ; W %d %d ;\n'% tup)
+
def write_afm_header (file):
file.write ("StartFontMetrics 2.0\n")
file.write ("Comment Automatically generated by mf-to-table.py\n")
+
def write_afm_metric (file, global_info, charmetrics):
- for (k,v) in global_info.items():
- file.write ("%s %s\n" % (k,v))
+ for (k, v) in global_info.items():
+ file.write ("%s %s\n" % (k, v))
file.write ('StartCharMetrics %d\n' % len(charmetrics ))
for m in charmetrics:
- write_afm_char_metric (file,m)
+ write_afm_char_metric (file, m)
file.write ('EndCharMetrics\n')
file.write ('EndFontMetrics\n')
def write_tex_defs (file, global_info, charmetrics):
- ##nm = global_info['FontFamily']
+ ## nm = global_info['FontFamily']
nm = font_family
for m in charmetrics:
- file.write (r'''\gdef\%s%s{\char%d}%%%s''' % (nm, m['tex'], m['code'],'\n'))
+ file.write (r'''\gdef\%s%s{\char%d}%%%s''' % \
+ (nm, m['tex'], m['code'],'\n'))
file.write ('\\endinput\n')
+
def write_ps_encoding (name, file, global_info, charmetrics):
encs = ['.notdef'] * 256
for m in charmetrics:
encs[m['code']] = m['tex']
file.write ('/%s [\n' % name)
- for m in range(0,256):
+ for m in range (0, 256):
file.write (' /%s %% %d\n' % (encs[m], m))
file.write ('] def\n')
-
+
+
def write_fontlist (file, global_info, charmetrics):
- ##nm = global_info['FontFamily']
+ ## nm = global_info['FontFamily']
nm = font_family
- per_line = 3
- file.write (r"""
-%% LilyPond file to list all font symbols and the corresponding names
+ per_line = 2
+ file.write (
+r"""%% LilyPond file to list all font symbols and the corresponding names
%% Automatically generated by mf-to-table.py
-\score { \lyrics { \time %d/8
-""" % (2*per_line+1))
+
+\score {
+ \lyrics { \time %d/8
+""" % (2 * per_line + 1))
count = 0
for m in charmetrics:
-
count += 1
-
-## \musicglyph and \markup require "_" to be escaped differently:
-
- scm_string = re.sub('_', r'_', m['name'])
+ ## \musicglyph and \markup require "_" to be escaped
+ ## differently
+ scm_string = re.sub ('_', r'_', m['name'])
tex_string = re.sub ('_', r'\\_' , m['name'])
-
-## prevent TeX from interpreting "--" as long dash:
- tex_string=re.sub('--','-{}-', tex_string)
- file.write (' \\markup { \\raise #0.75 \\vcenter \\musicglyph #"%s" \\typewriter " %s" } 4 \n' % (scm_string, tex_string))
+ ## prevent TeX from interpreting "--" as long dash
+ tex_string = re.sub ('--','-{}-', tex_string)
- if (count % 3) ==0:
- file.write ('\skip 8 \\break\n')
- file.write (r"""
-}
- \layout{
+ file.write (''' \\markup { \\raise #0.75 \\vcenter
+ \\musicglyph #"%s"
+ \\typewriter " %s" } 4\n''' % (scm_string, tex_string))
+
+ if (count % per_line) == 0:
+ file.write (' \\skip 8 \\break\n')
+ file.write (r""" }
+
+ \layout {
interscoreline = 1.0
indent = 0.0 \cm
\context {
minimumVerticalExtent = ##f
}
\context {
- \Score
- \remove "Bar_number_engraver"
- }
- }
- }
+ \Score
+ \remove "Bar_number_engraver"
+ }
+ }
+}
""")
+
def write_deps (file, deps, targets):
-
-
for t in targets:
t = re.sub ( '^\\./', '', t)
file.write ('%s '% t)
file.write ('%s ' % d)
file.write ('\n')
-def help():
- sys.stdout.write(r"""Usage: mf-to-table [OPTIONS] LOGFILEs
+
+def help ():
+ sys.stdout.write(r"""Usage: mf-to-table [OPTIONS] LOGFILEs
+
Generate feta metrics table from preparated feta log.
Options:
-p, --package=DIR specify package
-t, --tex=FILE name output tex chardefs
- """
-)
- sys.exit (0)
-
+ """)
+ sys.exit (0)
-(options, files) = getopt.getopt(
- sys.argv[1:], 'a:d:hl:o:p:t:',
- ['enc=', 'afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
-
+(options, files) = \
+ getopt.getopt (sys.argv[1:],
+ 'a:d:hl:o:p:t:',
+ ['enc=', 'afm=', 'outdir=', 'dep=',
+ 'tex=', 'ly=', 'debug', 'help', 'package='])
enc_nm = ''
texfile_nm = ''
afm.write ("Comment DesignSize %.2f\n" % g['DesignSize'])
del g['DesignSize']
-
+
write_afm_metric (afm, g, m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
enc_name = 'FetaEncoding'
- if re.search ('parmesan', filenm) :
+ if re.search ('parmesan', filenm):
enc_name = 'ParmesanEncoding'
- elif re.search ('feta-brace', filenm) :
+ elif re.search ('feta-brace', filenm):
enc_name = 'FetaBraceEncoding'
write_ps_encoding (enc_name, open (enc_nm, 'w'), g, m)
texfile_nm, afmfile_nm])
if lyfile_nm:
write_fontlist (open (lyfile_nm, 'w'), g, m)
-
-
-
STEPMAKE_LOCALE
STEPMAKE_GETTEXT
STEPMAKE_MSGFMT(REQUIRED)
-STEPMAKE_TEXMF
+STEPMAKE_TEXMF(REQUIRED)
STEPMAKE_TEXMF_DIRS
STEPMAKE_GUILE_DEVEL(REQUIRED, 1.6)
STEPMAKE_KPATHSEA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([gettext isinf memmem snprintf vsnprintf gettext])
+AC_MSG_CHECKING([for ec-fonts-mftraced])
+ecb10=`kpsewhich ecb10.pfa 2>/dev/null`
+if test -n "$ecb10"; then
+ AC_MSG_RESULT([$ecb10])
+else
+ AC_MSG_RESULT(no)
+ STEPMAKE_ADD_ENTRY(REQUIRED, 'package ec-fonts-mftraced')
+fi
+
# This is developer only anyway, help pkgconfig a bit
export PKG_CONFIG_PATH
\clef treble
\new Voice {
\slurDown
- c=''4( d, c') s4
- }
- \new Voice \relative c'' {
- \slurDown f2( d4 f | g c a f | d c f2 | f1) |
+ c=''4(^"slurs forced down" d, c') s4
+ f=''2( d4 f | g c a f | d c f2 | f1) |
}
% \override Slur #'excentricity = #-2
/* Flex >= 2.5.29 fix; FlexLexer.h's multiple include bracing breaks
when building the actual lexer. */
+
#define LEXER_CC
#include <iostream>
+
using namespace std;
+
#include "music-function.hh"
#include "source-file.hh"
#include "parse-scm.hh"
Sources sources;
sources.set_path (&global_path);
- progress_indication (_f ("Now processing `%s'", file_name.to_str0 ()));
+ progress_indication (_f ("Processing `%s'", file_name.to_str0 ()));
progress_indication ("\n");
Lily_parser *parser = new Lily_parser (&sources);
static Long_option_init options_static[] =
{
{_i ("EXPR"), "evaluate", 'e',
- _i ("set options, use -e '(ly:option-usage)' for help")},
+ _i ("set option, use -e '(ly:option-usage)' for help")},
/* Bug in option parser: --output=foe is taken as an abbreviation
for --output-format. */
{_i ("EXT"), "format", 'f', _i ("select back-end to use")},
{
fputs ("\n", out);
fprintf (out, "LILYPOND_DATADIR=\"%s\"\n", LILYPOND_DATADIR);
- fprintf (out, "LOCAL_LILYPOND_DATADIR=\%s\"\n", LOCAL_LILYPOND_DATADIR);
+ fprintf (out, "LOCAL_LILYPOND_DATADIR=\"\%s\"\n", LOCAL_LILYPOND_DATADIR);
fprintf (out, "LOCALEDIR=\"%s\"\n", LOCALEDIR);
char *lilypond_prefix = getenv ("LILYPONDPREFIX");
identify (FILE *out)
{
fputs (gnu_lilypond_version_string ().to_str0 (), out);
+ fputs ("\n", out);
}
static void
notice ()
{
identify (stdout);
- printf ("\n");
printf (_f (NOTICE, PROGRAM_NAME).to_str0 ());
printf ("\n");
copyright ();
usage ()
{
/* No version number or newline here. It confuses help2man. */
- printf (_f ("Usage: %s [OPTIONS]... FILE...", PROGRAM_NAME).to_str0 ());
+ printf (_f ("Usage: %s [OPTION]... FILE...", PROGRAM_NAME).to_str0 ());
printf ("\n\n");
printf (_ ("Typeset music and/or produce MIDI from FILE.").to_str0 ());
printf ("\n\n");
ly_c_init_guile ();
call_constructors ();
- progress_indication ("\n");
determine_output_options ();
all_fonts_global = new All_font_metrics (global_path.to_string ());
if (help_b)
{
+ identify (stdout);
usage ();
if (verbose_global_b)
dir_info (stdout);
int
main (int argc, char **argv)
{
- setup_localisation ();
+ setup_localisation ();
setup_paths ();
parse_argv (argc, argv);
+ identify (stderr);
initialize_kpathsea (argv[0]);
scm_boot_guile (argc, argv, main_with_guile, 0);
{make_ps, "convert-to-ps"},
{make_pdf, "convert-to-pdf"},
{make_png, "convert-to-png"},
- {0,0}
+ {0, 0},
};
- for (int i= 0; settings[i].func_name_; i++)
+ for (int i = 0; settings[i].func_name_; i++)
{
if (settings[i].do_it_)
{
{
func = scm_variable_ref (func);
if (ly_c_procedure_p (func))
- scm_call_2 (func, self_scm(), file_name);
+ scm_call_2 (func, self_scm (), file_name);
}
}
}
post_processing (mod, scm_makfrom0str (file_name.to_str0 ()));
}
-
- progress_indication ("\n");
}
+ progress_indication ("\n");
}
void
{
progress_indication (_f ("Layout output to `%s'...",
outname == "-" ? String ("<stdout>") : outname));
+ progress_indication ("\n");
return new Paper_outputter (outname, f);
}
midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
output_header_track (midi_stream);
progress_indication ("\n");
- progress_indication (_ ("Track ... "));
+ progress_indication (_ ("Track...") + " ");
int channel = 0;
- for (int i =0; i < audio_staffs_.size (); i++)
+ for (int i = 0; i < audio_staffs_.size (); i++)
{
Audio_staff *s = audio_staffs_[i];
if (verbose_global_b)
Moment vector_moment (int idx) const;
Moment start_moment_;
+ Moment stop_moment_;
SCM event_vector_;
int event_idx_;
int end_idx_ ;
set_translator (get_outlet ()->get_default_interpreter ());
Moment now = get_outlet ()->now_mom ();
- Moment stop = now + unsmob_duration (dur)->get_length ();
+
start_moment_ = now;
+ stop_moment_ = now + unsmob_duration (dur)->get_length ();
event_vector_ = get_music ()->get_property ("quoted-events");
if (ly_c_vector_p (event_vector_))
{
event_idx_ = binsearch_scm_vector (event_vector_, now.smobbed_copy (), &moment_less);
- end_idx_ = binsearch_scm_vector (event_vector_, stop.smobbed_copy (), &moment_less);
+ end_idx_ = binsearch_scm_vector (event_vector_, stop_moment_.smobbed_copy (), &moment_less);
}
else
{
bool
Quote_iterator::ok () const
{
- return ly_c_vector_p (event_vector_) && (event_idx_ <= end_idx_);
+ return
+ ly_c_vector_p (event_vector_)
+ && (event_idx_ <= end_idx_)
+ && vector_moment (event_idx_).main_part_ < stop_moment_.main_part_;
}
Moment
event_idx_++;
}
- if (event_idx_ <= end_idx_)
+ if (event_idx_ <= end_idx_
+ && vector_moment (event_idx_).main_part_ < stop_moment_.main_part_;
+ )
{
SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
Pitch * quote_pitch = unsmob_pitch (scm_cdar (entry));
mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name ()));
}
}
+ event_idx_ ++;
}
- event_idx_ ++;
}
IMPLEMENT_CTOR_CALLBACK (Quote_iterator);
(if (ly:get-option 'verbose)
" "
- " 2>&1 1>& /dev/null ")
- )))
+ " 2>&1 1>& /dev/null "))))
(if (ly:get-option 'verbose)
(begin
(newline (current-error-port))
-
- (display (format #f (_ "Invoking ~S") cmd) (current-error-port))
+ (format (current-error-port) (_ "Invoking ~S") cmd)
(newline (current-error-port)))
- (display (format #f "Converting to `~a.ps'...\n" base) (current-error-port))
- )
+ (begin
+ (format (current-error-port) (_ "Converting to `~a.ps'...") base)
+ (newline (current-error-port))))
(system cmd)))
(define-public (convert-to-dvi book name)
"latex \\\\nonstopmode \\\\input " name
(if (ly:get-option 'verbose)
" "
- " 2>&1 1>& /dev/null ")
-
- )))
+ " 2>&1 1>& /dev/null "))))
(setenv "extra_mem_top" (number->string (max curr-extra-mem 1024000)))
(if (ly:get-option 'verbose)
(begin
(newline (current-error-port))
- (display (format #f (_ "Invoking ~S") cmd) (current-error-port))
+ (format (current-error-port) (_ "Invoking ~S") cmd)
(newline (current-error-port)))
- (format (current-error-port) "Converting to `~a.dvi'...\n" base))
+ (begin
+ (format (current-error-port) (_ "Converting to `~a.dvi'...") base)
+ (newline (current-error-port))))
;; fixme: set in environment?
(if (ly:get-option 'safe)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (ly:system command)
- (let*
- ((status 0))
-
+ (let* ((status 0))
(if (ly:get-option 'verbose)
- (display (format (_ "Invoking `~a'...\n") command) (current-error-port)))
-
+ (format (current-error-port) (_ "Invoking `~a'...\n") command))
(set! status (system command))
-
-
(if (> status 0)
- (display (format (_ "Error invoking `~a'. Return value ~a")
- command status)))
- ))
+ (format (current-error-port) (_ "Error invoking `~a'. Return value ~a")
+ command status))))
(define-public (postscript->pdf papersizename name)
(let* ((cmd (string-append "ps2pdf -sPAPERSIZE=" papersizename " " name))
(output-name
(regexp-substitute/global #f "\\.ps" name 'pre ".pdf" 'post)))
-
- (newline (current-error-port))
- (display (format (_ "Converting to `~a'...") output-name)
- (current-error-port))
-
+ (format (current-error-port) (_ "Converting to `~a'...") output-name)
(ly:system cmd)))
(define-public (postscript->png resolution name)
LINEWIDTH = 'linewidth'
NOFRAGMENT = 'nofragment'
NOINDENT = 'noindent'
+NOQUOTE = 'noquote'
NOTES = 'body'
NOTIME = 'notime'
OUTPUT = 'output'
TEXINFO = 'texinfo'
VERBATIM = 'verbatim'
-# NOTIME has no opposite so it isn't part of this dictionary
+# NOTIME has no opposite so it isn't part of this dictionary.
+# NOQUOTE is used internally only.
no_options = {
NOFRAGMENT: FRAGMENT,
NOINDENT: INDENT,
%(str)s
</blockquote>
''',
+
VERBATIM: r'''<pre>
%(verb)s</pre>''',
},
##
LATEX: {
- AFTER: '',
-
- BEFORE: '',
-
OUTPUT: r'''{%%
\parindent 0pt
\catcode`\@=12
%(code)s
@lilypond''',
- AFTER: '',
-
- BEFORE: '',
-
OUTPUT: r'''@noindent
@image{%(base)s,,,[image of music],%(ext)s}''',
''',
QUOTE: r'''@quotation
-%(str)s
-@end quotation
+%(str)s@end quotation
+''',
+
+ NOQUOTE: r'''@format
+%(str)s@end format
''',
- # FIXME: @exampleindent 5 is the default...
VERBATIM: r'''@exampleindent 0
@example
%(verb)s@end example
-@exampleindent 5
''',
},
}
# defaults
relative = 1
override = {}
- # FIXME: Where to get sane value for exampleindent?
- # In texinfo.tex, its maximum value is 0.4in, so we use that.
+ # The concept of the `exampleindent' option is broken. It is not
+ # possible to get a sane value for @exampleindent at all without
+ # processing the document itself. Saying
+ #
+ # @exampleindent 0
+ # @example
+ # ...
+ # @end example
+ # @exampleindent 5
+ #
+ # causes ugly results with the DVI backend of texinfo since the
+ # default value for @exampleindent isn't 5em but 0.4in (or a smaller
+ # value). Executing the above code changes the environment
+ # indentation to an unknown value because we don't know the amount
+ # of 1em in advance since it is font-dependent. Modifying
+ # @exampleindent in the middle of a document is simply not
+ # supported within texinfo.
+ #
+ # To set @exampleindent locally to zero, we use the @format
+ # environment for non-quoted snippets.
override[EXAMPLEINDENT] = r'0.4\in'
- override[LINEWIDTH] = None
+ override[LINEWIDTH] = texinfo_linewidths['@smallbook']
override.update (default_ly_options)
option_list = []
def output_info (self):
str = self.output_print_filename (HTML)
- str = output[TEXINFO][BEFORE] % vars ()
for image in self.get_images ():
(base, ext) = os.path.splitext (image)
- # URG, makeinfo implicitely prepends dot to ext
+ # URG, makeinfo implicitly prepends dot to ext
# specifying no extension is most robust
ext = ''
str += output[TEXINFO][OUTPUT] % vars ()
- str += output[TEXINFO][AFTER] % vars ()
return str
def output_latex (self):
if QUOTE in self.options:
str = output[LATEX][QUOTE] % vars ()
- str += (output[LATEX][BEFORE]
- + (output[LATEX][OUTPUT] % vars ())
- + output[LATEX][AFTER])
+ str += (output[LATEX][OUTPUT] % vars ())
return str
def output_print_filename (self,format):
if VERBATIM in self.options:
verb = verbatim_texinfo (self.substring ('code'))
str += (output[TEXINFO][VERBATIM] % vars ())
+ if not QUOTE in self.options:
+ str = output[TEXINFO][NOQUOTE] % vars()
str += ('@ifinfo\n' + self.output_info () + '\n@end ifinfo\n')
str += ('@tex\n' + self.output_latex () + '\n@end tex\n')
global re;re = ly.re
# lilylib globals
-program_name = sys.argv[0]
+program_name = os.path.split (sys.argv[0])[1]
program_version = '@TOPLEVEL_VERSION@'
# input without \book, use classic latex definitions
classic_p = 0
GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
changequote([, ])dnl
STEPMAKE_GUILE_FLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
+ LIBS="$GUILE_LDFLAGS $LIBS"
+ AC_CHECK_HEADERS([libguile.h])
+ AC_CHECK_LIB(guile, scm_boot_guile)
+ AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
+ if test "$libguile_b" = "no"; then
+ warn='libguile (libguile-dev, guile-devel or guile-dev
+ package).'
+ STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
AC_DEFUN(STEPMAKE_TEXMF, [
# urg, never know what names these teTeX guys will think up
- STEPMAKE_PROGS(METAFONT, mf mfont, $1)
+ STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
STEPMAKE_PROGS(INIMETAFONT, inimf inimfont, $1)
AC_MSG_CHECKING(for working metafont mode)
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2004-02-25.17}
+\def\texinfoversion{2004-10-31.06}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
% restriction. (This has been our intent since Texinfo was invented.)
-%
+%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
% It is possible to adapt texinfo.tex for other languages, to some
% extent. You can get the existing language-specific files from the
% full Texinfo distribution.
-%
+%
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
% Hyphenation fixes.
\hyphenation{
- Flor-i-da Ghost-script Ghost-view Mac-OS ap-pen-dix bit-map bit-maps
+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+ ap-pen-dix bit-map bit-maps
data-base data-bases eshell fall-ing half-way long-est man-u-script
man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
- par-a-digms rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ spell-ing spell-ings
stand-alone strong-est time-stamp time-stamps which-ever white-space
wide-spread wrap-around
}
\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
% \parseargdef\foo{...}
-% is roughly equivalent to
+% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
%
\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
% Define the framework for environments in texinfo.tex. It's used like this:
-%
+%
% \envdef\foo{...}
% \def\Efoo{...}
-%
+%
% It's the responsibility of \envdef to insert \begingroup before the
% actual body; @end closes the group after calling \Efoo. \envdef also
% defines \thisenv, so the current environment is known; @end checks
% whether the environment name matches. The \checkenv macro can also be
% used to check whether the current environment is the one expected.
-%
+%
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
% are not treated as enviroments; they don't open a group. (The
% implementation of @end takes care not to call \endgroup in this
% The \TeX{} logo, as in plain, but resetting the spacing so that a
% period following counts as ending a sentence. (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=3000 }
+%
+\edef\TeX{\TeX \spacefactor=1000 }
% @LaTeX{} logo. Not quite the same results as the definition in
% latex.ltx, since we use a different font for the raised A; it's most
% convenient for us to use an explicitly smaller font, rather than using
% the \scriptstyle font (since we don't reset \scriptstyle and
% \scriptscriptstyle).
-%
+%
\def\LaTeX{%
L\kern-.36em
{\setbox0=\hbox{T}%
% @comma{} is so commas can be inserted into text without messing up
% Texinfo's parsing.
-%
+%
\let\comma = ,
% @refill is a no-op.
\newif\ifpdf
\newif\ifpdfmakepagedest
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
\ifx\pdfoutput\undefined
- \pdffalse
- \let\pdfmkdest = \gobble
- \let\pdfurl = \gobble
- \let\endlink = \relax
- \let\linkcolor = \relax
- \let\pdfmakeoutlines = \relax
\else
- \pdftrue
- \pdfoutput = 1
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+%
+\ifpdf
\input pdfcolor
\pdfcatalog{/PageMode /UseOutlines}%
\def\dopdfimage#1#2#3{%
% of subentries (or empty, for subsubsections). #3 is the node
% text, which might be empty if this toc entry had no
% corresponding node. #4 is the page number.
- %
+ %
\def\dopdfoutline#1#2#3#4{%
% Generate a link to the node text if that exists; else, use the
% page number. We could generate a destination for the section
%
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\numchapentry##1##2##3##4{%
- \def\thischapnum{##2}%
- \let\thissecnum\empty
- \let\thissubsecnum\empty
+ \def\thischapnum{##2}%
+ \let\thissecnum\empty
+ \let\thissubsecnum\empty
}%
\def\numsecentry##1##2##3##4{%
- \advancenumber{chap\thischapnum}%
- \def\thissecnum{##2}%
- \let\thissubsecnum\empty
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \let\thissubsecnum\empty
}%
\def\numsubsecentry##1##2##3##4{%
- \advancenumber{sec\thissecnum}%
- \def\thissubsecnum{##2}%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
}%
\def\numsubsubsecentry##1##2##3##4{%
- \advancenumber{subsec\thissubsecnum}%
+ \advancenumber{subsec\thissubsecnum}%
}%
\let\thischapnum\empty
\let\thissecnum\empty
% Read toc second time, this time actually producing the outlines.
% The `-' means take the \expnumber as the absolute number of
% subentries, which we calculated on our first read of the .toc above.
- %
+ %
% We use the node names as the destinations.
\def\numchapentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
% since the encoding is unknown. For example, the eogonek from
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
- %
+ %
% xx to do this right, we have to translate 8-bit characters to
% their "best" equivalent, based on the @documentencoding. Right
% now, I guess we'll just let the pdf reader have its way.
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\linkcolor #1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\fi % \ifx\pdfoutput
+\else
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\linkcolor = \relax
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
\message{fonts,}
% Change the current font style to #1, remembering it in \curfontstyle.
% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
% italics, not bold italics.
-%
+%
\def\setfontstyle#1{%
\def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
\csname ten#1\endcsname % change the current font
}
% Select #1 fonts with the current style.
-%
+%
\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
\def\rm{\fam=0 \setfontstyle{rm}}
% of just \STYLE. We do this because \STYLE needs to also set the
% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
% \tenSTYLE to set the current font.
-%
+%
% Each font-changing command also sets the names \lsize (one size lower)
% and \lllsize (three sizes lower). These relative commands are used in
% the LaTeX logo and acronyms.
-%
+%
% This all needs generalizing, badly.
-%
+%
\def\textfonts{%
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
+\let\slanted=\smartslanted
\let\var=\smartslanted
\let\dfn=\smartslanted
\let\emph=\smartitalic
\else{\tclose{\kbdfont\look}}\fi
\else{\tclose{\kbdfont\look}}\fi}
-% For @url, @env, @command quotes seem unnecessary, so use \code.
-\let\url=\code
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
\let\env=\code
\let\command=\code
\endlink
\endgroup}
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
% rms does not like angle brackets --karl, 17may97.
% So now @email is just like @uref, unless we are pdf.
%
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
\fi
}
-% @pounds{} is a sterling sign, which is in the CM italic font.
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\frenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
\def\pounds{{\it\$}}
% @registeredsymbol - R in a circle. The font for the R should really
}$%
}
+% Laurent Siebenmann reports \Orb undefined with:
+% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
+% so we'll define it if necessary.
+%
+\ifx\Orb\undefined
+\def\Orb{\mathhexbox20D}
+\fi
+
\message{page headings,}
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
- \finishtitlepage
+ \finishtitlepage
\fi
\let\page = \oldpage
\page
\def\Etitlepage{%
\iffinishedtitlepage\else
- \finishtitlepage
+ \finishtitlepage
\fi
% It is important to do the page break before ending the group,
% because the headline and footline are only empty inside the group.
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
- \let\tt=\authortt}
+ \let\tt=\authortt}
\parseargdef\title{%
\checkenv\titlepage
% @author should come last, but may come many times.
% It can also be used inside @quotation.
-%
+%
\parseargdef\author{%
\def\temp{\quotation}%
\ifx\thisenv\temp
% \parskip glue -- logically it's part of the @item we just started.
\nobreak \vskip-\parskip
%
- % Stop a page break at the \parskip glue coming up. (Unfortunately
- % we can't prevent a possible page break at the following
- % \baselineskip glue.) However, if what follows is an environment
- % such as @example, there will be no \parskip glue; then
- % the negative vskip we just would cause the example and the item to
- % crash together. So we use this bizarre value of 10001 as a signal
- % to \aboveenvbreak to insert \parskip glue after all.
- % (Possibly there are other commands that could be followed by
- % @example which need the same treatment, but not section titles; or
- % maybe section titles are the only special case and they should be
- % penalty 10001...)
+ % Stop a page break at the \parskip glue coming up. However, if
+ % what follows is an environment such as @example, there will be no
+ % \parskip glue; then the negative vskip we just inserted would
+ % cause the example and the item to crash together. So we use this
+ % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+ % \parskip glue after all. Section titles are handled this way also.
+ %
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
% @table, @ftable, @vtable.
\envdef\table{%
\let\itemindex\gobble
- \tablex
+ \tablecheck{table}%
}
\envdef\ftable{%
\def\itemindex ##1{\doind {fn}{\code{##1}}}%
- \tablex
+ \tablecheck{ftable}%
}
\envdef\vtable{%
\def\itemindex ##1{\doind {vr}{\code{##1}}}%
- \tablex
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
}
\def\tablex#1{%
\def\itemindicate{#1}%
% #1 is the @columnfraction, usually a decimal number like .5, but might
% be just 1. We just use it, whatever it is.
-%
+%
\def\pickupwholefraction#1 {%
\global\advance\colcount by 1
\expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
% we encounter the problem it was intended to solve again.
-% --karl, nathan@acm.org, 20apr99.
+% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
% @multitable ... @end multitable definitions:
\startsavinginserts
%
% @item within a multitable starts a normal row.
- \let\item\crcr
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
%
\tolerance=9500
\hbadness=9500
\checkinserts
% Keeps underfull box messages off when table breaks over pages.
%\filbreak
- % Maybe so, but it also creates really weird page breaks when the
- % table breaks over pages. Wouldn't \vfil be better? Wait until the
- % problem manifests itself, so it can be fixed for real --karl.
+ % Maybe so, but it also creates really weird page breaks when the
+ % table breaks over pages. Wouldn't \vfil be better? Wait until the
+ % problem manifests itself, so it can be fixed for real --karl.
}%
}%
%
% Make sure we don't inherit \rightskip from the outer environment.
\rightskip=0pt
\ifnum\colcount=1
- % The first column will be indented with the surrounding text.
- \advance\hsize by\leftskip
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
\else
- \ifsetpercent \else
- % If user has not set preamble in terms of percent of \hsize
- % we will advance \hsize by \multitablecolspace.
- \advance\hsize by \multitablecolspace
- \fi
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
% In either case we will make \leftskip=\multitablecolspace:
\leftskip=\multitablecolspace
\fi
\global\setpercentfalse
}
-\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
-% If so, do nothing. If not, give it an appropriate dimension based on
-% current baselineskip.
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
-%% strut to put in table in case some entry doesn't have descenders,
-%% to keep lines equally spaced
-\let\multistrut = \strut
-\else
-%% FIXME: what is \box0 supposed to be?
-\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
-width0pt\relax} \fi
+\fi
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
\doignorecount = 0
%
% Swallow text until we reach the matching `@end #1'.
- \dodoignore {#1}%
+ \dodoignore{#1}%
}
{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
\obeylines %
%
\gdef\dodoignore#1{%
- % #1 contains the string `ifinfo'.
+ % #1 contains the command name as a string, e.g., `ifinfo'.
%
% Define a command to find the next `@end #1', which must be on a line
% by itself.
\def\doignoreyyy#1{%
\def\temp{#1}%
- \ifx\temp\empty % Nothing found.
+ \ifx\temp\empty % Nothing found.
\let\next\doignoretextzzz
- \else % Found a nested condition, ...
+ \else % Found a nested condition, ...
\advance\doignorecount by 1
- \let\next\doignoretextyyy % ..., look for another.
+ \let\next\doignoretextyyy % ..., look for another.
% If we're here, #1 ends with ^^M\ifinfo (for example).
\fi
\next #1% the token \_STOP_ is present just after this macro.
}
% We have to swallow the remaining "\_STOP_".
-%
+%
\def\doignoretextzzz#1{%
- \ifnum\doignorecount = 0 % We have just found the outermost @end.
+ \ifnum\doignorecount = 0 % We have just found the outermost @end.
\let\next\enddoignore
- \else % Still inside a nested condition.
+ \else % Still inside a nested condition.
\advance\doignorecount by -1
\let\next\doignoretext % Look for the next @end.
\fi
\def\definedummyletter##1{%
\expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
}%
+ \let\definedummyaccent\definedummyletter
%
% Do the redefinitions.
\commondummies
\def\definedummyletter##1{%
\expandafter\def\csname ##1\endcsname{@##1}%
}%
+ \let\definedummyaccent\definedummyletter
%
% Do the redefinitions.
\commondummies
%
% Assorted special characters.
\definedummyword{bullet}%
+ \definedummyword{comma}%
\definedummyword{copyright}%
\definedummyword{registeredsymbol}%
\definedummyword{dots}%
\gdef\commondummiesnofonts{%
% Control letters and accents.
\definedummyletter{!}%
- \definedummyletter{"}%
- \definedummyletter{'}%
+ \definedummyaccent{"}%
+ \definedummyaccent{'}%
\definedummyletter{*}%
- \definedummyletter{,}%
+ \definedummyaccent{,}%
\definedummyletter{.}%
\definedummyletter{/}%
\definedummyletter{:}%
- \definedummyletter{=}%
+ \definedummyaccent{=}%
\definedummyletter{?}%
- \definedummyletter{^}%
- \definedummyletter{`}%
- \definedummyletter{~}%
+ \definedummyaccent{^}%
+ \definedummyaccent{`}%
+ \definedummyaccent{~}%
\definedummyword{u}%
\definedummyword{v}%
\definedummyword{H}%
% would be for a given command (usually its argument).
%
\def\indexnofonts{%
- \def\definedummyword##1{%
+ % Accent commands should become @asis.
+ \def\definedummyaccent##1{%
\expandafter\let\csname ##1\endcsname\asis
}%
- \let\definedummyletter=\definedummyword
+ % We can just ignore other control letters.
+ \def\definedummyletter##1{%
+ \expandafter\def\csname ##1\endcsname{}%
+ }%
+ % Hopefully, all control words can become @asis.
+ \let\definedummyword\definedummyaccent
%
\commondummiesnofonts
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
\def\bullet{bullet}%
+ \def\comma{,}%
\def\copyright{copyright}%
\def\registeredsymbol{R}%
\def\dots{...}%
\def\point{.}%
\def\print{-|}%
\def\result{=>}%
+ %
+ % Don't write macro names.
+ \emptyusermacros
}
\let\indexbackslash=0 %overridden during \printindex.
\dosubindwrite
%
\ifx\lastskipmacro\zeroskipmacro
- % if \lastskip was zero, perhaps the last item was a
- % penalty, and perhaps it was >=10000, e.g., a \nobreak.
- % In that case, we want to re-insert the penalty; since we
- % just inserted a non-discardable item, any following glue
- % (such as a \parskip) would be a breakpoint. For example:
+ % If \lastskip was zero, perhaps the last item was a penalty, and
+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
+ % to re-insert the same penalty (values >10000 are used for various
+ % signals); since we just inserted a non-discardable item, any
+ % following glue (such as a \parskip) would be a breakpoint. For example:
+ %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
% would allow a break between the index-whatever whatsit
% and the "Description." paragraph.
- \ifnum\count255>9999 \nobreak \fi
+ \ifnum\count255>9999 \penalty\count255 \fi
\else
% On the other hand, if we had a nonzero \lastskip,
% this make-up glue would be preceded by a non-discardable item
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
- \penalty -300
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus .5\baselineskip
\leftline{\secbf #1}%
- \vskip .33\baselineskip plus .1\baselineskip
- %
% Do our best not to break after the initial.
\nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
}}
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% and table of contents entries. The paragraph is indented by \leftskip.
%
% A straightforward implementation would start like this:
-% \def\entry#1#2{...
+% \def\entry#1#2{...
% But this frozes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
-%
+%
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
% part of (the primitive) \par. Without it, a spurious underfull
% \hbox ensues.
\ifpdf
- \pdfgettoks#1.%
- \ \the\toksA
+ \pdfgettoks#1.%
+ \ \the\toksA
\else
- \ #1%
+ \ #1%
\fi
\fi
\par
% We do the following ugly conditional instead of the above simple
% construct for the sake of pdftex, which needs the actual
% letter in the expansion, not just typeset.
-%
+%
\def\appendixletter{%
\ifnum\appendixno=`A A%
\else\ifnum\appendixno=`B B%
\edef\chapheadtype{\headtype}%
\else
\if \headtype A\if \chapheadtype N%
- \errmessage{@appendix... within a non-appendix chapter}%
+ \errmessage{@appendix... within a non-appendix chapter}%
\fi\fi
\fi
% Check for numbered within unnumbered:
% Now print the heading:
\if \headtype U%
\ifcase\absseclevel
- \unnumberedzzz{#3}%
+ \unnumberedzzz{#3}%
\or \unnumberedseczzz{#3}%
\or \unnumberedsubseczzz{#3}%
\or \unnumberedsubsubseczzz{#3}%
\else
\if \headtype A%
\ifcase\absseclevel
- \appendixzzz{#3}%
+ \appendixzzz{#3}%
\or \appendixsectionzzz{#3}%
\or \appendixsubseczzz{#3}%
\or \appendixsubsubseczzz{#3}%
\fi
\else
\ifcase\absseclevel
- \chapterzzz{#3}%
+ \chapterzzz{#3}%
\or \seczzz{#3}%
\or \numberedsubseczzz{#3}%
\or \numberedsubsubseczzz{#3}%
% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
% all lower-level sectioning counters to zero.
-%
+%
% Also set \chaplevelprefix, which we prepend to @float sequence numbers
% (e.g., figures), q.v. By default (before any chapter), that is empty.
\let\chaplevelprefix = \empty
-%
+%
\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
\def\chapterzzz#1{%
% section resetting is \global in case the chapter is in a group, such
\outer\parseargdef\centerchap{%
% Well, we could do the following in a group, but that would break
% an assumption that \chapmacro is called at the outermost level.
- % Thus we are safer this way: --kasal, 24feb04
+ % Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
\CHAPPAGon
% Chapter opening.
-%
+%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
-%
+%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
\def\Yomitfromtockeyword{Yomitfromtoc}
% I don't think this chapter style is supported any more, so I'm not
% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
-%
+%
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
%
\def\unnchfopen #1{%
% Section titles. These macros combine the section number parts and
% call the generic \sectionheading to do the printing.
-%
+%
\newskip\secheadingskip
\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
% Print any size, any type, section title.
-%
+%
% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
% section number.
-%
+%
\def\sectionheading#1#2#3#4{%
{%
% Switch to the right set of fonts.
% glue accumulate. (Not a breakpoint because it's preceded by a
% discardable item.)
\vskip-\parskip
- %
- % This \nobreak is purely so the last item on the list is a \penalty
- % of 10000. This is so other code, for instance \parsebodycommon, can
- % check for and avoid allowing breakpoints. Otherwise, it would
- % insert a valid breakpoint between:
+ %
+ % This is purely so the last item on the list is a known \penalty >
+ % 10000. This is so \startdefun can avoid allowing breakpoints after
+ % section headings. Otherwise, it would insert a valid breakpoint between:
+ %
% @section sec-whatever
% @deffn def-whatever
- \nobreak
+ \penalty 10001
}
\newwrite\tocfile
% Write an entry to the toc file, opening it if necessary.
-% Called from @chapter, etc.
-%
+% Called from @chapter, etc.
+%
% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
% We append the current node name (if any) and page number as additional
% arguments for the \{chap,sec,...}entry macros which will eventually
% read this. The node name is used in the pdf outlines as the
% destination to jump to.
-%
+%
% We open the .toc file for writing here instead of at @setfilename (or
% any other fixed time) so that @contents can be anywhere in the document.
% But if #1 is `omit', then we don't do anything. This is used for the
% But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
- %
+ %
% We'd like to right-justify chapter numbers, but that looks strange
% with appendix letters. And right-justifying numbers and
% left-justifying letters looks strange when there is less than 10
% Appendices, in the main contents.
% Need the word Appendix, and a fixed-size box.
-%
+%
\def\appendixbox#1{%
% We use M since it's probably the widest letter.
\setbox0 = \hbox{\putwordAppendix{} M}%
% start of the next paragraph will insert \parskip.
%
\def\aboveenvbreak{{%
- % =10000 instead of <10000 because of a special case in \itemzzz, q.v.
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
\ifnum \lastpenalty=10000 \else
\advance\envskipamount by \parskip
\endgraf
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
\cartouter=\hsize
- \advance\cartouter by 18.4pt % allow for 3pt kerns on either
- % side, and for 6pt waste from
- % each corner char, and rule thickness
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+ % side, and for 6pt waste from
+ % each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing=\comment
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
- \hskip\lskip
- \vrule\kern3pt
- \vbox\bgroup
- \kern3pt
- \hsize=\cartinner
- \baselineskip=\normbskip
- \lineskip=\normlskip
- \parskip=\normpskip
- \vskip -\parskip
- \comment % For explanation, see the end of \def\group.
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \kern3pt
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+ \comment % For explanation, see the end of \def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
- \kern3pt
- \egroup
- \kern3pt\vrule
- \hskip\rskip
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
\egroup
\cartbot
\egroup
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
-%
+%
\def\Equotation{%
\par
\ifx\quotationauthor\undefined\else
}
% @copying ... @end copying.
-% Save the text away for @insertcopying later. Many commands won't be
-% allowed in this context, but that's ok.
+% Save the text away for @insertcopying later.
%
% We save the uninterpreted tokens, rather than creating a box.
% Saving the text in a box would be much easier, but then all the
% file; b) letting users define the frontmatter in as flexible order as
% possible is very desirable.
%
-\def\copying{\begingroup
- % Define a command to swallow text until we reach `@end copying'.
- % \ is the escape char in this texinfo.tex file, so it is the
- % delimiter for the command; @ will be the escape char when we read
- % it, but that doesn't matter.
- \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}%
- %
- % We must preserve ^^M's in the input file; see \insertcopying below.
- \catcode`\^^M = \active
- \docopying
-}
-
-% What we do to finish off the copying text.
-%
-\def\enddocopying{\endgroup\ignorespaces}
-
-% @insertcopying. Here we must play games with ^^M's. On the one hand,
-% we need them to delimit commands such as `@end quotation', so they
-% must be active. On the other hand, we certainly don't want every
-% end-of-line to be a \par, as would happen with the normal active
-% definition of ^^M. On the third hand, two ^^M's in a row should still
-% generate a \par.
-%
-% Our approach is to make ^^M insert a space and a penalty1 normally;
-% then it can also check if \lastpenalty=1. If it does, then manually
-% do \par.
-%
-% This messes up the normal definitions of @c[omment], so we redefine
-% it. Similarly for @ignore. (These commands are used in the gcc
-% manual for man page generation.)
-%
-% Seems pretty fragile, most line-oriented commands will presumably
-% fail, but for the limited use of getting the copying text (which
-% should be quite simple) inserted, we can hope it's ok.
-%
-{\catcode`\^^M=\active %
-\gdef\insertcopying{\begingroup %
- \parindent = 0pt % looks wrong on title page
- \def^^M{%
- \ifnum \lastpenalty=1 %
- \par %
- \else %
- \space \penalty 1 %
- \fi %
- }%
- %
- % Fix @c[omment] for catcode 13 ^^M's.
- \def\c##1^^M{\ignorespaces}%
- \let\comment = \c %
- %
- % Don't bother jumping through all the hoops that \doignore does, it
- % would be very hard since the catcodes are already set.
- \long\def\ignore##1\end ignore{\ignorespaces}%
- %
- \copyingtext %
-\endgroup}%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\copyingtext
+ \endgroup
}
\message{defuns,}
% If there are two @def commands in a row, we'll have a \nobreak,
% which is there to keep the function description together with its
% header. But if there's nothing but headers, we need to allow a
- % break somewhere. Check for penalty 10002 (inserted by
- % \defargscommonending) instead of 10000, since the sectioning
- % commands insert a \penalty10000, and we don't want to allow a break
- % between a section heading and a defun.
+ % break somewhere. Check specifically for penalty 10002, inserted
+ % by \defargscommonending, instead of 10000, since the sectioning
+ % commands also insert a nobreak penalty, and we don't want to allow
+ % a break between a section heading and a defun.
+ %
\ifnum\lastpenalty=10002 \penalty2000 \fi
%
% Similarly, after a section heading, do not allow a break.
% #1 is the category, such as "Function".
% #2 is the return type, if any.
% #3 is the function name.
-%
+%
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
% tt for the name. This is because literal text is sometimes needed in
% the argument list (groff manual), and ttsl and tt are not very
% distinguishable. Prevent hyphenation at `-' chars.
-%
+%
\def\defunargs#1{%
- % use sl by default (not ttsl),
+ % use sl by default (not ttsl),
% tt for the names.
\df \sl \hyphenchar\font=0
%
\ifx\eTeXversion\undefined
\newwrite\macscribble
\def\scantokens#1{%
- \toks0={#1\endinput}%
+ \toks0={#1}%
\immediate\openout\macscribble=\jobname.tmp
\immediate\write\macscribble{\the\toks0}%
\immediate\closeout\macscribble
\newlinechar`\^^M
\let\xeatspaces\eatspaces
% Undo catcode changes of \startcontents and \doprintindex
- \catcode`\@=0 \catcode`\\=\other \escapechar=`\@
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
% ... and \example
\spaceisspace
%
% Append \endinput to make sure that TeX does not see the ending newline.
%
% I've verified that it is necessary both for e-TeX and for ordinary TeX
- % --kasal, 29nov03
+ % --kasal, 29nov03
\scantokens{#1\endinput}%
\endgroup
}
+\def\scanexp#1{%
+ \edef\temp{\noexpand\scanmacro{#1}}%
+ \temp
+}
+
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
% \do\macro1\do\macro2...
% Utility routines.
-% This does \let #1 = #2, except with \csnames.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
\def\cslet#1#2{%
-\expandafter\expandafter
-\expandafter\let
-\expandafter\expandafter
-\csname#1\endcsname
-\csname#2\endcsname}
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
% Trim leading and trailing spaces off a string.
% Concepts from aro-bend problem 15 (see CTAN).
% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
-\def\macrobodyctxt{%
- \catcode`\~=\other
+\def\scanctxt{%
+ \catcode`\"=\other
+ \catcode`\+=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
- \catcode`\<=\other
- \catcode`\>=\other
- \catcode`\+=\other
+ \catcode`\~=\other
+}
+
+\def\scanargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+ \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{%
+ \scanctxt
\catcode`\{=\other
\catcode`\}=\other
- \catcode`\@=\other
\catcode`\^^M=\other
- \usembodybackslash}
+ \usembodybackslash
+}
\def\macroargctxt{%
- \catcode`\~=\other
- \catcode`\^=\other
- \catcode`\_=\other
- \catcode`\|=\other
- \catcode`\<=\other
- \catcode`\>=\other
- \catcode`\+=\other
- \catcode`\@=\other
- \catcode`\\=\other}
+ \scanctxt
+ \catcode`\\=\other
+}
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
\expandafter\parsearg
\fi \next}
-% We mant to disable all macros during \shipout so that they are not
+% We want to disable all macros during \shipout so that they are not
% expanded by \write.
\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
\edef\next{\macrolist}\expandafter\endgroup\next}
+% For \indexnofonts, we need to get rid of all macros, leaving only the
+% arguments (if present). Of course this is not nearly correct, but it
+% is the best we can do for now. makeinfo does not expand macros in the
+% argument to @deffn, which ends up writing an index entry, and texindex
+% isn't prepared for an index sort entry that starts with \.
+%
+% Since macro invocations are followed by braces, we can just redefine them
+% to take a single TeX argument. The case of a macro invocation that
+% goes to end-of-line is not handled.
+%
+\def\emptyusermacros{\begingroup
+ \def\do##1{\let\noexpand##1=\noexpand\asis}%
+ \edef\next{\macrolist}\expandafter\endgroup\next}
+
% @alias.
% We need some trickery to remove the optional spaces around the equal
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
-% cross-references.
-\parseargdef\node{\checkenv{}\nodexxx #1,\finishnodeparse}
-\def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+% cross-references. The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross, , , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
\let\nwnode=\node
\let\lastnode=\empty
% Write a cross-reference definition for the current node. #1 is the
% type (Ynumbered, Yappendix, Ynothing).
-%
+%
\def\donoderef#1{%
\ifx\lastnode\empty\else
\setref{\lastnode}{#1}%
% 2) NAME-snt - section number and type, passed as the SNT arg, or
% empty for anchors.
% 3) NAME-pg - the page number.
-%
+%
% This is called from \donoderef, \anchor, and \dofloat. In the case of
% floats, there is an additional part, which is not written here:
% 4) NAME-lof - the text as it should appear in a @listoffloats.
-%
+%
\def\setref#1#2{%
\pdfmkdest{#1}%
\iflinks
\turnoffactive
\otherbackslash
\edef\writexrdef##1##2{%
- \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
- ##1}{##2}}% these are parameters of \writexrdef
+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+ ##1}{##2}}% these are parameters of \writexrdef
}%
\toks0 = \expandafter{\thissection}%
\immediate \writexrdef{title}{\the\toks0 }%
\fi
%
% if the user also gave the printed manual name (fifth arg), append
- % "in MANUALNAME".
+ % "in MANUALNAME".
\ifdim \wd1 > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
- %
+ %
% If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
% insert empty discretionaries after hyphens, which means that it will
% not find a line break at a hyphen in a node names. Since some manuals
% it was a float, and we have the (safe) float type in \iffloattype.
\expandafter\let\expandafter\floatlist
\csname floatlist\iffloattype\endcsname
- %
+ %
% Is this the first time we've seen this float type?
\expandafter\ifx\floatlist\relax
\toks0 = {\do}% yes, so just \do
}
% Read the last existing aux file, if any. No error if none exists.
-%
+%
\def\tryauxfile{%
\openin 1 \jobname.aux
\ifeof 1 \else
\endgroup}
-% @float FLOATTYPE,LOC ... @end float for displayed figures, tables, etc.
-% We don't actually implement floating yet, we just plop the float "here".
-% But it seemed the best name for the future.
-%
-\envparseargdef\float{\dofloat #1,,,\finish}
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc. We don't actually implement floating yet, we always include the
+% float "here". But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
% #1 is the optional FLOATTYPE, the text label for this float, typically
% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
% this float will not be numbered and cannot be referred to.
-%
+%
% #2 is the optional xref label. Also must be present for the float to
% be referable.
-%
+%
% #3 is the optional positioning argument; for now, it is ignored. It
% will somehow specify the positions allowed to float to (here, top, bottom).
-%
+%
% We keep a separate counter for each FLOATTYPE, which we reset at each
% chapter-level command.
\let\resetallfloatnos=\empty
\let\thisshortcaption=\empty
%
% don't lose footnotes inside @float.
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
\startsavinginserts
%
% We can't be used inside a paragraph.
\ifx\floatlabel\empty \else
% We want each FLOATTYPE to be numbered separately (Figure 1,
% Table 1, Figure 2, ...). (And if no label, no number.)
- %
+ %
\expandafter\getfloatno\csname\safefloattype floatno\endcsname
\global\advance\floatno by 1
%
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
- %
+ %
\edef\thissection{\floatmagic=\safefloattype}%
\setref{\floatlabel}{Yfloat}%
}%
%
\ifx\thiscaption\empty \else
\ifx\floatident\empty \else
- \appendtomacro\captionline{: }% had ident, so need a colon between
+ \appendtomacro\captionline{: }% had ident, so need a colon between
\fi
%
% caption text.
- \appendtomacro\captionline\thiscaption
+ \appendtomacro\captionline{\scanexp\thiscaption}%
\fi
%
% If we have anything to print, print it, with space before.
\ifx\captionline\empty \else
\vskip.5\parskip
\captionline
+ %
+ % Space below caption.
+ \vskip\parskip
\fi
%
% If have an xref label, write the list of floats info. Do this
% caption if specified, else the full caption if specified, else nothing.
{%
\atdummies \turnoffactive \otherbackslash
- \immediate\write\auxfile{@xrdef{\floatlabel-lof}{%
- \floatident
- \ifx\thisshortcaption\empty
- \ifx\thiscaption\empty \else : \thiscaption \fi
- \else
- : \thisshortcaption
- \fi
- }}%
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
- %
- % Space below caption, if we printed anything.
- \ifx\printedsomething\empty \else \vskip\parskip \fi
\egroup % end of \vtop
+ %
+ % place the captured inserts
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
\checkinserts
}
% Append the tokens #2 to the definition of macro #1, not expanding either.
-%
-\newtoks\appendtomacroAtoks
-\newtoks\appendtomacroBtoks
+%
\def\appendtomacro#1#2{%
- \appendtomacroAtoks = \expandafter{#1}%
- \appendtomacroBtoks = {#2}%
- \edef#1{\the\appendtomacroAtoks \the\appendtomacroBtoks}%
+ \expandafter\def\expandafter#1\expandafter{#1#2}%
}
-% @caption, @shortcaption are easy.
-%
-\long\def\caption#1{\checkenv\float \def\thiscaption{#1}}
-\def\shortcaption#1{\checkenv\float \def\thisshortcaption{#1}}
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
% The parameter is the control sequence identifying the counter we are
% going to use. Create it if it doesn't exist and assign it to \floatno.
% \setref calls this to get the XREFLABEL-snt value. We want an @xref
% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
% first read the @float command.
-%
+%
\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
% Magic string used for the XREFLABEL-title value, so \xrefX can
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
% \thissection value which we \setref above.
-%
+%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
% #1 is (maybe) the \floatmagic string. If so, #2 will be the
% (safe) float type for this float. We set \iffloattype to #2.
-%
+%
\def\doiffloat#1=#2=#3\finish{%
\def\temp{#1}%
\def\iffloattype{#2}%
}
% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
-%
+%
\parseargdef\listoffloats{%
\def\floattype{#1}% floattype
{%
% xref label, in the form LABEL-title, which is how we save it in the
% aux file. We strip off the -title and look up \XRLABEL-lof, which
% has the text we're supposed to typeset here.
-%
+%
% Figures without xref labels will not be included in the list (since
% they won't appear in the aux file).
-%
+%
\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
\def\listoffloatsdoentry#1-title\finish{{%
% Can't fully expand XR#1-lof because it can contain anything. Just