From cae1b39741a43547e3f4add29416f24d681e1156 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 1 Nov 2004 10:11:52 +0000 Subject: [PATCH] * 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. --- ChangeLog | 9 + Documentation/user/cheatsheet.itely | 2 +- Documentation/user/converters.itely | 16 +- Documentation/user/dummy-interfaces.itexi | 2 +- Documentation/user/examples.itely | 858 +++++++++--------- Documentation/user/introduction.itely | 19 +- Documentation/user/invoking.itely | 180 ++-- Documentation/user/lilypond.tely | 4 +- Documentation/user/literature.itely | 2 +- Documentation/user/notation.itely | 44 +- Documentation/user/point-and-click.itely | 15 +- .../user/programming-interface.itely | 2 +- Documentation/user/scheme-tutorial.itely | 2 +- Documentation/user/sound-output.itexi | 4 +- Documentation/user/tutorial.itely | 248 ++--- buildscripts/mf-to-table.py | 159 ++-- 16 files changed, 803 insertions(+), 763 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09c3ace3da..5fcc0f8915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-11-01 Werner Lemberg + + * 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 * Documentation/user/changing-defaults.itely, diff --git a/Documentation/user/cheatsheet.itely b/Documentation/user/cheatsheet.itely index 567ba04554..6f9d9a0908 100644 --- a/Documentation/user/cheatsheet.itely +++ b/Documentation/user/cheatsheet.itely @@ -6,7 +6,7 @@ @appendix Cheat sheet -@multitable @columnfractions .3 .3 .4 +@multitable @columnfractions .35 .3 .35 @item @b{Syntax} @tab @b{Description} diff --git a/Documentation/user/converters.itely b/Documentation/user/converters.itely index 9625d7cce6..bd1e01ae0e 100644 --- a/Documentation/user/converters.itely +++ b/Documentation/user/converters.itely @@ -7,7 +7,7 @@ Music can be entered also by importing it from other formats. This 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. @@ -184,9 +184,9 @@ confuse etf2ly. Sequences of grace notes are ended improperly. @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: @@ -287,14 +287,14 @@ LilyPond itself does not come with support for other formats, but 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 diff --git a/Documentation/user/dummy-interfaces.itexi b/Documentation/user/dummy-interfaces.itexi index 65772d0137..9e2dc6e976 100644 --- a/Documentation/user/dummy-interfaces.itexi +++ b/Documentation/user/dummy-interfaces.itexi @@ -3,4 +3,4 @@ @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} diff --git a/Documentation/user/examples.itely b/Documentation/user/examples.itely index 2ef362378d..97d3aead40 100644 --- a/Documentation/user/examples.itely +++ b/Documentation/user/examples.itely @@ -75,7 +75,7 @@ The first example gives you a staff with notes, suitable for a solo 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 @@ -100,7 +100,7 @@ automatic beaming, which is common for vocal parts. If you want to use 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 @@ -131,7 +131,7 @@ text = \lyricmode { 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 @@ -164,7 +164,7 @@ harmonies = \chordmode { 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 @@ -205,7 +205,7 @@ harmonies = \chordmode { Here is a simple piano staff. -@lilypond[verbatim,raggedright] +@lilypond[quote,verbatim,raggedright] \version "2.3.22" upper = \relative c'' { \clef treble @@ -239,7 +239,7 @@ lower = \relative c { 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 @@ -295,7 +295,7 @@ lower = \relative c { 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 @@ -343,7 +343,7 @@ staffs. This requires a bit of tweaking to implement, but 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 @@ -435,7 +435,7 @@ pedal = { 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 @@ -491,7 +491,7 @@ it's often useful to include a section which is included in all 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 @@ -530,15 +530,19 @@ bassWords = \lyricmode { \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 @@ -549,7 +553,8 @@ bassWords = \lyricmode { \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) } } @@ -571,217 +576,223 @@ mensural music; in fact, the meter often changed after every few 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 @@ -805,7 +816,7 @@ is within a @code{\transpose} section. @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" @@ -813,8 +824,10 @@ is within a @code{\transpose} section. 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) @@ -823,14 +836,14 @@ is within a @code{\transpose} section. %%%%%%%%%%%% 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. @@ -840,223 +853,220 @@ jzchords = { } %%%%%%%%%%%% 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 4 hh hh 4 - hh4 4 - hh4 4 - hh4 4 + hh4 4 hh hh 4 + hh4 4 + hh4 4 + hh4 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 @@ -1072,51 +1082,51 @@ violin concerto as TchaikovskyPI, whereas perhaps you wish to print "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 @@ -1126,26 +1136,25 @@ music. Gregorian music has no measure, no stems; it uses only half and 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 @@ -1158,7 +1167,7 @@ completely. This template defines a large number of small segments 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'] } } @@ -1184,39 +1193,38 @@ gdcg = { \grace { g'32[ 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 diff --git a/Documentation/user/introduction.itely b/Documentation/user/introduction.itely index 153fc82da3..108340284c 100644 --- a/Documentation/user/introduction.itely +++ b/Documentation/user/introduction.itely @@ -127,12 +127,12 @@ The fragment only uses quarter notes: notes that are played in a 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 @@ -798,12 +798,13 @@ The location of the documentation files that are mentioned here can 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 @@ -817,7 +818,7 @@ usually found in the directory @file{/usr/share/lilypond/}. 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 diff --git a/Documentation/user/invoking.itely b/Documentation/user/invoking.itely index 7f3dbfcd69..d3feb6b4a7 100644 --- a/Documentation/user/invoking.itely +++ b/Documentation/user/invoking.itely @@ -4,13 +4,13 @@ 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 @@ -24,7 +24,7 @@ This chapter details the technicalities of running 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 @@ -71,52 +71,64 @@ There are other output options, but they are intended for developers. @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 @@ -131,21 +143,21 @@ Be verbose: show full paths of all files read, and give timing 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 @@ -157,13 +169,13 @@ run it yourself. 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 @@ -172,7 +184,7 @@ either script. 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 @@ -211,7 +223,7 @@ Different error messages can appear while compiling a file: @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. @@ -257,16 +269,16 @@ be linked to some part of the input file, then error messages have the 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 @@ -291,31 +303,30 @@ problem. Don't forget to tell which version of LilyPond you use! Send 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 @@ -325,7 +336,7 @@ Using Mac OSX 10.3.5, fink package lilypond-unstable @cindex editors @cindex vim @cindex emacs -@cindex modes, editor +@cindex modes, editor @cindex syntax coloring @cindex coloring, syntax @@ -347,8 +358,8 @@ installation instructions. @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 @@ -359,7 +370,7 @@ installation instructions. @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. @@ -386,7 +397,7 @@ La@TeX{} options or formatting codes in markup texts. 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 @@ -396,18 +407,23 @@ 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 @@ -415,27 +431,30 @@ files. The temporary directory is created in the current directory as @code{@co @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 @@ -444,48 +463,45 @@ by supplying a @code{--set} command line option. @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 - - - diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 9430a7b369..2c2d0dbf56 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -163,8 +163,8 @@ This is the user manual for GNU LilyPond 2.3.x series. @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 diff --git a/Documentation/user/literature.itely b/Documentation/user/literature.itely index b561b48b9b..143d8c0596 100644 --- a/Documentation/user/literature.itely +++ b/Documentation/user/literature.itely @@ -58,5 +58,5 @@ practices. @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. diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 63e9d4ddaa..6c1756acfe 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -85,7 +85,7 @@ names. The notes are specified by the letters @code{a} through 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 @@ -320,7 +320,7 @@ 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 @@ -348,9 +348,7 @@ If the duration is omitted then it is set to the previously entered 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 @@ -607,11 +605,14 @@ larger: a single error puts the rest of the piece off by one octave @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 @@ -1001,7 +1002,7 @@ This command is equivalent to setting @code{clefGlyph}, 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 @@ -1626,7 +1627,7 @@ all 16th or shorter beams at beat positions, as defined by the @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] @@ -1683,7 +1684,7 @@ In normal time signatures, automatic beams can start on any note but can only end in a few positions within the measure: beams can end on a beat, or at durations specified by the properties in @code{autoBeamSettings}. The defaults for @code{autoBeamSettings} -are defined in @file{scm/@/auto@/-beam.scm}. +are defined in @file{scm/@/auto@/-beam@/.scm}. The value of @code{autoBeamSettings} is changed with two functions, @example @@ -3150,7 +3151,7 @@ The following variables have been predefined @item drums-style This is the default. It typesets a typical drum kit on a five-line staff -@lilypond[quote,raggedright,noindent] +@lilypond[quote,raggedright] 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 @@ -4342,7 +4343,7 @@ e16 fis gis a b4 \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 @@ -4662,7 +4663,7 @@ Then, 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}. @@ -4741,8 +4742,8 @@ Examples: @inputfileref{input/@/regression,chord@/-name@/-major7@/.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 @@ -5000,7 +5001,7 @@ few measures, it is set to function that produces a boxed number. } @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. @@ -5040,7 +5041,7 @@ behavior 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. @@ -5085,7 +5086,8 @@ Bar numbers can be manually changed by setting the Program reference: @internalsref{BarNumber}. -Examples: @inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly}, +Examples: +@inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly}, and @inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}. @refbugs @@ -6305,7 +6307,7 @@ In addition to the standard articulation signs described in section 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 { @@ -7514,7 +7516,7 @@ initialize all relevant context properties and 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] \include "gregorian-init.ly" \score { << @@ -7549,7 +7551,7 @@ style. These contexts initialize all relevant context properties and 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' { diff --git a/Documentation/user/point-and-click.itely b/Documentation/user/point-and-click.itely index b201ab5e0e..0275dc00b8 100644 --- a/Documentation/user/point-and-click.itely +++ b/Documentation/user/point-and-click.itely @@ -20,13 +20,14 @@ The most obvious choice is Xdvi@footnote{KDVI also provides src 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): @@ -34,8 +35,8 @@ 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? @@ -50,12 +51,12 @@ column location. @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 @@ -91,7 +92,7 @@ insert one line, all following locations will be off by a line. @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 diff --git a/Documentation/user/programming-interface.itely b/Documentation/user/programming-interface.itely index a9377d50db..fc91a4db3f 100644 --- a/Documentation/user/programming-interface.itely +++ b/Documentation/user/programming-interface.itely @@ -212,7 +212,7 @@ functions: 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 diff --git a/Documentation/user/scheme-tutorial.itely b/Documentation/user/scheme-tutorial.itely index bc3c2b3250..2534ef2633 100644 --- a/Documentation/user/scheme-tutorial.itely +++ b/Documentation/user/scheme-tutorial.itely @@ -15,7 +15,7 @@ LilyPond uses the Scheme programming language, both as part of the 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 diff --git a/Documentation/user/sound-output.itexi b/Documentation/user/sound-output.itexi index cd219f33b8..b99d925af9 100644 --- a/Documentation/user/sound-output.itexi +++ b/Documentation/user/sound-output.itexi @@ -27,7 +27,7 @@ settings. Therefore the midi file should not have more than 15 staves 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}. @@ -110,7 +110,7 @@ inserted, for example 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 diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 294ccbdb8a..e487ca2416 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -24,7 +24,7 @@ LilyPond input that was used to generate that image. 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 @@ -68,14 +68,14 @@ of music, a scale. A note can be entered by typing its name, from @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. @@ -88,9 +88,9 @@ a1 a2 a4 a16 a32 @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 @@ -98,12 +98,12 @@ used for the next notes. The duration of the first note in input 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 @@ -111,64 +111,64 @@ Rests are entered just like notes, but with the name @samp{r} @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 @@ -176,10 +176,10 @@ Remember to enclose the notes and commands in curly braces @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 @@ -222,7 +222,7 @@ the file @file{INSTALL.txt}.} In your text editor, enter the following input and save the file as @file{test.ly} @example - @{ c'4 e' g' @} +@{ c'4 e' g' @} @end example @noindent @@ -263,8 +263,8 @@ printing. } 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 @@ -272,7 +272,7 @@ word processor, since these insert formatting codes that will confuse 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 @@ -291,12 +291,12 @@ derived from note naming conventions in Nordic and Germanic languages, 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 @@ -304,17 +304,17 @@ The key signature is set with the command @code{\key}, followed by 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 @@ -336,16 +336,16 @@ not be added automatically, and you must enter what you want to hear. 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 @@ -354,8 +354,8 @@ staff.' Rather, it means: `a note with pitch D-natural.' In the key 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 @@ -385,7 +385,7 @@ A tie is created by appending a tilde @samp{~} to the first note 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}. @@ -399,7 +399,7 @@ 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 @@ -408,7 +408,7 @@ hand. Mark the first note to be beamed with @samp{[} and the last one 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}. @@ -462,10 +462,10 @@ c'4 c'' c''' \clef bass c c, 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 @@ -536,14 +536,14 @@ expression}. We have already seen in the previous examples; 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 @@ -553,7 +553,7 @@ Here, the expression from the previous example is combined with two 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 @@ -700,7 +700,7 @@ Common accents can be added to a note using a dash (@samp{-}) and a single character @lilypond[fragment,quote,verbatim,relative=2] - c-. c-- c-> c-^ c-+ c-_ +c-. c-- c-> c-^ c-+ c-_ @end lilypond @cindex fingering @@ -708,7 +708,7 @@ Similarly, fingering indications can be added to a note using a dash (@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 @@ -717,14 +717,14 @@ also use multiple articulations on the same note. In most cases, it is 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 @@ -736,7 +736,7 @@ Crescendi and decrescendi are started with the commands @code{\<} and 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 @@ -748,7 +748,7 @@ articulation. The starting note and ending note are marked with @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 @@ -759,7 +759,7 @@ and can be used on larger groups of notes. Slurs and ties can be nested @lilypond[quote,fragment,relative=2] - c2~( c8 fis fis4 ~ fis2 g2) +c2~( c8 fis fis4 ~ fis2 g2) @end lilypond @cindex phrasing slurs @@ -768,7 +768,7 @@ Slurs to indicate phrasing can be entered with @code{\(} and 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 @@ -798,7 +798,7 @@ Chords can be made by surrounding pitches with angle brackets. Angle brackets are the symbols @samp{<} and @samp{>}. @lilypond[quote,relative=1,fragment,verbatim] - r4 4 8 +r4 4 8 @end lilypond @@ -806,16 +806,16 @@ You can combine markings like beams and ties with chords. They must be placed outside the angled brackets @lilypond[quote,relative=1,fragment,verbatim] - r4 8[ ]~ +r4 8[ ]~ @end lilypond @example - r4 8\>( \!) +r4 8\>( \!) @end example @lilypond[quote,relative=1,fragment] - \slurUp - r4 8\>( \!) +\slurUp +r4 8\>( \!) @end lilypond @@ -830,8 +830,8 @@ is followed by a duration: @code{\partial 4} is a quarter note upstep 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 @@ -842,8 +842,8 @@ of music is multiplied by the fraction. Triplets make notes occupy 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 @@ -854,8 +854,8 @@ keyword @code{\appoggiatura} or @code{\acciaccatura} @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 @@ -912,7 +912,7 @@ statement marks for which version of LilyPond the file was written. To mark a file for version 2.4.0, use @example - \version "2.4.0" +\version "2.4.0" @end example @noindent @@ -1013,7 +1013,7 @@ In popular music, it is common to denote accompaniment with chord names. Such chords can be entered like notes, @lilypond[quote,verbatim,raggedright] - \chordmode { c2 f4. g8 } +\chordmode { c2 f4. g8 } @end lilypond @noindent @@ -1024,7 +1024,7 @@ Other chords can be created by adding modifiers after a colon. The 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 @@ -1034,7 +1034,7 @@ but renders the notes in a @code{ChordNames} context, with the 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 @@ -1159,7 +1159,7 @@ but now this entire expression must be interpreted as a @code{PianoStaff} @example - \new PianoStaff << \new Staff @dots{} >> +\new PianoStaff << \new Staff @dots{} >> @end example Here is a small example @@ -1186,7 +1186,7 @@ By using variables, also known as identifiers, it is possible to break up complex music expressions. An identifier is assigned as follows @example - namedMusic = @{ @dots{} @} +namedMusic = @{ @dots{} @} @end example @noindent @@ -1210,20 +1210,20 @@ It is possible to use variables for many other types of objects in the 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 @@ -1242,7 +1242,7 @@ both the part and the score. 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 @{ @@ -1281,10 +1281,10 @@ tuning of a normal French Horn in@tie{}F. The transposition can be seen 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 @@ -1295,14 +1295,14 @@ duration, longer rests can be constructed. For example, this rest 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 @@ -1338,17 +1338,17 @@ that the other voice is in @code{bassoonNotes} in the file 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 diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 7e74af991a..6dc4c268a7 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -1,9 +1,9 @@ #!@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 import os @@ -18,8 +18,8 @@ postfixes = ['log', 'dvi', '2602gf', 'tfm'] 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 = [] @@ -37,14 +37,13 @@ def read_log_file (fn): 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] @@ -57,8 +56,10 @@ def tfm_checksum (fn): 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 = [] @@ -66,7 +67,7 @@ def parse_logfile (fn): group = '' for l in autolines: - tags = string.split(l, '@:') + tags = string.split (l, '@:') if tags[0] == 'group': group = tags[1] elif tags[0] == 'puorg': @@ -76,17 +77,17 @@ def parse_logfile (fn): 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 @@ -94,10 +95,9 @@ def parse_logfile (fn): # 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:] @@ -108,93 +108,99 @@ def parse_logfile (fn): '-') 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 { @@ -203,16 +209,15 @@ def write_fontlist (file, global_info, charmetrics): 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) @@ -221,8 +226,10 @@ def write_deps (file, deps, targets): 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: @@ -234,16 +241,15 @@ 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 = '' @@ -289,14 +295,14 @@ for filenm in files: 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) @@ -307,6 +313,3 @@ for filenm in files: texfile_nm, afmfile_nm]) if lyfile_nm: write_fontlist (open (lyfile_nm, 'w'), g, m) - - - -- 2.39.5