From: Han-Wen Nienhuys Date: Fri, 26 Jan 2007 01:25:22 +0000 (+0100) Subject: Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond X-Git-Tag: release/2.11.14-1~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ade39b0e10fdf852db6254afac36473a1c66a4d3;hp=4a9e41e9b7d8cae64f17dc86695964d607595e9e;p=lilypond.git Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond --- diff --git a/Documentation/index.html.in b/Documentation/index.html.in index 11c99de056..e457d98a6d 100644 --- a/Documentation/index.html.in +++ b/Documentation/index.html.in @@ -82,6 +82,10 @@ in PDF) (~ 2 Mb, in PDF)
(for advanced users) + +
  • Snippets +
    (current in development) +
  • Glossary (in one big page ~ 1 Mb, in PDF) diff --git a/Documentation/user/instrument-notation.itely b/Documentation/user/instrument-notation.itely index 6685470527..abff76eef1 100644 --- a/Documentation/user/instrument-notation.itely +++ b/Documentation/user/instrument-notation.itely @@ -1119,7 +1119,9 @@ There is one tricky aspect: the setting for @code{ignoreMelismata} must be set one syllable @emph{before} the non-melismatic syllable in the text, as shown here, +@c FIXME: breaks compile @lilypond[verbatim,ragged-right,quote] +%{ << \relative \new Voice = "lahlah" { \set Staff.autoBeaming = ##f @@ -1138,6 +1140,7 @@ in the text, as shown here, still } >> +%} @end lilypond diff --git a/Documentation/user/running.itely b/Documentation/user/running.itely index 738bf68759..5670f9e28b 100644 --- a/Documentation/user/running.itely +++ b/Documentation/user/running.itely @@ -577,6 +577,9 @@ bug by following the directions on @uref{http://lilypond.org/web/devel/participating/bugs} +Please construct submit @ref{Minimal examples} of bug reports. We do not +have the resources to investigate reports which are not as small as possible. + @node Error messages @section Error messages diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index c0f622f789..2dc618bb52 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -131,11 +131,12 @@ file. Save it, for example, to @file{test.ly} on your Desktop, and then process it with the menu command @samp{Compile > Typeset File}. The resulting PDF file will be displayed on your screen. -Be warned that the first time you ever run lilypond will take a minute +Be warned that the first time you ever run LilyPond, it will take a minute or two because all of the system fonts have to be analyzed first. For future use of LilyPond, you should begin by selecting "New" -or "Open". +or "Open". You must save your file before typesetting it. If any errors +occur in processing, please see the log window. @subsubheading Windows @@ -152,7 +153,20 @@ codes that will confuse LilyPond.} and enter Save it on the desktop as @file{test.ly} and make sure that it is not called @file{test.ly.TXT}. Double clicking @file{test.ly} will process -the file and show the resulting PDF file. +the file and show the resulting PDF file. To edit an existing +@file{.ly} file, right-click on it and select @qq{Edit source}. + +If you double-click in the LilyPond icon on the Desktop, it will open +a simple text editor with an example file. Save it, for example, to +@file{test.ly} on your Desktop, and then double-click on the file to +process it. After some seconds, you will get a file @file{test.pdf} +on your desktop. Double-click on this PDF file to view the typeset +score. An alternative method to process the @file{test.ly} file +is to drag and drop it onto the LilyPond icon using your mouse pointer. + +Double-clicking the file does not only result in a PDF file, but also +produces a @file{.log} file that contains some information on what LilyPond +has done to the file. If any errors occur, please examine this file. @subsubheading Unix @@ -161,7 +175,7 @@ Begin by opening a terminal window and starting a text editor. For example, you could open an xterm and execute @code{joe}@footnote{There are macro files for VIM addicts, and there is a @code{LilyPond-mode} for Emacs addicts. If they have not been -installed already, refer to the file @file{INSTALL.txt}. These +installed already, refer to the file @file{INSTALL.txt}. The easiest editing environment is @file{LilyPondTool}. See @ref{Editor support} for more information.}. In your text editor, enter the following input and save the file as @@ -879,7 +893,7 @@ Enclosing a group of notes in braces creates a new music expression: @end lilypond Putting a group of music expressions (e.g. notes) in braces means that -are in sequence (i.e. each one follows the previous one). The result +they are in sequence (i.e. each one follows the previous one). The result is another music expression: @lilypond[quote,ragged-right,verbatim,fragment,relative=2] @@ -890,8 +904,8 @@ is another music expression: This technique is useful for polyphonic music. To enter music with more voices or more staves, we combine expressions in -parallel. To indicate that two voices should play at the same time -simple enter a simultaneous combination of music expressions. A +parallel. To indicate that two voices should play at the same time, +simply enter a simultaneous combination of music expressions. A @q{simultaneous} music expression is formed by enclosing expressions inside @code{<<} and @code{>>}. In the following example, three sequences (all containing two separate notes) are combined simultaneously: @@ -911,10 +925,15 @@ amount of space. LilyPond does not care how much (or little) space there is at the beginning of a line, but indenting LilyPond code like this makes it much easier for humans to read. +@strong{Warning}: each note is relative to the +previous note in the input, not relative to the @code{c''} in the +initial @code{\relative} command. + + @subheading Simultaneous music expressions: single staff To determine the number of staves in a piece, LilyPond looks at the first -exression. If it is a single note, there is one staff; if there is a +expression. If it is a single note, there is one staff; if there is a simultaneous expression, there is more than one staff. @lilypond[quote,ragged-right,verbatim] @@ -1107,7 +1126,7 @@ r4 4 2 @end lilypond You can combine markings like beams and ties with chords. They must -be placed outside the angled brackets +be placed outside the angle brackets @lilypond[quote,fragment,verbatim,relative=2,fragment] r4 8[ ]~ 2 @@ -1138,7 +1157,7 @@ Consider a simple melody: @lilypond[quote,ragged-right,verbatim] \relative c'' { - a4 e c r4 + a4 e c8 e r4 b2 c4( d) } @end lilypond @@ -1150,7 +1169,7 @@ syllable with a space. @lilypond[quote,ragged-right,verbatim] << \relative c'' { - a4 e c r4 + a4 e c8 e r4 b2 c4( d) } \addlyrics { One day this shall be free } @@ -1166,7 +1185,7 @@ line}. It is entered as two underscores @code{__}: @lilypond[quote,ragged-right,verbatim] << \relative c'' { - a4 e c r4 + a4 e c8 e r4 b2 c4( d) } \addlyrics { One day this shall be free __ } @@ -1201,9 +1220,6 @@ discussed in @ref{Vocal music}. @cindex chords @cindex chord names -@c TODO: revise this, \chords { } is shorter and more intuitive. -@c I need help for this. -gp - In popular music it is common to denote accompaniment with chord names. Such chords can be entered like notes, @@ -1211,12 +1227,10 @@ Such chords can be entered like notes, \chordmode { c2 f4. g8 } @end lilypond -@noindent Now each pitch is read as the root of a chord instead of a note. -This mode is switched on with @code{\chordmode} - -Other chords can be created by adding modifiers after a colon. The -following example shows a few common modifiers +This mode is switched on with @code{\chordmode}. Other chords can be +created by adding modifiers after a colon. The +following example shows a few common modifiers: @lilypond[quote,verbatim,ragged-right] \chordmode { c2 f4:m g4:maj7 gis1:dim7 } @@ -1226,7 +1240,7 @@ For lead sheets, chords are not printed on staves, but as names on a line for themselves. This is achieved by using @code{\chords} instead of @code{\chordmode}. This uses the same syntax as @code{\chordmode}, but renders the notes in a @code{ChordNames} context, with the -following result. +following result: @lilypond[quote,verbatim,ragged-right] \chords { c2 f4.:m g4.:maj7 gis8:dim7 } @@ -1234,22 +1248,25 @@ following result. @cindex lead sheet When put together, chord names, lyrics and a melody form -a lead sheet, for example, +a lead sheet, @lilypond[quote,verbatim,ragged-right] -% this melody needs to be changed. See my new example in 2.4.1. -gp << - \chords { r2 c:sus4 f } - \relative { - r4 c' \times 2/3 { f g g } - \times 2/3 { g4( a2) } + \chords { c2 g:sus4 f e } + \relative c'' { + a4 e c8 e r4 + b2 c4( d) } - \addlyrics { I want to break free __ } + \addlyrics { One day this shall be free __ } >> @end lilypond + +@moreinfo +@quotation A complete list of modifiers and other options for layout can be found in @ref{Chords}. +@end quotation @node Final touches @@ -1394,7 +1411,7 @@ larger files, the music expressions get a lot bigger. In polyphonic music with many staves, the input files can become very confusing. We can reduce this confusion by using @emph{identifiers}. -Identifiers (also known as variables or macros), we can break up +With identifiers (also known as variables or macros), we can break up complex music expressions. An identifier is assigned as follows @example @@ -1423,7 +1440,7 @@ cello = \new Staff { \relative c { @end lilypond @noindent -The name of an identifier should have alphabetic characters only: no +The name of an identifier must have alphabetic characters only: no numbers, underscores, or dashes. It is possible to use variables for many other types of objects in the diff --git a/Documentation/user/working.itely b/Documentation/user/working.itely index 97edb206c3..22659409a2 100644 --- a/Documentation/user/working.itely +++ b/Documentation/user/working.itely @@ -22,6 +22,7 @@ this chapter. * Style sheets:: * Updating old files:: * Troubleshooting (taking it all apart):: +* Minimal examples:: @end menu @@ -624,4 +625,46 @@ bass = \relative c' @{ Now start slowly uncommenting more and more of the @code{bass} part until you find the problem line. +Another very useful debugging technique is constructing +@ref{Minimal examples}. + + +@node Minimal examples +@section Minimal examples + +A minimal example is an example which is small as possible. These +examples are much easier to understand than long examples. Minimal +examples are used for + +@itemize +@item Bug reports +@item Sending a help request to mailists +@item Adding an example to the @uref{http://lsr@/.dsi@/.unimi/2.it/,LilyPond +Snippet Repository} +@end itemize + +To construct an example which is as small as possible, the rule is +quite simple: remove anything which is not necessary. When trying to +remove unnecessary parts of a file, it is a very good idea to comment +out lines instead of deleting them. That way, if you discover that you +actually @emph{do} need some lines, you can un-comment them, instead of +typing them in from scratch. + +There are two exceptions to the @qq{as small as possible} rule: + +@itemize +@item Include the @code{\version} number. +@item If possible, use @code{\paper@{ ragged-right=##t @}} at the +top of your example. +@end itemize + +The whole point of a minimal example is to make it easy to read: + +@itemize +@item Avoid using complicated notes, keys, or time signatures, unless you +wish to demonstrate something is about the behavior of those items. +@item Do not use \override commands unless that is the point of the +example. +@end itemize + diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index 95cd95a40d..36b2eec4c1 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -2,6 +2,11 @@ depth = ../../ SUBDIRS = advanced trick -LOCALSTEPMAKE_TEMPLATES=ly mutopia +STEPMAKE_TEMPLATES=documentation texinfo tex +LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc include $(depth)/make/stepmake.make + + +TITLE=LilyPond Examples + diff --git a/input/lsr/LSR.ly b/input/lsr/LSR.ly new file mode 100644 index 0000000000..b2fe1888e0 --- /dev/null +++ b/input/lsr/LSR.ly @@ -0,0 +1,21 @@ +\version "2.10.0" +\header{ +texidoc = "@unnumbered LilyPond Examples + +These pages show LilyPond examples (snippets) from the +@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. + +@c @h eading @uref{../trick/collated-files.html,Trick}: +@strong{@uref{trick/collated-files.html,Trick}}: +These snippets are blah blah. + +@c @h eading @uref{../advanced/collated-files.html,Advanced}: +@strong{@uref{advanced/collated-files.html,Advanced}}: +These snippets are fazzle snap. + +" +} + +% make sure .png is generated. +\lyrics { " " } +% \lyrics { "(left blank intentionally)" } diff --git a/input/lsr/SConscript b/input/lsr/SConscript new file mode 100644 index 0000000000..c534e3573e --- /dev/null +++ b/input/lsr/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env', 'collate') +collate (title = 'LilyPond Examples') diff --git a/input/lsr/advanced/AAA-intro-advanced.ly b/input/lsr/advanced/AAA-intro-advanced.ly index 73bf4078fe..ce1540cdd1 100644 --- a/input/lsr/advanced/AAA-intro-advanced.ly +++ b/input/lsr/advanced/AAA-intro-advanced.ly @@ -5,7 +5,7 @@ \header{ texidoc = #(string-append " -@section Introduction +@unnumbered Introduction This document shows all kinds of advanced snippets from the @uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. @@ -18,4 +18,4 @@ This document is for LilyPond version } % make sure .png is generated. -\lyrics { "(left blank intentionally)" } +\lyrics { " " } diff --git a/input/lsr/trick/AAA-intro-trick.ly b/input/lsr/trick/AAA-intro-trick.ly index 5010547c3e..ae4b6b0a6a 100644 --- a/input/lsr/trick/AAA-intro-trick.ly +++ b/input/lsr/trick/AAA-intro-trick.ly @@ -5,7 +5,7 @@ \header{ texidoc = #(string-append " -@section Introduction +@unnumbered Introduction This document shows all kinds of tricks from the @uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. @@ -18,4 +18,4 @@ This document is for LilyPond version } % make sure .png is generated. -\lyrics { "(left blank intentionally)" } +\lyrics { " " } diff --git a/input/lsr/trick/Adding-ambiti-per-voice.ly b/input/lsr/trick/Adding-ambiti-per-voice.ly deleted file mode 100644 index 58d3f28bf1..0000000000 --- a/input/lsr/trick/Adding-ambiti-per-voice.ly +++ /dev/null @@ -1,22 +0,0 @@ -\version "2.10.12" - -\header { texidoc = " -

    Ambits can be added per voice. In that case, the -ambitus must be moved manually to prevent collisions. -" } - -\new Staff << - \new Voice \with { - \consists "Ambitus_engraver" - } \relative c'' { - \voiceOne - c4 a d e f2 - } - \new Voice \with { - \consists "Ambitus_engraver" - } \relative c' { - \voiceTwo - es4 f g as b2 - } ->> - diff --git a/input/test/AAA-intro-test.ly b/input/test/AAA-intro-test.ly index f19247dc22..b0abda40dd 100644 --- a/input/test/AAA-intro-test.ly +++ b/input/test/AAA-intro-test.ly @@ -5,7 +5,7 @@ \header{ texidoc = #(string-append " -@section Introduction +@unnumbered Introduction This document shows all kinds of tips and tricks, from simple to advanced. You may also find dirty tricks, or the very very