+1.3.113.jcn2
+============
+
+* Moved all documentation from regtest to individual example files.
+
+* Added feature to lilypond-book to write out \header texidoc string.
+
1.3.113.jcn1
============
[TODO: revise and completize this. ]
-[TODO: should generate out of header fields using ly2dvi?]
-
@section Notes and rests
-Rests. Note that the dot of 8th, 16th and 32nd rests rest should be
-next to the top of the rest. All rests except the whole rest are
-centered on the middle staff line.
-
@lilypondfile{rest.ly}
-Note head shapes are settable. The stem endings should be adjusted
-per note head. If you want different note head styles on one stem,
-you must create a special context called Thread.
-
-Harmonic notes have a different shape and different
-dimensions. Nevertheless, noteheads in both styles can be combined, on
-either up or down stems.
-
@lilypondfile{noteheadstyle.ly}
-Noteheads can have dots, and rests can too. Augmentation dots should
-never be printed on a staff line, but rather be shifted vertically. They
-should go up, but in case of multiple parts, the down stems have down
-shifted dots. (Wanske p. 186) In case of chords, all dots should be in
-a column. The dots go along as rests are shifted to avoid collisions.
-
@lilypondfile{dots.ly}
-Accidentals work: the second note does not get a sharp. The third and
-fourth show forced and courtesy accidentals
-
@lilypondfile{accidental.ly}
-Multiple measure rests do not collide with barlines and clefs. They
-are not expanded when you set @code{Score.skipBars}. Although the
-multi-measure-rest is a Spanner, minimum distances are set to keep it
-colliding from barlines.
-
-
@lilypondfile{multi-measure-rest.ly}
-If @code{Score.skipBars} is set,
-the signs for four, two, and one measure rest are combined to
-produce the graphical representation of rests for up to 10 bars.
-The number of bars will be written above the sign.
-
@lilypondfile{mm-rests2.ly}
-A sharp sign after a double sharp sign, as well as a flat sign
-after a double flat sign is automatically prepended with a
-natural sign.
-
@lilypondfile{accidental-single-double.ly}
-@section Stems
-Stem tremolos or rolls are tremolo signs that look like beam segments
-crossing stems. If the stem is in a beam, the tremolo must be parallel
-to the beam. If the stem is invisible (eg. on a whole note), the
-tremolo must be centered on the note.
+
+@section Stems
@lilypondfile{stem-tremolo.ly}
-Chord tremolos look like beams, but are a kind of repeat symbol.
-To avoid confusion, chord tremolo beams do not reach the stems, but
-leave a gap. Chord tremolo beams on half notes are not ambiguous,
-as half notes cannot appear in a regular beam, and should reach the
-stems.
-
@lilypondfile{chord-tremolo.ly}
-Beams, stems and noteheads often have communication troubles, since
-the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
-point) are mixed.
-
-Stems, beams, ties and slurs should behave similarly, when placed
-on the middle staff line. Of course stem-direction is down for high
-notes, and up for low notes.
-
@lilypondfile{stem-direction.ly}
-Similarly, if @code{stem_default_neutral_direction} is set to @code{-1}.
-
@lilypondfile{stem-direction-down.ly}
-@section Scripts
-The staccato dot (and all scripts with follow-into-staff set), must
-not be on staff lines.
-@lilypondfile{staccato-pos.ly}
+@section Scripts
-Dynamics appear below or above the staff. If multiple dynamics are
-linked with (de)crescendi, they should be on the same line.
+@lilypondfile{staccato-pos.ly}
@lilypondfile{dyn-line.ly}
-
-Arpeggios are supported, both cross-staff and broken single staff.
-
@lilypondfile{arpeggio.ly}
-Simple glissando lines between notes are supported.
-
@lilypondfile{glissando.ly}
@section Chord names
-Chord names are generated from a list pitches, and are customisable
-from guile. For some unlogical names, guile customisation is used
-by default.
-
@lilypondfile{chord-names.ly}
-@section Grace notes
-Grace notes are typeset as an encapsulated piece of music. You can
-have beams, notes, chords, stems etc. within a @code{\grace} section.
-Slurs that start within a grace section, but aren't ended are attached
-to the next normal note. Grace notes have zero duration. If there
-are tuplets, the grace notes won't be under the brace. Grace notes
-can have accidentals, but they are (currently) spaced at a fixed
-distance. Grace notes (of course) come before the accidentals of the
-main note. Grace notes can also be positioned after the main note.
-Grace notes without beams should have a slash, if @code{flagStyle} is
-not set. Main note scripts don't end up on the grace note.
+@section Grace notes
@lilypondfile{grace.ly}
-@section Beams, slurs and other spanners
-Beaming is generated automatically. Beams may cross bar lines. In that
-case, line breaks are forbidden. Yet clef and key signatures are
-hidden just as with breakable bar lines.
-@lilypondfile{beaming.ly}
+@section Beams, slurs and other spanners
-Beams should behave reasonably well, even under extreme circumstances.
-Stems may be short, but noteheads should never touch the beam.
+@lilypondfile{beaming.ly}
@lilypondfile{beam-extreme.ly}
-Beams should always reach the middle staff line. The second beam
-counting from the note head side, should never be lower than the
-second staff line. This does not hold for grace note beams.
-Override with @code{noStemExtend}.
-
@lilypondfile{beam-position.ly}
-Slurs should look nice and symmetric. The curvature may increase
-only to avoid noteheads, and as little as possible. Slurs never
-run through noteheads or stems.
-
@lilypondfile{slur-nice.ly}
@lilypondfile{slur-symmetry.ly}
@lilypondfile{slur-symmetry-1.ly}
-Across line breaks, slurs behave nicely. On the left, they extend to
-just after the preferatory matter, and on the right to the end of the
-staff. A slur should follow the same vertical direction it would have
-in unbroken state.
-
@lilypondfile{slur-broken-trend.ly}
-Ties are strictly horizontal. They are placed in between note heads.
-The horizontal middle should not overlap with a staffline.
-
@lilypondfile{tie.ly}
-When tieing chords, the outer slurs point outwards, the inner slurs
-point away from the center of the staff. Override with
-@code{tieVerticalDirection}.
-
@lilypondfile{tie-chord.ly}
-When tieing notes with accidentals across a bar boundary, the accidental
-must not be drawn on the note in the new bar. Instead, the next note of
-the same pitch in this bar should always show the accidental (even if
-it's natural). Slurring a accidentaled note to a natural one across bar
-boundaries should be explicit.
-
-Pitches can be verified by printing them with the @code{NoteNames} context.
-
@lilypondfile{tie-accidental.ly}
-Beams can be typeset over fixed distance aligned staffs, beam
-beautification doesn't really work, but knees do. Beams should be
-behave well, wherever the switching point is.
-
@lilypondfile{beam-cross-staff.ly}
-The same goes for slurs. They behave decently when broken across
-linebreak.
-
@lilypondfile{slur-cross-staff.ly}
-Tuplets are indicated by a bracket with a number. There should be no
-bracket if there is one beam that matches the length of the tuplet.
-The bracket does not interfere with the stafflines, and the number is
-centered in the gap in the bracket.
-
@lilypondfile{tup.ly}
-@section Property details
-More specific settings take precendence over less specific settings. The
-second slur has slurDirection set to down, overriding the stemup setting.
+
+@section Property details
@lilypondfile{generic-property-override.ly}
-@section Repeats
-LilyPond has three modes for repeats: folded, unfolded and
-semi-unfolded. Unfolded repeats are fully written out. Semi unfolded
-repeats have the body written and all alternatives sequentially.
-Folded repeats have the body written and all alternatives
-simultaneo.ly. If the number of alternatives is larger than the
-repeat count, the excess alternatives are ignored. If the number of
-alternatives is smaller, the first alternative is multiplied to get to
-the number of repeats.
-Unfolded behavior:
+@section Repeats
@lilypondfile{repeat-unfold.ly}
-Volta (Semi folded) behavior. Voltas can start on non-barline moments.
-If they don't barlines should still be shown.
-
@lilypondfile{repeat-volta.ly}
-Folded. This doesn't make sense without alternatives, but it works.
-
@lilypondfile{repeat-fold.ly}
-Across linebreaks, the left edge of a first and second alternative
-bracket should be equal
-
@lilypondfile{repeat-line-break.ly}
-Auto change piano staff switches voices between up and down staffs
-automatically; rests are switched along with the coming note.
-
@lilypondfile{auto-change.ly}
-@section Lyrics
-Lyrics can be set to a melody automatically. Excess lyrics will be
-dumped. Lyrics will not be set over rests. You can have melismata
-either by setting a property melismaBusy, or by setting
-automaticMelismas (which will set melismas during slurs and ties). If
-you want a different order than first Music, then Lyrics, you must
-precook a chord of staffs/lyrics and label those. Of course
-@code{\rhythm} ignores any other rhythms in the piece. Hyphens and
-extenders do not assume anything about lyric lengths, so they continue
-to work.
-@lilypondfile{lyric-combine.ly}
+@section Lyrics
-Multiple stanzas
+@lilypondfile{lyric-combine.ly}
@lilypondfile{lyrics-multi-stanza.ly}
-@section Multiple notes
-Rests should not collide with beams, stems and noteheads. Rests may
-be under beams. Rests should be move by integral number of spaces
-inside the staff, and by half spaces outside. Notice that the half
-and whole rests just outside the staff get ledger lines in different
-cases.
-@lilypondfile{rest-collision.ly}
+@section Multiple notes
-Normal collisions. We have support for polyphony, where the
-middle voices are horizontally shifted.
+@lilypondfile{rest-collision.ly}
@lilypondfile{collisions.ly}
-The number of stafflines of a staff can be set with the property
-numberOfStaffLines. Ledger lines both on note heads and rests are
-adjusted. Barlines also are adjusted.
+@lilypondfile{number-staff-lines.ly}
-@lilypondfile{number-staff-lines.ly}
@section Spacing
-In a limited number of cases, LilyPond corrects for optical spacing
-effects. In this example, space for opposite pointed stems is adjusted
-
@lilypondfile{stem-spacing.ly}
-If there are accidentals in the music, we add space, but the space
-between note and accidentals is less than between the notes with the
-same value. Clef changes also get extra space, but not as much as
-barlines.
-
-Even if a line is very tightly spaced, there will still be room
-between prefatory matter and the following notes. The space after the
-prefatory is very rigid. In contrast, the space before the barline
-must stretch like the space within the measure.
-
-Tight:
-
@lilypondfile{spacing-tight.ly}
-Natural:
-
@lilypondfile{spacing-natural.ly}
-Loose:
-
@lilypondfile{spacing-loose.ly}
-Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
-lyrics don't collide with barlines.
-
@lilypondfile{lyrics-bar.ly}
-Text is set with empty horizontal dimensions. The boolean property
-textNonEmpty is used to respect the horizontal size of text.
-
@lilypondfile{non-empty-text.ly}
-
@section PianoStaff
@section Global stuff
-Breaks can be encouraged and discouraged using @code{\break} and
-@code{\nobreak}. They are abbrevs for @code{\penalty} commands.
-
@lilypondfile{break.ly}
-Markings that are attached to (invisible) barlines are
-delicate: the are attached to the rest of the score without the score
-knowing it. Consequently, they fall over often.
-
@lilypondfile{bar-scripts.ly}
-Staff margins are also markings attached to barlines. They should be
-left of the staff, and be centered vertically wrt the staff. They may
-be on normal staffs, but also on compound staffs, like the PianoStaff
-
@lilypondfile{staff-margin.ly}
-Breathing signs, also used for phrasing, do normally not influence
-global spacing -- only if space gets tight, notes are shifted to make
-room for the breathing sign. Breathing signs break beams running
-through their voice. In the following example, the notes in the first
-two measures all have the same distance from each other:
-
@lilypondfile{breathing-sign.ly}
-Hara kiri staffs kill themselves if they are empty. This example really
-contains two staffs, but the second contains only spaces, and is
-therefore removed.
-
@lilypondfile{hara-kiri-short.ly}
-In orchestral scores and hymns, voices are traditionally combined onto
-one staff. LilyPond has a part combiner, that combines or separates two
-voices according to actual rhythm and pitch. User-defined texts such as
-``solo'' and ``@`a2'' are typeset automagically, as appropriate.
-
@lilypondfile{part-combine.ly}
-Fonts are available in a default set of sizes: 11, 13, 16, 20, 23 and
-26pt staffheight. Sizes of the text fonts and symbol fonts are made
-to match the staff dimensions.
-
@lilypondfile[nonfragment]{size11.ly}
@lilypondfile[nonfragment]{size13.ly}
@lilypondfile[nonfragment]{size26.ly}
-@section Clefs and Time Signatures
-The transparent clef should not occupy any space and with style
-@code{fullSizeChanges}, the changing clef should be typeset in full
-size. For octaviated clefs, the ``8'' should appear closely above or
-below the clef respectively. The ``8'' is processed in a convoluted
-way, so this is fragile as well.
+@section Clefs and Time Signatures
@lilypondfile{clefs.ly}
-
-Key signatures appear on key changes. They may also
-appear without barlines. The restoration accidentals are not printed at
-the start of the line. If @code{createKeyOnClefChange} is set, they're
-also created on a clef change.
-
@lilypondfile{keys.ly}
-
-
@ignore
@c the input file is too long and does not test for specific bugs
-@section Hacks and Features
-As a last resort, the placement of items can be adjusted manually, by
-setting the @code{extra-offset} of an output object.
-@lilypondfile{generic-output-property.ly}
+@section Hacks and Features
-The same mechanism can be used to force pagebreaks.
+@lilypondfile{generic-output-property.ly}
@lilypondfile{between-systems.ly}
text text text text text text text text text text text text
text text text text text text text text text text text text
-
+%% need to use an -I ../../../input/test to find the file
+%% \lilypondfile{tie.ly}
\end{document}
The result is a text document with formatted music integrated.
@command{lilypond-book} will do its best to try to align the music to
-the left and right margins. Currently the most used papersizes and
-one- and twocolumn mode is supported. But if you use some more
-advances features, like the geometry-package or change the margins in
-La@TeX{} or use @code{@@pagesize} in texinfo, will break.
+the left and right margins. Currently all papersizes, one- and
+twocolumn mode and the @code{geometry} package is supported.
+The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4.
+But changing the linewidth in other ways will not give you a straight
+right margin.
This document assumes you have basic knowledge of GNU LilyPond and
La@TeX{} or texinfo.
These commands should be in the beginning of the document:
@itemize @bullet
@item @code{@@afourpaper}
+@item @code{@@afourlatex}
@item @code{@@afourwide}
@item @code{@@smallbook}
@end itemize
-@code{@@pagesizes} are not supported.
+@code{@@pagesizes} are not yet supported.
@subsection Examples
\lilypond@{ YOUR LILYPOND CODE @}
@end example
-The 'geometry' package is is not supported. The most popular
-papersizes should work.
-
Lilypond-book know about the @code{\onecolumn} and
-@code{\twocolumn} commands.
+@code{\twocolumn} commands, the @code{geometry} package and
+all the standard paper sizes.
The music will be surrounded by @code{\preLilypondExample} and
@code{\postLilypondExample}. The variables are
@strong{[UGH: THIS DOES NOT HAPPEN WHEN
YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]}
-@subsection @code{landscape} package
-There is some simple support for landscape paper format, and this
-can be combined with the @code{\twocolumn} command. Only a4 and
-letter paper is supported, more to come...
-
-A more complete
-support, maybe also supporting the geometry package is planned, but
-there are more work that has to be done on @command{lilypond-book}
-first.
-
-This should work:
-@example
-\documentclass@{article@}
-\usepackage@{landscape@}
-\begin@{document@}
-\twocolumn
-BLA BLA BLA
-\end@{document@}
-@end example
-
@subsection Examples
@example
If you use @code{--outdir}, you should also @code{cd} to that directory
before running LaTeX or makeinfo.
-@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
+@strong{[UGH: IS THIS THE BEST WAY TO DO IT? MAYBE ADD A COMMENT LINE TO THE
GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
IS GENERATED.]}
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=113
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
-
+\header{
+texidoc="
+A sharp sign after a double sharp sign, as well as a flat sign
+after a double flat sign is automatically prepended with a
+natural sign.
+";
+}
\version "1.3.110";
+\header{
+texidoc="
+Accidentals work: the second note does not get a sharp. The third and
+fourth show forced and courtesy accidentals.
+";
+}
foo = \notes\relative c'' { \key as \major; dis4 dis dis! dis? }
+\header{
+texidoc="
+Arpeggios are supported, both cross-staff and broken single staff.
+";
+}
\version "1.3.110";
+\header{
+texidoc="
+Auto change piano staff switches voices between up and down staffs
+automatically; rests are switched along with the coming note.
+";
+}
\score {
\notes \context PianoStaff <
+\header{
+texidoc="
+Markings that are attached to (invisible) barlines are
+delicate: the are attached to the rest of the score without the score
+knowing it. Consequently, they fall over often.
+";
+}
\version "1.3.110";
+\header{
+texidoc="
+Beams can be typeset over fixed distance aligned staffs, beam
+beautification doesn't really work, but knees do. Beams should be
+behave well, wherever the switching point is.
+";
+}
\score{
\context PianoStaff <
\context Staff=one \notes\relative c'{
+\header{
+texidoc="
+Beams should behave reasonably well, even under extreme circumstances.
+Stems may be short, but noteheads should never touch the beam.
+";
+}
\version "1.3.110";
\score{
\notes\relative c''{
-
+\header{
+texidoc="
+Beams should always reach the middle staff line. The second beam
+counting from the note head side, should never be lower than the
+second staff line. This does not hold for grace note beams.
+Override with @code{noStemExtend}.
+";
+}
\version "1.3.110";
\score {
+\header{
+texidoc="
+Beaming is generated automatically. Beams may cross bar lines. In that
+case, line breaks are forbidden. Yet clef and key signatures are
+hidden just as with breakable bar lines.
+";
+}
\score { \context Staff \notes \relative c'' {
[c8. c16]
+\header{
+texidoc="
+The same mechanism can be used to force pagebreaks.
+";
+}
\score {
\notes { c1
-
+\header{
+texidoc="
+Breaks can be encouraged and discouraged using @code{\break} and
+@code{\nobreak}. They are abbrevs for @code{\penalty} commands.
+";
+}
\score{
+\header{
+texidoc="
+Breathing signs, also used for phrasing, do normally not influence
+global spacing -- only if space gets tight, notes are shifted to make
+room for the breathing sign. Breathing signs break beams running
+through their voice. In the following example, the notes in the first
+two measures all have the same distance from each other:
+";
+}
+
+
\version "1.3.110";
\score {
+\header{
+texidoc="
+Chord names are generated from a list pitches, and are customisable
+from guile. For some unlogical names, guile customisation is used
+by default.
+";
+}
\version "1.3.110"
chord = \notes\transpose c''\chords{
c1
+\header{
+texidoc="
+Chord tremolos look like beams, but are a kind of repeat symbol.
+To avoid confusion, chord tremolo beams do not reach the stems, but
+leave a gap. Chord tremolo beams on half notes are not ambiguous,
+as half notes cannot appear in a regular beam, and should reach the
+stems.
+";
+}
+
\score {
\context Voice \notes\relative c {
\repeat "tremolo" 8 { c16 d16 }
+
+\header{
+texidoc="
+The transparent clef should not occupy any space and with style
+@code{fullSizeChanges}, the changing clef should be typeset in full
+size. For octaviated clefs, the ``8'' should appear closely above or
+below the clef respectively. The ``8'' is processed in a convoluted
+way, so this is fragile as well.
+";
+}
+
\version "1.3.110";
\score {
\header{
+texidoc="
+Normal collisions. We have support for polyphony, where the
+middle voices are horizontally shifted.
+";
filename = "collisions.ly";
description = "random counterpoint to test collisions";
enteredby = "HWN,JCN";
+\header{
+texidoc="
+Noteheads can have dots, and rests can too. Augmentation dots should
+never be printed on a staff line, but rather be shifted vertically. They
+should go up, but in case of multiple parts, the down stems have down
+shifted dots. (Wanske p. 186) In case of chords, all dots should be in
+a column. The dots go along as rests are shifted to avoid collisions.
+";
+}
+
+
\version "1.3.110";
\score {
\context Voice \notes\relative c'' {
+\header{
+texidoc="
+Dynamics appear below or above the staff. If multiple dynamics are
+linked with (de)crescendi, they should be on the same line.
+";
+}
\score{
\notes\relative c''{
a1\fff\> \!c,,\pp a'' a\p
+\header{
+texidoc="
+As a last resort, the placement of items can be adjusted manually, by
+setting the @code{extra-offset} of an output object.
+";
+}
+
\score{
\notes\relative c''{
\outputproperty #(make-type-checker 'note-head-interface)
+\header{
+texidoc="
+More specific settings take precendence over less specific settings. The
+second slur has slurDirection set to down, overriding the stemup setting.
+";
+}
\version "1.3.110";
\score {
+\header{
+texidoc="
+Simple glissando lines between notes are supported.
+";
+}
+
\score{
<
\context Staff=one \notes\relative c''{
+\header{
+texidoc="
+Grace notes are typeset as an encapsulated piece of music. You can
+have beams, notes, chords, stems etc. within a @code{\grace} section.
+Slurs that start within a grace section, but aren't ended are attached
+to the next normal note. Grace notes have zero duration. If there
+are tuplets, the grace notes won't be under the brace. Grace notes
+can have accidentals, but they are (currently) spaced at a fixed
+distance. Grace notes (of course) come before the accidentals of the
+main note. Grace notes can also be positioned after the main note.
+
+Grace notes without beams should have a slash, if @code{flagStyle} is
+not set. Main note scripts don't end up on the grace note.
+
+";
+}
\score {\notes \context Voice = VA \relative c'' {
\grace b8 c4-\fermata
+\header{
+texidoc="
+Hara kiri staffs kill themselves if they are empty. This example really
+contains two staffs, but the second contains only spaces, and is
+therefore removed.
+";
+}
\version "1.3.110";
zager = \context Staff = zager \notes \relative c'' {
+\header{
+texidoc="
+Key signatures appear on key changes. They may also
+appear without barlines. The restoration accidentals are not printed at
+the start of the line. If @code{createKeyOnClefChange} is set, they're
+also created on a clef change.
+";
+}
+
\version "1.3.110";
\score {
\header{
+texidoc="
+Lyrics can be set to a melody automatically. Excess lyrics will be
+dumped. Lyrics will not be set over rests. You can have melismata
+either by setting a property melismaBusy, or by setting
+automaticMelismas (which will set melismas during slurs and ties). If
+you want a different order than first Music, then Lyrics, you must
+precook a chord of staffs/lyrics and label those. Of course
+@code{\rhythm} ignores any other rhythms in the piece. Hyphens and
+extenders do not assume anything about lyric lengths, so they continue
+to work.
+";
+
+
filename = "twinkle-pop.ly";
%title = "Ah, vous dirais-je, maman ";
description = "twinkle twinkle in pop-song-settings";
\score {
\notes < \context Staff = SA \context Voice = VA { s1 }
- \context LyricVoice = "VA-1" { s1 }
- \context LyricVoice = "VA-2" { s1 }
+ \context LyricsVoice = "VA-1" { s1 }
+ \context LyricsVoice = "VA-2" { s1 }
\addlyrics
\context Staff = SA \m
- < \context LyricVoice = "VA-1" \textI
- \context LyricVoice = "VA-2" \textII
- \context LyricVoice = "VA-3" \textIII
+ < \context LyricsVoice = "VA-1" \textI
+ \context LyricsVoice = "VA-2" \textII
+ \context LyricsVoice = "VA-3" \textIII
>
>
+\header{
+texidoc="
+Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
+lyrics don't collide with barlines.
+";
+}
\score {
\context StaffGroup <
-% Tests a number of features:
-% * Lyric_phrasing_engraver
-% * Stanza_number_engraver
-% * Automatic melismata on beamed notes
\version "1.3.110";
\include "english.ly"
\header{
+texidoc="
+Multiple stanzas
+
+ Tests a number of features:
+ * Lyric_phrasing_engraver
+ * Stanza_number_engraver
+ * Automatic melismata on beamed notes
+
+";
+
title = "Crowned with Honour";
composer = "Oliver Holden (1765-1844)";
poet = "Thomas Kelly (1769-1855)";
TheLyrics = \lyrics <
{
- \context LyricVoice = "Soprano-1"
- \property LyricVoice .stanza = "1:"
- \property LyricVoice .stz = "(1)"
+ \context LyricsVoice = "Soprano-1"
+ \property LyricsVoice .stanza = "1:"
+ \property LyricsVoice .stz = "(1)"
The4 head that once was crowned with thorns
Is crowned with glo -- ry now;
A roy -- al di -- a -- dem a -- dorns
The might -- y Vic -- tor's brow.
}
{
- \context LyricVoice = "Soprano-2"
- \property LyricVoice .stanza = "2:"
- \property LyricVoice .stz = "(2)"
+ \context LyricsVoice = "Soprano-2"
+ \property LyricsVoice .stanza = "2:"
+ \property LyricsVoice .stz = "(2)"
The4 high -- est place that heav'n af -- fords
Is His by sov -- 'reign right;
The King of kings, the Lord of lords,
He reigns in glo -- ry bright.
}
{
- \context LyricVoice = "Soprano-3"
- \property LyricVoice .stanza = "3:"
- \property LyricVoice .stz = "(3)"
+ \context LyricsVoice = "Soprano-3"
+ \property LyricsVoice .stanza = "3:"
+ \property LyricsVoice .stz = "(3)"
The joy of all who dwell a -- bove,
The joy of saints be -- low,
To4 whom He man -- i -- fests His love,
+\header{
+texidoc="
+If @code{Score.skipBars} is set,
+the signs for four, two, and one measure rest are combined to
+produce the graphical representation of rests for up to 10 bars.
+The number of bars will be written above the sign.
+";
+}
+
thenotes = \notes \relative cis' {
\property Score. skipBars = ##t
\time 4/4;
+\header{
+texidoc="
+Multiple measure rests do not collide with barlines and clefs. They
+are not expanded when you set @code{Score.skipBars}. Although the
+multi-measure-rest is a Spanner, minimum distances are set to keep it
+colliding from barlines.
+";
+}
\version "1.3.110";
\score { \notes { \time 3/4; \key cis \major;
-
+\header{
+texidoc="
+Text is set with empty horizontal dimensions. The boolean property
+textNonEmpty is used to respect the horizontal size of text.
+";
+}
\score { \notes {
\property Voice.TextScript \override #'no-spacing-rods = ##f
c4_"very wide and long text" c4
+\header{
+texidoc="
+Note head shapes are settable. The stem endings should be adjusted
+per note head. If you want different note head styles on one stem,
+you must create a special context called Thread.
+
+Harmonic notes have a different shape and different
+dimensions. Nevertheless, noteheads in both styles can be combined, on
+either up or down stems.
+";
+}
\version "1.3.110";
+\header{
+texidoc="
+The number of stafflines of a staff can be set with the property
+numberOfStaffLines. Ledger lines both on note heads and rests are
+adjusted. Barlines also are adjusted.
+";
+}
+
\score {
\context Voice \notes\relative c {
+\header{
+texidoc="
+In orchestral scores and hymns, voices are traditionally combined onto
+one staff. LilyPond has a part combiner, that combines or separates two
+voices according to actual rhythm and pitch. User-defined texts such as
+``solo'' and ``@`a2'' are typeset automagically, as appropriate.
+";
+}
+
\score{
\context Staff = flauti <
\time 4/4;
+\header{
+texidoc="
+Folded. This doesn't make sense without alternatives, but it works.
+";
+}
\score { \notes\context Staff\relative c'' {
\repeat fold 3 { c^"3$\\times$ 0alt" d }
+\header{
+texidoc="
+Across linebreaks, the left edge of a first and second alternative
+bracket should be equal
+";
+}
\score {
\notes
+\header{
+texidoc="
+LilyPond has three modes for repeats: folded, unfolded and
+semi-unfolded. Unfolded repeats are fully written out. Semi unfolded
+repeats have the body written and all alternatives sequentially.
+Folded repeats have the body written and all alternatives
+simultaneo.ly. If the number of alternatives is larger than the
+repeat count, the excess alternatives are ignored. If the number of
+alternatives is smaller, the first alternative is multiplied to get to
+the number of repeats.
+
+Unfolded behavior:
+";
+}
\score {
+\header{
+texidoc="
+Volta (Semi folded) behavior. Voltas can start on non-barline moments.
+If they don't barlines should still be shown.
+";
+}
% no alts.
\score { \notes
+\header{
+texidoc="
+Rests should not collide with beams, stems and noteheads. Rests may
+be under beams. Rests should be move by integral number of spaces
+inside the staff, and by half spaces outside. Notice that the half
+and whole rests just outside the staff get ledger lines in different
+cases.
+";
+}
scale = \notes \relative c' {
c8 d e f g a b c c d e f g a b c
-\score { \notes {
+\header{
+texidoc="
+Rests. Note that the dot of 8th, 16th and 32nd rests rest should be
+next to the top of the rest. All rests except the whole rest are
+centered on the middle staff line.
+";
+}
+
+
+ \score { \notes {
\time 4/4;
r \longa * 1/4 r\breve * 1/2
r1 r2 r4 r8 r16 r32 r64 r128 r128
+\header{
+texidoc="
+Fonts are available in a default set of sizes: 11, 13, 16, 20, 23 and
+26pt staffheight. Sizes of the text fonts and symbol fonts are made
+to match the staff dimensions.
+";
+}
\include "paper11.ly"
\include "allfontstyle.ly";
+\header{
+texidoc="
+Across line breaks, slurs behave nicely. On the left, they extend to
+just after the preferatory matter, and on the right to the end of the
+staff. A slur should follow the same vertical direction it would have
+in unbroken state.
+";
+}
\score{
\notes \relative c''{
e1( \break) a,
-
+\header{
+texidoc="
+The same goes for slurs. They behave decently when broken across
+linebreak.
+";
+}
\score{
-
+\header{
+texidoc="
+Slurs should look nice and symmetric. The curvature may increase
+only to avoid noteheads, and as little as possible. Slurs never
+run through noteheads or stems.
+";
+}
\version "1.3.110";
\score{
\notes\relative c''{
+\header{
+texidoc="
+Loose:
+";
+}
\score {
\notes { \time 2/2; c'2 c'2 \time 2/2; }
\paper { linewidth = 5.0\cm;
+\header{
+texidoc="
+Natural:
+";
+}
\score {
\notes { \time 2/2; c'2 c'2 \time 2/2; }
+\header{
+texidoc="
+If there are accidentals in the music, we add space, but the space
+between note and accidentals is less than between the notes with the
+same value. Clef changes also get extra space, but not as much as
+barlines.
+Even if a line is very tightly spaced, there will still be room
+between prefatory matter and the following notes. The space after the
+prefatory is very rigid. In contrast, the space before the barline
+must stretch like the space within the measure.
+
+Tight:
+";
+}
\score {
\notes { \time 2/2; f''2 c'2 \time 2/2; }
\paper { linewidth = 2.5 \cm;
+\header{
+texidoc="
+The staccato dot (and all scripts with follow-into-staff set), must
+not be on staff lines.
+";
+}
\score {
\context Voice \notes\relative c {
+\header{
+texidoc="
+Staff margins are also markings attached to barlines. They should be
+left of the staff, and be centered vertically wrt the staff. They may
+be on normal staffs, but also on compound staffs, like the PianoStaff
+";
+}
\version "1.3.110";
+\header{
+texidoc="
+@c FIXME
+Similarly, if @code{stem_default_neutral_direction} is set to @code{-1}.
+";
+}
+
\score{
\notes\relative c{
b''4 ~ b8()b8 e4 e,
+\header{
+texidoc="
+Beams, stems and noteheads often have communication troubles, since
+the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
+point) are mixed.
+
+Stems, beams, ties and slurs should behave similarly, when placed
+on the middle staff line. Of course stem-direction is down for high
+notes, and up for low notes.
+";
+}
+
+
\score {
\context Voice \notes\relative c {
b''4 ~ b8()b8 e4 e,
+\header{
+texidoc="
+In a limited number of cases, LilyPond corrects for optical spacing
+effects. In this example, space for opposite pointed stems is adjuste
+";
+}
\score {
\context Voice \notes\relative c {
+\header{
+texidoc="
+Stem tremolos or rolls are tremolo signs that look like beam segments
+crossing stems. If the stem is in a beam, the tremolo must be parallel
+to the beam. If the stem is invisible (eg. on a whole note), the
+tremolo must be centered on the note.
+";
+}
\version "1.3.110";
\score{
+\header{
+texidoc="
+When tieing notes with accidentals across a bar boundary, the accidental
+must not be drawn on the note in the new bar. Instead, the next note of
+the same pitch in this bar should always show the accidental (even if
+it's natural). Slurring a accidentaled note to a natural one across bar
+boundaries should be explicit.
+
+Pitches can be verified by printing them with the @code{NoteNames} context.
+";
+}
thenotes = \notes \relative cis' { \time 4/4;
gis'2 gis ~ |
-
+\header{
+texidoc="
+When tieing chords, the outer slurs point outwards, the inner slurs
+point away from the center of the staff. Override with
+@code{tieVerticalDirection}.
+";
+}
\version "1.3.110";
t = \notes \relative c' { <c e g> ~ <c e g> }
+\header{
+texidoc="
+Ties are strictly horizontal. They are placed in between note heads.
+The horizontal middle should not overlap with a staffline.
+";
+}
\score{
\notes\relative c''{
%b2~b4~b8~b16~b32~b64 r64\break
+\header{
+texidoc="
+Tuplets are indicated by a bracket with a number. There should be no
+bracket if there is one beam that matches the length of the tuplet.
+The bracket does not interfere with the stafflines, and the number is
+centered in the gap in the bracket.
+";
+}
\score{
\notes \context Voice \relative c'' {
\times 2/3 { \times 2/3 { a8 b c} c }
# * Figure out clean set of options. Hmm, isn't it pretty ok now?
# * add support for .lilyrc
# * EndLilyPondOutput is def'd as vfil. Causes large white gaps.
+# * texinfo: add support for @pagesize
-# todo: dimension handling (all the x2y) is clumsy.
+# todo: dimension handling (all the x2y) is clumsy. (tca: Thats
+# because the values are taken directly from texinfo.tex,
+# geometry.sty and article.cls. Give me a hint, and I'll
+# fix it.)
# This is was the idea for handling of comments:
# Multiline comments, @ignore .. @end ignore is scanned for
program_version = '@TOPLEVEL_VERSION@'
if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
- program_version = '1.3.106'
+ program_version = '1.3.113'
include_path = [os.getcwd()]
class TexiPaper:
def __init__(self):
- self.m_papersize = 'a4'
+ self.m_papersize = 'letterpaper'
self.m_fontsize = 12
def get_linewidth(self):
return texi_linewidths[self.m_papersize][self.m_fontsize]
'executivepaper':{10: 345, 11: 360, 12: 379}}
texi_linewidths = {
- 'a4': {12: 455},
- 'a4wide': {12: 470},
- 'smallbook': {12: 361},
- 'texidefault': {12: 433}}
+ 'afourpaper': {12: mm2pt(160)},
+ 'afourwide': {12: in2pt(6.5)},
+ 'afourlatex': {12: mm2pt(150)},
+ 'smallbook': {12: in2pt(5)},
+ 'letterpaper': {12: in2pt(6)}}
option_definitions = [
('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'),
# should also support fragment in
- 'output-all': r"""@tex
+ 'output-all': r"""
+@include %(fn)s-doc.texi
+@tex
\catcode`\@=12
\input lilyponddefs
\def\EndLilyPondOutput{}
return re_dict[format][name]
def bounding_box_dimensions(fname):
+ if g_outdir:
+ fname = os.path.join(g_outdir, fname)
try:
fd = open(fname)
except IOError:
idx = 0
while 1:
if chunks[idx][0] == 'input':
- if string.find(chunks[idx][1], "@afourpaper") != -1:
- paperguru.m_papersize = 'a4'
- elif string.find(chunks[idx][1], "@afourwide") != -1:
- paperguru.m_papersize = 'a4wide'
- elif string.find(chunks[idx][1], "@smallbook") != -1:
- paperguru.m_papersize = 'smallbook'
+ for s in ('afourpaper', 'afourwide', 'letterpaper',
+ 'afourlatex', 'smallbook'):
+ if string.find(chunks[idx][1], "@%s" % s) != -1:
+ paperguru.m_papersize = s
idx = idx + 1
if idx == 10 or idx == len(chunks):
break
error ('Error command exited with value %d\n' % st)
return st
+
+texidoc_re = re.compile (r'.*?\n\s*texidoc\s*=\s*"((([^"])|([^\\]\\"))*)".*', re.DOTALL)
+def extract_texidoc (lyfile):
+ """
+ Extract the ``texidoc'' entry from the lyfile.ly, and write it to
+ lyfile-doc.texi.
+
+ Maybe this should be output by `lilypond --header=texidoc' or so?
+ """
+ outfile = os.path.basename (os.path.splitext (lyfile)[0]) + "-doc.texi"
+ sys.stderr.write ("Writing `%s'\n" % outfile)
+ f = open (lyfile)
+ s = f.read (-1)
+# doc = re.sub (r'(.|\n)*?\n\s*texidoc\s*=\s*"((([^"])|([^\\]\\"))*)"(.|\n)*', '\\2', s) + '\n'
+ m = texidoc_re.match (s)
+ doc = ''
+ if m:
+ doc = m.group (1) + '\n'
+ f = open (outfile, 'w')
+ f.write (doc)
+ f.close ()
+
def compile_all_files (chunks):
eps = []
tex = []
lilyopts = string.join (incs, ' ' )
texfiles = string.join (tex, ' ')
system ('lilypond %s %s' % (lilyopts, texfiles))
+ for i in tex:
+ extract_texidoc (i)
for e in eps:
system(r"tex '\nonstopmode \input %s'" % e)
system(r"dvips -E -o %s %s" % (e + '.eps', e))
.SUFFIXES: .html .info .texi .texinfo
$(outdir)/%.info: $(outdir)/%.texi
- -$(MAKEINFO) --force --output=$@ $<
+ -$(MAKEINFO) --force -I $(outdir) --output=$@ $<
$(outdir)/%.html: $(outdir)/%.texi
- -$(MAKEINFO) --force --output=$@ --html --no-split --no-headers $<
+ -$(MAKEINFO) --force -I $(outdir) --output=$@ --html --no-split --no-headers $<
# we want footers even if website builds (or is built) partly
$(footify) $@
cd $(outdir); texi2dvi ../$<
$(outdir)/%.txt: $(outdir)/%.texi
- $(MAKEINFO) -I../ --no-split --no-headers --output $@ $<
+ $(MAKEINFO) -I../ -I $(outdir) --no-split --no-headers --output $@ $<
$(outdir)/%.texi: %.texi
rm -f $@