]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
authorJohn Mandereau <john.mandereau@gmail.com>
Sun, 23 Mar 2008 15:27:52 +0000 (16:27 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sun, 23 Mar 2008 15:27:52 +0000 (16:27 +0100)
* 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond:
  Full update of Spanish Po file
  Completing fix of bad cross references -- first attempt

81 files changed:
Documentation/GNUmakefile
Documentation/TRANSLATION
Documentation/fr/user/lilypond-learning.tely
Documentation/fr/user/lilypond-program.tely
Documentation/fr/user/lilypond.tely
Documentation/fr/user/pitches.itely
Documentation/user/editorial.itely
Documentation/user/pitches.itely
buildscripts/buildlib.py [new file with mode: 0644]
buildscripts/check_translation.py
buildscripts/makelsr.py
buildscripts/translations-status.py
input/GNUmakefile
input/lsr/adding-ambiti-per-voice.ly
input/lsr/adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
input/lsr/adding-drum-parts.ly
input/lsr/adding-fingerings-to-a-score-using-markup-objects.ly [new file with mode: 0644]
input/lsr/adding-fingerings-to-a-score.ly [new file with mode: 0644]
input/lsr/adding-fingerings-to-chords.ly [new file with mode: 0644]
input/lsr/adding-parentheses-around-an-expressive-mark-or-chordal-note.ly [new file with mode: 0644]
input/lsr/adding-parentheses-around-an-expressive-mark.ly [deleted file]
input/lsr/adding-volta-brackets-to-additional-staves.ly [new file with mode: 0644]
input/lsr/allowing-fingerings-to-be-printed-inside-the-staff.ly [new file with mode: 0644]
input/lsr/anaylsis-brackets.ly [new file with mode: 0644]
input/lsr/applying-notehead-styles-depending-on-the-step-of-the-scale.ly
input/lsr/blanking-staff-lines-using-the--whiteout-command.ly
input/lsr/breathing-sign.ly
input/lsr/broken-crescendo-hairpin.ly
input/lsr/changing-form-of-multi--measure-rests.ly [new file with mode: 0644]
input/lsr/changing-the-size-of-layout-objects.ly [new file with mode: 0644]
input/lsr/changing-the-size-of-note-heads.ly [new file with mode: 0644]
input/lsr/changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
input/lsr/chant-or-psalms-notation.ly
input/lsr/chords.snippet-list
input/lsr/coloring-elements-of-notation.ly [new file with mode: 0644]
input/lsr/contexts-and-engravers.snippet-list
input/lsr/controlling-the-placement-of-chord-fingerings.ly [new file with mode: 0644]
input/lsr/controlling-tuplet-bracket-visibility.ly
input/lsr/creating-a-sequence-of-notes-on-various-pitches.ly
input/lsr/creating-real-parenthesized-dynamics.ly
input/lsr/default-direction-of-stems-on-the-center-line-of-the-staff.ly [new file with mode: 0644]
input/lsr/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
input/lsr/editorial-and-educational-use.snippet-list
input/lsr/expressive-marks.snippet-list
input/lsr/grid-lines;-adding-vertical-lines-between-staves.ly [new file with mode: 0644]
input/lsr/grid-lines;-changing-their-appearance.ly [new file with mode: 0644]
input/lsr/grid-lines;-emphasizing-rhythms-and-notes-synchronization.ly [new file with mode: 0644]
input/lsr/hiding-notes.ly [new file with mode: 0644]
input/lsr/how-to-add-thumb-fingerings.ly [new file with mode: 0644]
input/lsr/manually-controlling-beam-positions.ly
input/lsr/ottava-text.ly
input/lsr/piano-music.snippet-list
input/lsr/pitches.snippet-list
input/lsr/positioning-multi--measure-rests.ly [new file with mode: 0644]
input/lsr/preventing-extra-naturals-from-being-automatically-added.ly
input/lsr/printing-music-with-different-time-signatures.ly
input/lsr/putting-parentheses-around-a-single-note.ly [new file with mode: 0644]
input/lsr/putting-parentheses-around-non-note-objects.ly [new file with mode: 0644]
input/lsr/repeats.snippet-list
input/lsr/rest-styles.ly
input/lsr/rgb-colors.ly [new file with mode: 0644]
input/lsr/rhythmic-slashes.ly
input/lsr/rhythms.snippet-list
input/lsr/shortening-volta-brackets.ly [new file with mode: 0644]
input/lsr/skips-in-lyric-mode-2.ly
input/lsr/skips-in-lyric-mode.ly
input/lsr/spacing.snippet-list
input/lsr/square-balloons.ly [new file with mode: 0644]
input/lsr/staff-notation.snippet-list
input/lsr/strings.snippet-list
input/lsr/template.snippet-list
input/lsr/text.snippet-list
input/lsr/tweaks-and-overrides.snippet-list
input/lsr/vocal-music.snippet-list
input/new/changing-form-of-multi--measure-rests.ly [new file with mode: 0644]
input/new/positioning-multi--measure-rests.ly [new file with mode: 0644]
input/texidocs/GNUmakefile [new file with mode: 0644]
input/texidocs/preventing-extra-naturals-from-being-automatically-added.texidoc [new file with mode: 0644]
ly/property-init.ly
make/lilypond-vars.make
scripts/lilypond-book.py

index 8f7228053ec2bc593c38b2a0408839f28c8f567f..dbf4805d50c3dd3b45b38566e0c5028a2517b270 100644 (file)
@@ -30,7 +30,7 @@ txt-to-html:
 po-update:
        make -C po po-update
 
-all-translations-update: po-update
+all-translations-update: po-update translation-status
        $(foreach lang, $(LANGS), make ISOLANG=$(lang) skeleton-update snippet-update &&) true
 
 ifneq ($(ISOLANG),)
@@ -43,14 +43,13 @@ new-lang:
        cp fr/GNUmakefile $(ISOLANG)
        cp fr/user/GNUmakefile $(ISOLANG)/user
        sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
-       $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond.tely
+       $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond-learning.tely
        mv $(outdir)/*.*tely $(ISOLANG)/user
        msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
        cp po/lilypond-doc.pot po/$(ISOLANG).po
        @echo "***  Please add a language definition for $(ISOLANG) in buildscripts/langdefs.py  ***"
 
-check-translation:
-       find $(ISOLANG)/user/ -maxdepth 1 -name '*.*te??' | xargs $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(ISOLANG)/index.html.in
+CHECKED_FILES = $(ISOLANG)/index.html.in $(shell find $(ISOLANG)/user/ -maxdepth 1 -name '*.*te??')
 
 TELY_FILES = $(call src-wildcard,$(ISOLANG)/user/*.tely)
 skeleton-update:
@@ -59,8 +58,15 @@ skeleton-update:
 
 snippet-update:
        $(PYTHON) $(buildscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely'
+
 endif
 
+check-translation:
+       $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(CHECKED_FILES)
+
+update-translation:
+       $(PYTHON) $(buildscript-dir)/check_translation.py --update $(buildscript-dir) $(CHECKED_FILES)
+
 translation-status:
        make -C po out=www messages
        $(PYTHON) $(buildscript-dir)/translations-status.py $(buildscript-dir) po/out-www
index 56d6e5e3bca72a566df2385271047fe3e3b7c2ac..1749045d49e4b0ec4431ed7d7e42fa1d303a1c79 100644 (file)
@@ -129,14 +129,14 @@ rules used in this file are different in your language.
 66    user/strings.itely
 242   user/bagpipes.itely
 4289  user/ancient.itely
-2502  user/input.itely -- Input syntax
+2458  user/input.itely -- Input syntax
 2164  user/non-music.itely -- Non-musical notation
 8399  user/spacing.itely -- Spacing issues
-5107  user/changing-defaults.itely -- Changing defaults
+5149  user/changing-defaults.itely -- Changing defaults
 4547  user/programming-interface.itely -- Interfaces for programmers
 935   user/notation-appendices.itely -- Notation manual tables
 250   user/cheatsheet.itely -- Cheat sheet
-53641 total
+53639 total
 
 -5- Application usage
 2917  user/lilypond-book.itely -- LilyPond-book
@@ -155,7 +155,7 @@ Please follow all these instructions with care to ensure quality work.
 
 All files should be encoded in UTF-8.
 
-* USER MANUAL
+* LEARNING MANUAL AND OTHER TEXINFO DOCUMENTATION
 
 Any title which comes with one of the following commands must not be
 translated directly in the Texinfo source
@@ -202,6 +202,22 @@ Otherwise the music snippet would be reset to the same contents as the
 English version at next 'make snippet-update' run (see UPDATING A
 TRANSLATION below).
 
+When you encounter
+
+  @lilypondfile[<number of fragment options>,texidoc]{FILENAME.ly}
+
+in the source, open input/lsr/FILENAME.ly, translate the texidoc
+string it contains, enclose it with 'texidoc<MY-LANGUAGE> = "' and
+'"', and write it into input/texidocs/FILENAME.texidoc -- please keep
+possibly existing translations in other languages!  For instance,
+input/texidocs/FILENAME.texidoc may contain
+
+texidoces = "
+Spanish translation blah
+"
+texidocde = "German translation foo
+"
+
 
 @example blocs need not be verbatim copies, e.g. variable names,
 file names and comments should be translated.
@@ -214,12 +230,13 @@ please ask the Translation meister and/or the Documentation Editor on
 lilypond-devel@gnu.org.
 
 
-* PROGRAM USAGE MANUAL
+* REFERENCE NOTATION AND PROGRAM USAGE MANUAL
 
-Copy user/lilypond-program.tely into <MY-LANGUAGE>/user, then
-translate this file and run skeleton-update (see UPDATE A TRANSLATION
-below).  Your are now ready to translate program usage manual exactly
-like the user manual.
+Copy user/lilypond.tely (or user/lilypond-program.tely, respectively)
+into <MY-LANGUAGE>/user, then translate this file and run
+skeleton-update (see UPDATE A TRANSLATION below).  Your are now ready
+to translate notation reference (program usage manual, respectively)
+exactly like the learning manual.
 
 
 * DOCUMENTATION INDEX index.html.in
@@ -237,14 +254,45 @@ replace 'make' with 'make -C Documentation') and run
     make ISOLANG=<MY_LANGUAGE> check-translation
 
 This presents a diff of the original files since the most recent
-revision of the translation.  To check a single file, run
+revision of the translation.  To check a single file, cd into
+Documentation and run
+
+    make CHECKED_FILES=<MY-LANGUAGE>/user/foo.itely check-translation
+
+
+Small tip: to see only which files need to be updated, do
+
+    make ISOLANG=<MY_LANGUAGE> check-translation | grep 'diff --git'
 
-    python buildscripts/check_translation.py buildscripts Documentation/<MY-LANGUAGE>/user/foo.itely
 
+Global state of the translation is recorded in
+Documentation/translations.html.in, which is used to generate
+Translations status page.  To update that page, do from Documentation/
+
+    make translation-status
+
+This will also leave out/translations-status.txt, which contains
+up-to-dateness percentages for each translated file.
 
 
 UPDATE A TRANSLATION
 
+Instead of running check-translation, you can run update-translation,
+which will run your favorite text editor to update files.  First, make
+sure environment variable EDITOR is set to a text editor command, then
+run from Documentation
+
+    make ISOLANG=<MY-LANGUAGE> update-translation
+
+or to update a single file
+
+    make CHECKED_FILES=<MY-LANGUAGE>/user/foo.itely update-translation
+
+For each file to be udpated, update-translation will open your text
+editor with this file and a diff of the file in English; if the diff
+cannot be generated or is bigger than the file in English itself, the
+full file in English will be opened instead.
+
 Texinfo skeleton files, i.e. .itely files not yet translated,
 containing only the Texinfo structure can be updated automatically:
 whenever 'make check-translation' shows that such files should be
@@ -302,3 +350,5 @@ before calling texi2pdf
 and documentation in other languages
 * update-snippets.py -- synchronize ly snippets with those from
 English docs
+* translations-status.py -- update translations status pages and word
+counts in the file you are reading
index 646db44a20e2ea049083434d7faace3f5204fcdb..36666791cc392c060807e22d463034e662d3b5c9 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
 @ignore
-    Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
+    Translation of GIT committish: 6a56196b4b7dc895e7be90159f3b0fb94650fb9b
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  See TRANSLATION for details.
@@ -25,7 +25,7 @@
 @c don't remove this comment.
 @ignore
 @omfcreator Han-Wen Nienhuys, Jan Nieuwenhuizen and Graham Percival
-@omfdescription User manual of the LilyPond music engraving system
+@omfdescription Learning Manual of the LilyPond music engraving system
 @omftype program usage
 @omfcategory Applications|Publishing
 @omflanguage French
index 1db7f1862cc9e383f8fba10e1b36f977ef444c18..2655d490fb232b1375fb82b336134380108ae419 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
 @ignore
-    Translation of GIT committish: a8a6ce84e2b7d1bdda6d3cad2f15e6c380edad11
+    Translation of GIT committish: 6a56196b4b7dc895e7be90159f3b0fb94650fb9b
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  See TRANSLATION for details.
@@ -24,7 +24,7 @@
 @c don't remove this comment.
 @ignore
 @omfcreator Han-Wen Nienhuys, Jan Nieuwenhuizen and Graham Percival
-@omfdescription User manual of the LilyPond music engraving system
+@omfdescription Program Usage of the LilyPond music engraving system
 @omftype user manual
 @omfcategory Applications|Publishing
 @omflanguage French
index 98a082aedc7b2b1e3dc7f9ccf94c2b680726f604..89024223bbda38649115428dd06e5010b11f36cf 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
 @ignore
-    Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
+    Translation of GIT committish: 6a56196b4b7dc895e7be90159f3b0fb94650fb9b
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  See TRANSLATION for details.
index fc269ae52d005507307ec27b37c58a3301e89964..4e9774f2e27afee0584ec4e6a6d6c937d5363f7d 100644 (file)
 @node Pitches
 @section Pitches
 
-This section discusses how to specify the pitch of notes.
+@lilypondfile[quote]{pitches-headword.ly}
+
+Cette section détaille la façon d'indiquer les hauteurs de notes, sous
+trois aspects : la saisie des hauteurs, la modification des hauteurs
+et les options de gravure.
 
 @menu
 * Writing pitches::             
@@ -25,7 +29,7 @@ This section discusses how to specify the pitch of notes.
 @node Writing pitches
 @subsection Writing pitches
 
-Intro text.
+Cette section
 
 @menu
 * Normal pitches::              
@@ -124,19 +128,10 @@ d e fis g
 @end lilypond
 
 
-@commonprop
-
-En accord avec les règles standards de l'écriture musicale, on imprime
-un bécarre avant un dièse ou un bémol si on a besoin d'annuler une
-altération précédente.  Pour modifier ce comportement, spécifiez
-@code{\set Staff.extraNatural = ##f}
-
-@lilypond[fragment,quote,ragged-right,verbatim,relative=2]
-ceses4 ces cis c
-\set Staff.extraNatural = ##f
-ceses4 ces cis c
-@end lilypond
+@snippets
 
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
+{preventing-extra-naturals-from-being-automatically-added.ly}
 
 @seealso
 
index 5662464763be77f6511b9a0cac21e75a23f5ab54..4821619aac44cd14521a921c6200348a84e11887 100644 (file)
@@ -77,7 +77,9 @@ so that only certain layout objects are affected.
 c4.-> d8---3
 \override NoteHead #'font-size = #-4
 c4.-> d8---3
-\override Script #'font-size = #3
+\override Script #'font-size = #2
+c4.-> d8---3
+\override Stem #'font-size = #-5
 c4.-> d8---3
 @end lilypond
 
@@ -432,19 +434,19 @@ notes.
 \layout {
   \context {
     \Staff
-    \consists "Grid_point_engraver" 
     % sets up grids
-    gridInterval = #(ly:make-moment 1 4)
+    \consists "Grid_point_engraver" 
     % this sets the grid interval to 1 quarternote (crotchet)
-  }
+    gridInterval = #(ly:make-moment 1 4)
+      }
 }
 
 \new Score \with {
-  \consists "Grid_line_span_engraver"
   %% by default this centers grid lines horizontally below and to the 
   % left side of the notehead, the grid lines extend from 
   % the middle lines of each staff
-}
+  \consists "Grid_line_span_engraver"
+  }
 
 \new ChoirStaff <<
   \new Staff {
@@ -472,17 +474,15 @@ To change the grid lines use \override.
   \context {
     \Staff
     \consists "Grid_point_engraver" 
-    % sets up grids
-    gridInterval = #(ly:make-moment 1 4)
-    % this sets the grid interval to 1 quarternote (crotchet)
-  }
+      gridInterval = #(ly:make-moment 1 4)
+    }
 }
      
 \new Score \with {
   \consists "Grid_line_span_engraver"
-  \override NoteColumn #'X-offset = #-0.5
   % this moves them to the right half a staff space
-}
+  \override NoteColumn #'X-offset = #-0.5
+  }
      
 \new ChoirStaff <<
  \new Staff {
@@ -493,8 +493,8 @@ To change the grid lines use \override.
   }
   \new Staff {
     \relative c {
-      \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
       % this moves them up one staff space from the default position
+      \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
       \stemDown
       \clef bass
       \once \override Score.GridLine #'thickness = #5.0
index 9960d83ca746eb22dac2adff68e797cd67a78172..55e99d76d46cf4f766c9866b5a6f415c9dd6816a 100644 (file)
@@ -1890,7 +1890,7 @@ the base of the scale is determined by the @code{\key} command.
 @snippets
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
-{applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
+{applying-notehead-styles-depending-on-the-step-of-the-scale.ly}
 
 @noindent
 To see all note head styles, see @ref{Note head styles}.
diff --git a/buildscripts/buildlib.py b/buildscripts/buildlib.py
new file mode 100644 (file)
index 0000000..11dbf96
--- /dev/null
@@ -0,0 +1,41 @@
+#!@PYTHON@
+
+import subprocess
+import re
+
+verbose = False
+
+def read_pipe (command):
+    child = subprocess.Popen (command,
+                              stdout = subprocess.PIPE,
+                              stderr = subprocess.PIPE,
+                              shell = True)
+    (output, error) = child.communicate ()
+    code = str (child.wait ())
+    if not child.stdout or child.stdout.close ():
+        print "pipe failed: %(command)s" % locals ()
+    if code != '0':
+        error = code + ' ' + error
+    return (output, error)
+
+revision_re = re.compile ('GIT [Cc]ommittish: ([a-f0-9]+)')
+vc_diff_cmd = 'git diff %(color_flag)s %(revision)s HEAD -- %(original)s | cat'
+
+def check_translated_doc (original, translated_contents, color=False):
+    m = revision_re.search (translated_contents)
+    if not m:
+        sys.stderr.write ('error: ' + translated + \
+                          ": no 'GIT committish: <hash>' found.\nPlease check " + \
+                          'the whole file against the original in English, then ' + \
+                          'fill in HEAD committish in the header.\n')
+        sys.exit (1)
+    revision = m.group (1)
+
+    if color:
+        color_flag = '--color'
+    else:
+        color_flag = '--no-color'
+    c = vc_diff_cmd % vars ()
+    if verbose:
+        sys.stderr.write ('running: ' + c)
+    return read_pipe (c)
index 55a384ee99b9c120f8e9884d9e76a6117eb48e5c..6952b2c34fcf53bdb661c3f30ddec43db19b95fc 100644 (file)
@@ -2,9 +2,7 @@
 
 import __main__
 import optparse
-import gettext
 import os
-import re
 import sys
 
 verbose = 0
@@ -16,27 +14,7 @@ def dir_lang (file, lang, lang_dir_index):
     path_components[lang_dir_index] = lang
     return os.path.join (*path_components)
 
-##     Translation of GIT Commit: <hash>
-REVISION_RE = re.compile ('GIT [Cc]ommittish: ([a-f0-9]+)')
-CVS_DIFF = 'git diff %(revision)s HEAD -- %(original)s | cat'
-
-def check_file (original, translated):
-    s = open (translated).read ()
-    m = REVISION_RE.search (s)
-    if not m:
-        sys.stderr.write ('error: ' + translated + \
-                          ": no 'GIT committish: <hash>' found.\nPlease check " + \
-                          'the whole file against the original in English, then ' + \
-                          'fill in HEAD committish in the header.\n')
-        sys.exit (1)
-    revision = m.group (1)
-
-    c = CVS_DIFF % vars ()
-    if verbose:
-        sys.stderr.write ('running: ' + c)
-    os.system (c)
-
-def do_file (file_name, lang_codes):
+def do_file (file_name, lang_codes, buildlib):
     if verbose:
         sys.stderr.write ('%s...\n' % file_name)
     split_file_name = file_name.split ('/')
@@ -53,19 +31,35 @@ def do_file (file_name, lang_codes):
         raise Exception ('cannot determine language for ' + file_name)
     
     original = dir_lang (file_name, '', lang_dir_index)
-    translated = file_name
-    check_file (original, translated)
+    translated_contents = open (file_name).read ()
+    (diff_string, error) = buildlib.check_translated_doc (original, translated_contents, color=not update_mode)
+
+    if error:
+            sys.stderr.write ('warning: %s: %s' % (file_name, error))
+
+    if update_mode:
+        if error or len (diff_string) >= os.path.getsize (original):
+            buildlib.read_pipe (text_editor + ' ' + file_name + ' ' + original)
+        elif diff_string:
+            diff_file = original + '.diff'
+            f = open (diff_file, 'w')
+            f.write (diff_string)
+            f.close ()
+            buildlib.read_pipe (text_editor + ' ' + file_name + ' ' + diff_file)
+            os.remove (diff_file)
+    else:
+        sys.stdout.write (diff_string)
 
 def usage ():
     sys.stdout.write (r'''
 Usage:
-check-translation [--language=LANG] [--verbose] BUILDSCRIPT-DIR FILE...
+check-translation [--language=LANG] [--verbose] [--update] BUILDSCRIPT-DIR FILE...
 
 This script is licensed under the GNU GPL.
 ''')
 
 def do_options ():
-    global lang, verbose
+    global lang, verbose, update_mode
 
     p = optparse.OptionParser (usage="check-translation [--language=LANG] [--verbose] FILE...",
                                description="This script is licensed under the GNU GPL.")
@@ -78,21 +72,35 @@ def do_options ():
                   default=False,
                   dest="verbose",
                   help="the GIT directory to merge.")
+    p.add_option ('-u', "--update",
+                  action='store_true',
+                  default=False,
+                  dest='update_mode',
+                  help='call $EDITOR to update the translation')
     
     (options, files) = p.parse_args ()
     verbose = options.verbose
     lang = options.language
+    update_mode = options.update_mode
     
     return (files[0], files[1:])
 
 def main ():
+    global update_mode, text_editor
+
     import_path, files = do_options ()
+    if 'EDITOR' in os.environ.keys ():
+        text_editor = os.environ['EDITOR']
+    else:
+        update_mode = False
     
     sys.path.append (import_path)
     import langdefs
+    import buildlib
+    buildlib.verbose = verbose
 
     for i in files:
-        do_file (i, langdefs.LANGDICT.keys())
+        do_file (i, langdefs.LANGDICT.keys(), buildlib)
 
 if __name__ == '__main__':
     main ()
index 265bbb6b839964d3c4b11491b6ae182b9d94d49b..a5fd48013e4e6f12af5c15dcb6c4d6c0616ba745 100755 (executable)
@@ -20,6 +20,7 @@ LY_HEADER_NEW = '''%% Do not edit this file; it is auto-generated from input/new
 
 DEST = os.path.join ('input', 'lsr')
 NEW_LYS = os.path.join ('input', 'new')
+TEXIDOCS = os.path.join ('input', 'texidocs')
 
 TAGS = []
 # NR 1
@@ -56,11 +57,11 @@ end_header_re = re.compile ('(\\header {.+?(?:"\\s*|\\s+)}\n)\n', re.M | re.S)
 def mark_verbatim_section (ly_code):
        return end_header_re.sub ('\\1% begin verbatim\n', ly_code, 1)
 
-# add tags to ly files from LSR
-add_tags_re = re.compile ('\\header\\s*{', re.M)
+begin_header_re = re.compile ('\\header\\s*{', re.M)
 
+# add tags to ly files from LSR
 def add_tags (ly_code, tags):
-       return add_tags_re.sub ('\\g<0>\n  lsrtags = "' + tags + '"\n', ly_code, 1)
+       return begin_header_re.sub ('\\g<0>\n  lsrtags = "' + tags + '"\n', ly_code, 1)
 
 def copy_ly (srcdir, name, tags):
        global unsafe
@@ -68,19 +69,28 @@ def copy_ly (srcdir, name, tags):
        dest = os.path.join (DEST, name)
        tags = ', '.join (tags)
        s = open (os.path.join (srcdir, name)).read ()
+
+       texidoc_translations_path = os.path.join (TEXIDOCS,
+                                                 os.path.splitext (name)[0] + '.texidoc')
+       if os.path.exists (texidoc_translations_path):
+               texidoc_translations = open (texidoc_translations_path).read ()
+               s = begin_header_re.sub ('\\g<0>\n' + texidoc_translations, s, 1)
+
        if in_dir in srcdir:
                s = LY_HEADER_LSR + add_tags (s, tags)
        else:
                s = LY_HEADER_NEW + s
+
        s = mark_verbatim_section (s)
        open (dest, 'w').write (s)
-       e = os.system('convert-ly -e ' + dest)
+
+       e = os.system ("convert-ly -e '%s'" % dest)
        if e:
                unconverted.append (dest)
        if os.path.exists (dest + '~'):
                os.remove (dest + '~')
        # -V seems to make unsafe snippets fail nicer/sooner
-       e = os.system ('nice lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest ' + dest)
+       e = os.system ("lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest '%s'" % dest)
        if e:
                unsafe.append (dest)
 
index b9f62a706f84e0964649259062b53051f850a54c..7a8d8bb225330c1232fb5239160c8e1ce65802c9 100644 (file)
@@ -18,7 +18,6 @@ import re
 import string
 import os
 import gettext
-import subprocess
 
 def progress (str):
     sys.stderr.write (str + '\n')
@@ -32,6 +31,7 @@ _doc = lambda s: s
 
 sys.path.append (buildscript_dir)
 import langdefs
+import buildlib
 
 # load gettext messages catalogs
 translation = {}
@@ -39,18 +39,6 @@ for l in langdefs.LANGUAGES:
     if l.enabled and l.code != 'en':
         translation[l.code] = gettext.translation('lilypond-doc', localedir, [l.code]).gettext
 
-def read_pipe (command):
-    child = subprocess.Popen (command,
-                              stdout = subprocess.PIPE,
-                              stderr = subprocess.PIPE,
-                              shell = True)
-    (output, error) = child.communicate ()
-    code = str (child.wait ())
-    if not child.stdout or child.stdout.close ():
-        print "pipe failed: %(command)s" % locals ()
-    if code != '0':
-        error = code + ' ' + error
-    return (output, error)
 
 comments_re = re.compile (r'^@ignore\n(.|\n)*?\n@end ignore$|@c .*?$', re.M)
 space_re = re.compile (r'\s+', re.M)
@@ -59,7 +47,6 @@ node_re = re.compile ('^@node .*?$', re.M)
 title_re = re.compile ('^@(top|chapter|(?:sub){0,2}section|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?) (.*?)$', re.M)
 include_re = re.compile ('^@include (.*?)$', re.M)
 
-committish_re = re.compile ('GIT [Cc]ommittish: ([a-f0-9]+)')
 translators_re = re.compile (r'^@c\s+Translators\s*:\s*(.*?)$', re.M | re.I)
 checkers_re = re.compile (r'^@c\s+Translation\s*checkers\s*:\s*(.*?)$', re.M | re.I)
 status_re = re.compile (r'^@c\s+Translation\s*status\s*:\s*(.*?)$', re.M | re.I)
@@ -67,8 +54,6 @@ post_gdp_re = re.compile ('post.GDP', re.I)
 untranslated_node_str = 'UNTRANSLATED NODE: IGNORE ME'
 skeleton_str = '-- SKELETON FILE --'
 
-diff_cmd = 'git diff --no-color %(committish)s HEAD -- %(original)s | cat'
-
 format_table = {
     'not translated': {'color':'d0f0f8', 'short':_doc ('no'), 'abbr':'NT',
                        'long':_doc ('not translated')},
@@ -239,14 +224,7 @@ class TranslatedTelyDocument (TelyDocument):
         self.translation_percentage = 100 * translation_word_count / master_total_word_count
 
         ## calculate how much the file is outdated
-        m = committish_re.search (self.contents)
-        if not m:
-            sys.stderr.write ('error: ' + filename + \
-                                  ": no 'GIT committish: <hash>' found.\nPlease check " + \
-                                  'the whole file against the original in English, then ' + \
-                                  'fill in HEAD committish in the header.\n')
-            sys.exit (1)
-        (diff_string, error) = read_pipe (diff_cmd % {'committish':m.group (1), 'original':masterdocument.filename})
+        (diff_string, error) = buildlib.check_translated_doc (masterdocument.filename, self.contents)
         if error:
             sys.stderr.write ('warning: %s: %s' % (self.filename, error))
             self.uptodate_percentage = None
@@ -410,7 +388,7 @@ def update_category_word_counts_sub (m):
 
 progress ("Reading documents...")
 
-tely_files = read_pipe ("find -maxdepth 2 -name '*.tely'")[0].splitlines ()
+tely_files = buildlib.read_pipe ("find -maxdepth 2 -name '*.tely'")[0].splitlines ()
 master_docs = [MasterTelyDocument (os.path.normpath (filename)) for filename in tely_files]
 master_docs = [doc for doc in master_docs if doc.translations]
 
@@ -423,7 +401,7 @@ main_status_page = open ('translations.template.html.in').read ()
 
 progress ("Generating status pages...")
 
-date_time = read_pipe ('LANG= date -u')[0]
+date_time = buildlib.read_pipe ('LANG= date -u')[0]
 
 main_status_html = ' <p><i>Last updated %s</i></p>\n' % date_time
 main_status_html += '\n'.join ([doc.html_status () for doc in master_docs])
index 65db9aaa23497bc0a7917053350f0d31d3e7ed68..f6cc680093fea3aee4dba2727ae8626340fb1bb9 100644 (file)
@@ -1,6 +1,6 @@
 depth = ..
 
-SUBDIRS = regression tutorial mutopia manual lsr new 
+SUBDIRS = regression tutorial mutopia manual lsr new texidocs
 
 examples = typography-demo les-nereides wilhelmus proportional bach-schenker cary
 
index 7f896f243e4f11f22e5edb6da7893e1ddbadda09..b4d3e34c11116f5acbdfdeddbfb4b0739efee7ba 100644 (file)
@@ -21,6 +21,6 @@ manually to prevent collisions.
     \consists "Ambitus_engraver"
   } \relative c' {
     \voiceTwo
-       es4 f g as b1
+    es4 f g as b1
   }
 >>
index d7b5bcf838567b94888d651c7c4ae8583e20d478..899d2503f5583fe6b9d9b7a2e0111610b1df5f48 100644 (file)
@@ -12,13 +12,13 @@ placed after the starting note and its duration, not before. Similarly,
 the right square bracket should directly follow the note which is to be
 at the end of the requested beaming, even if this note happens to be
 inside a tuplet section. This snippet demonstrates how to combine
-manual beaming, manual slurs, ties, and phrasing slurs with tuplet
-sections (enclosed with curly braces). 
+manual beaming, manual slurs, ties and phrasing slurs with tuplet
+sections (enclosed within curly braces). 
 " }
 % begin verbatim
 {
-  r16[ g16 \times 2/3 {r16 e'8] }
-  g16( a \times 2/3 {b d e') }
-  g8[( a \times 2/3 {b d') e'~]}
-  \times 4/5 {e'32\( a b d' e'} a'4.\)
+  r16[ g16 \times 2/3 { r16 e'8] }
+  g16( a \times 2/3 { b d e') }
+  g8[( a \times 2/3 { b d') e']~ }
+  \times 4/5 { e'32\( a b d' e' } a'4.\)
 }
index 2e43f205b2ccb6b90b2ea8fda3db8d2a74a7e6ec..42b4a221227d435effcbc7a1390e3f042e332809 100644 (file)
@@ -12,12 +12,12 @@ clef symbol) and have noteheads according to the drum. You can easily
 attach an extra symbol to the drum, and restrict the number of lines. 
 " }
 % begin verbatim
-drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
-drl = \drummode {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
-timb = \drummode { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb} }
+drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh \repeat unfold 5 { hhc8 hho hhc8 hh16 hh } hhc4 r4 r2 }
+drl = \drummode { \repeat unfold 3 { bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
+timb = \drummode { \repeat unfold 2 { timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb } }
 
 \score {
-  \repeat "volta" 2 {
+  \repeat volta 2 {
     <<
       \new DrumStaff \with {
        drumStyleTable = #timbales-style
@@ -29,8 +29,8 @@ timb = \drummode { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r
       >>
       \new DrumStaff <<
        \set Staff.instrumentName = "drums"
-       \new DrumVoice {\stemUp \drh }
-       \new DrumVoice {\stemDown \drl }
+       \new DrumVoice { \stemUp \drh }
+       \new DrumVoice { \stemDown \drl }
       >>
     >>
   }
@@ -39,7 +39,6 @@ timb = \drummode { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r
     \context {
       \Score
       tempoWholesPerMinute = #(ly:make-moment 120 4)
-      }
     }
+  }
 }
-
diff --git a/input/lsr/adding-fingerings-to-a-score-using-markup-objects.ly b/input/lsr/adding-fingerings-to-a-score-using-markup-objects.ly
new file mode 100644 (file)
index 0000000..c0137ff
--- /dev/null
@@ -0,0 +1,15 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Fingerings can be entered as markup objects, for example to specify
+fingering changes on a single note.
+" }
+% begin verbatim
+\relative c'' {
+  c4-1 d-2 f-4
+  c^\markup { \finger "2 - 3" }
+}
diff --git a/input/lsr/adding-fingerings-to-a-score.ly b/input/lsr/adding-fingerings-to-a-score.ly
new file mode 100644 (file)
index 0000000..27fbc6f
--- /dev/null
@@ -0,0 +1,13 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Fingering instructions can be entered using a simple syntax.
+" }
+% begin verbatim
+\relative c'' {
+  c4-1 d-2 f-4 e-3
+}
diff --git a/input/lsr/adding-fingerings-to-chords.ly b/input/lsr/adding-fingerings-to-chords.ly
new file mode 100644 (file)
index 0000000..a30a2d1
--- /dev/null
@@ -0,0 +1,15 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, chords, piano-music"
+ texidoc = "
+Fingerings for chords can be obtained by adding them to individual
+pitches.
+" }
+% begin verbatim
+\relative c'{
+  < c-1 e-2 g-3 b-5 >2
+  < d-1 f-2 a-3 c-5 >
+}
diff --git a/input/lsr/adding-parentheses-around-an-expressive-mark-or-chordal-note.ly b/input/lsr/adding-parentheses-around-an-expressive-mark-or-chordal-note.ly
new file mode 100644 (file)
index 0000000..0e699be
--- /dev/null
@@ -0,0 +1,19 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "expressive-marks"
+ texidoc = "
+The @code{\\parenthesize} function is a special tweak that encloses
+objects in parentheses. The associated grob is
+@code{Score.ParenthesesItem}. 
+" }
+% begin verbatim
+\relative {
+  c2-\parenthesize ->
+  \override ParenthesesItem #'padding = #0.1
+  \override ParenthesesItem #'font-size = #-4
+  <d \parenthesize fis a> 
+}
+
diff --git a/input/lsr/adding-parentheses-around-an-expressive-mark.ly b/input/lsr/adding-parentheses-around-an-expressive-mark.ly
deleted file mode 100644 (file)
index 7341d4f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.11.38"
-
-\header {
-  lsrtags = "expressive-marks"
- texidoc = "
-The parenthesize function is a special tweak that encloses objects in
-parentheses. The associated grob is Score.ParenthesesItem.
-" }
-% begin verbatim
-\relative {
-  c4 -\parenthesize -.
-  \override ParenthesesItem #'padding = #0.1
-  <d \parenthesize fis a> 
-}
-
diff --git a/input/lsr/adding-volta-brackets-to-additional-staves.ly b/input/lsr/adding-volta-brackets-to-additional-staves.ly
new file mode 100644 (file)
index 0000000..b4567d8
--- /dev/null
@@ -0,0 +1,20 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "repeats"
+ texidoc = "
+The @code{Volta_engraver} by default resides in the Score context, and
+brackets for the repeat are thus normally only printed over the topmost
+staff.  This can be adjusted by adding @code{Volta_engraver} to the
+Staff context where you want the brackets to appear; see also the
+\"Volta multi staff\" snippet.
+" }
+% begin verbatim
+<<
+  \new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
+  \new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
+  \new Staff \with { \consists Volta_engraver } { c'2 g' e' a' }
+  \new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
+ >>
diff --git a/input/lsr/allowing-fingerings-to-be-printed-inside-the-staff.ly b/input/lsr/allowing-fingerings-to-be-printed-inside-the-staff.ly
new file mode 100644 (file)
index 0000000..5e91f03
--- /dev/null
@@ -0,0 +1,16 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, spacing"
+ texidoc = "
+By default, fingering numbers will be printed outside the staff.
+However, this behavior can be cancelled.
+" }
+% begin verbatim
+\relative c' {
+  <c-1 e-2 g-3 b-5>2
+  \once \override Fingering  #'staff-padding = #'()
+  <c-1 e-2 g-3 b-5>
+}
diff --git a/input/lsr/anaylsis-brackets.ly b/input/lsr/anaylsis-brackets.ly
new file mode 100644 (file)
index 0000000..177a005
--- /dev/null
@@ -0,0 +1,25 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Brackets can be used in musical analysis to indicate the structure of
+the pieces. As demonstrated in the second measure, such analysis
+brackets can be nested. 
+" }
+% begin verbatim
+\layout {
+ \context {
+   \Staff \consists "Horizontal_bracket_engraver"
+ }
+}
+\relative c'' {
+ c2\startGroup
+ d\stopGroup
+ c4\startGroup\startGroup
+ d4\stopGroup
+ e4\startGroup
+ d4\stopGroup\stopGroup
+}
index b43eedbbd97fef5e779e9448cd1f3501f4198542..2691f1e9359cf00e0433fa4d1b0392fcdab2d6f1 100644 (file)
@@ -5,18 +5,19 @@
 \header {
   lsrtags = "pitches, editorial-and-educational-use"
  texidoc = "
-The shapeNoteStyles property gives you the ability to define various
-notehead styles for each step of the scale (as defined by the key
-signature or the \"tonic\" property). This property requires a set of
-symbols, which can be purely arbitrary (geometrical expressions such as
-triangle, cross, xcircle etc. are allowed) or based on old American
-engraving tradition (you can use some latin note names as well). That
-said, if you're trying to imitate old American song books, you may also
-want to try LilyPond's predefined notehead styles, through shortcut
-commands such as \\aikenHeads or \\sacredHarpHeads. This example shows
-different ways to obtain shape noteheads, and demonstrates the ability
-to transpose a melody without losing the correspondence between
-harmonic functions and notehead styles. 
+The @code{shapeNoteStyles} property gives you the ability to define
+various notehead styles for each step of the scale (as defined by the
+key signature or the \"tonic\" property). This property requires a set
+of symbols, which can be purely arbitrary (geometrical expressions such
+as @code{triangle}, @code{cross}, @code{xcircle} etc. are allowed) or
+based on old American engraving tradition (you can use some latin note
+names as well). That said, if you're trying to imitate old American
+song books, you may also want to try LilyPond's predefined notehead
+styles, through shortcut commands such as @code{\\aikenHeads} or
+@code{\\sacredHarpHeads}. This example shows different ways to obtain
+shape noteheads, and demonstrates the ability to transpose a melody
+without losing the correspondence between harmonic functions and
+notehead styles. 
 " }
 % begin verbatim
 fragment = {
index 02b1350a4368afbe89e32689b32d964dbd841a33..5161cd6a5b4c5456a5f40563cc5052c43fc6b15a 100644 (file)
@@ -5,9 +5,9 @@
 \header {
   lsrtags = "editorial-and-educational-use, text"
  texidoc = "
-The \\whiteout command underlays a white box under a markup. Since
-staff lines are in a lower layer than most other grobs, this white box
-will not overlap any other grob.
+The @code{\\whiteout} command underlays a white box under a markup.
+Since staff lines are in a lower layer than most other grobs, this
+white box will not overlap any other grob. 
 " }
 % begin verbatim
 {
index f8d87e3870cc78ee7c93fb8fe96027fe07516035..07846dce7695fe08e1908bcc8066bab8b4477d40 100644 (file)
@@ -6,7 +6,7 @@
   lsrtags = "expressive-marks"
  texidoc = "
 Breathing signs are available in different tastes: commas (default),
-ticks, vees and `railroad tracks' (caesura).
+ticks, vees and \"railroad tracks\" (caesura).
 " }
 % begin verbatim
 {
index eebe31d36fc6eebe5c5c73d231a5efa780293995..373bc05069b5a6c2d6c219dcd79bf71272b70a00 100644 (file)
@@ -21,7 +21,7 @@ Make sure to put the Hairpin in a lower layer than the Text Markup to
 actually draw the rectangle above the hairpin. 
 " }
 % begin verbatim
-% Version specific to 2.10; fails under 2.11 -np
+% Version specific to 2.10; fails under 2.11 due to rest position -np
 
 \score
 {
diff --git a/input/lsr/changing-form-of-multi--measure-rests.ly b/input/lsr/changing-form-of-multi--measure-rests.ly
new file mode 100644 (file)
index 0000000..bf9a0eb
--- /dev/null
@@ -0,0 +1,22 @@
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.11.42"
+\layout { ragged-right= ##t }
+\header {
+  doctitle = "Changing form of multi-measure rests"
+  lsrtags = "rhythms,tweaks-and-overrides"
+  texidoc = "
+If there are 10 or fewer measures of rest, LilyPond prints
+a series of longa and breve rests (called in German
+Kirchenpausen - church rests) within the staff and
+prints a simple line otherwise.  This default number of 10
+may be changed by an override:
+"}
+% begin verbatim
+\relative c'' {
+\compressFullBarRests
+R1*2 | R1*5 | R1*9
+\override MultiMeasureRest #'expand-limit = 3
+R1*2 | R1*5 | R1*9
+}
+
diff --git a/input/lsr/changing-the-size-of-layout-objects.ly b/input/lsr/changing-the-size-of-layout-objects.ly
new file mode 100644 (file)
index 0000000..3fca937
--- /dev/null
@@ -0,0 +1,19 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, tweaks-and-overrides"
+ texidoc = "
+The @code{font-size} property can be set directly, so that only certain
+layout objects are affected.
+" }
+% begin verbatim
+\relative c'' {
+  \set fontSize = #3
+  c4.-> d8---3
+  \override NoteHead #'font-size = #-4
+  c4.-> d8---3
+  \override Script #'font-size = #3
+  c4.-> d8---3
+}
diff --git a/input/lsr/changing-the-size-of-note-heads.ly b/input/lsr/changing-the-size-of-note-heads.ly
new file mode 100644 (file)
index 0000000..62e27e0
--- /dev/null
@@ -0,0 +1,24 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+It is possible to change the fontsize of noteheads.
+" }
+% begin verbatim
+\relative c'' {
+%  \huge
+  c4.-> d8---3
+%  \large
+  c4.-> d8---3
+%  \normalsize
+  c4.-> d8---3
+%  \small
+  c4.-> d8---3
+%  \tiny
+  c4.-> d8---3
+%  \normalsize
+  c2
+}
index bfbd90f128af11a0ca1c21fb7bdaede7641e840f..da81799a09645ee67664fc06761d1b6f2cfc148d 100644 (file)
@@ -15,31 +15,32 @@ as the second argument of @code{\\compressMusic}.
 " }
 % begin verbatim
 \layout {
- \context { \Score
+  \context {
+    \Score
     \remove "Timing_translator"
     \remove "Default_bar_line_engraver"
- }
- \context {
-   \Staff
-   \consists "Timing_translator"
-   \consists "Default_bar_line_engraver"
- }
 }
 \context {
+    \Staff
+    \consists "Timing_translator"
+    \consists "Default_bar_line_engraver"
 }
 }
 
 <<
- \new Staff {
-   \compressMusic #'(8 . 5) {
-     \time 6/8
-     \set Timing.measureLength = #(ly:make-moment 3 5)
-     b8 b b b b b
-     \time 2/4
-     \set Timing.measureLength = #(ly:make-moment 2 5)
-     b4 b
-     }
-   }
- \new Staff {
-   \clef bass
-   \time 2/4
-   c2 d e f }   
- >>
-
 \new Staff {
+    \compressMusic #'(8 . 5) {
+      \time 6/8
+      \set Timing.measureLength = #(ly:make-moment 3 5)
+      b8 b b b b b
+      \time 2/4
+      \set Timing.measureLength = #(ly:make-moment 2 5)
+      b4 b
+    }
+  }
 \new Staff {
+    \clef bass
+    \time 2/4
+    c2 d e f
+  }
+>>
index 3e9fe60b52deffcf4244b8beea6065a4fc818990..d1abd7876b36f4774730743fe2214cbb84e72495 100644 (file)
@@ -13,15 +13,15 @@ stemOn = { \override Staff.Stem #'transparent = ##f }
 stemOff = { \override Staff.Stem #'transparent = ##t }
 
 \score {
-       \new Staff \with { \remove "Time_signature_engraver" }
-       {
-               \key g \minor
-               \set Score.timing = ##f
-               \stemOff a'\breve bes'4 g'4
-               \stemOn a'2 \bar "||"
-               \stemOff a'\breve g'4 a'4
-               \stemOn f'2 \bar "||"
-               \stemOff a'\breve^\markup { \italic flexe }
-               \stemOn g'2 \bar "||"
-       }
+  \new Staff \with { \remove "Time_signature_engraver" }
+  {
+    \key g \minor
+    \set Score.timing = ##f
+    \stemOff a'\breve bes'4 g'4
+    \stemOn a'2 \bar "||"
+    \stemOff a'\breve g'4 a'4
+    \stemOn f'2 \bar "||"
+    \stemOff a'\breve^\markup { \italic flexe }
+    \stemOn g'2 \bar "||"
+  }
 }
index 360aab0085784d4d27fb8c46b74756aa656cf870..be81952a4e52a9bf26fc665d8a339af94671a1eb 100644 (file)
@@ -1,6 +1,8 @@
+adding-fingerings-to-chords.ly
 changing-the-chord-names-to-german-or-semi-german-notation.ly
 adding-a-figured-bass-above-or-below-the-notes.ly
 single-staff-template-with-notes-and-chords.ly
+controlling-the-placement-of-chord-fingerings.ly
 clusters.ly
 single-staff-template-with-notes,-lyrics,-and-chords.ly
 chord-name-exceptions.ly
diff --git a/input/lsr/coloring-elements-of-notation.ly b/input/lsr/coloring-elements-of-notation.ly
new file mode 100644 (file)
index 0000000..93dccdc
--- /dev/null
@@ -0,0 +1,19 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Individual objects may be assigned colors.  Several pre-defined colors
+are available; they are exhaustively listed in the Notation Reference.
+" }
+% begin verbatim
+\relative c'' {
+  \override NoteHead #'color = #red
+  c4 c
+  \override NoteHead #'color = #(x11-color 'LimeGreen)
+  d
+  \override Stem #'color = #blue
+  e
+}
index 0205e5c88f399615378e065388e1316ac9ec551d..abd1093a8168d188dcb47ffeefa12dc356bd61b9 100644 (file)
@@ -1,9 +1,10 @@
 creating-blank-staves.ly
 chant-or-psalms-notation.ly
-adding-and-extra-staff-at-a-line-break.ly
+adding-a-figured-bass-above-or-below-the-notes.ly
+square-balloons.ly
 adding-an-extra-staff.ly
 vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
 changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
 engravers-one-by-one.ly
-adding-a-figured-bass-above-or-below-the-notes.ly
+adding-and-extra-staff-at-a-line-break.ly
 nesting-staves.ly
diff --git a/input/lsr/controlling-the-placement-of-chord-fingerings.ly b/input/lsr/controlling-the-placement-of-chord-fingerings.ly
new file mode 100644 (file)
index 0000000..ae8917c
--- /dev/null
@@ -0,0 +1,24 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, chords, piano-music"
+ texidoc = "
+The placement of fingering numbers can be controlled precisely.
+" }
+% begin verbatim
+\relative c'{
+  \set fingeringOrientations = #'(left)
+  <c-1 e-3 a-5 > 4
+  \set fingeringOrientations = #'(down)
+  <c-1 e-3 a-5 >
+  \set fingeringOrientations = #'(right)
+  <c-1 e-3 a-5 >
+  \set fingeringOrientations = #'(up)
+  <c-1 e-3 a-5 >
+  \set fingeringOrientations = #'(left down)
+  <c-1 e-3 a-5 > 2
+  \set fingeringOrientations = #'(up right down)
+  <c-1 e-3 a-5 >
+}
index c1d37bea8d47f47d0d84bc2f7768aefea389ae1f..54853bdb5eca621059c31136273378419aca0381 100644 (file)
@@ -14,14 +14,14 @@ print a bracket), @code{##f} (never print a bracket) or
 " }
 % begin verbatim
 mus = \relative c'' {
-  \times 2/3 {c16 [ d e } f8]
-  \times 2/3 {c8 d e }
+  \times 2/3 { c16[ d e } f8]
+  \times 2/3 { c8 d e }
   \times 2/3 { c4 d e }
 }
 
 \new Voice \relative c'{
   << \mus s4^"default" >>
-   \override TupletBracket #'bracket-visibility = #'if-no-beam
+  \override TupletBracket #'bracket-visibility = #'if-no-beam
   << \mus s4^"'if-no-beam" >>
   \override TupletBracket #'bracket-visibility = ##t
   << \mus s4^"#t" >>
index 09670d32344a139a336354c70ac1b16fead2eb57..726cf8422aa10fe9dfebeaae5618f5fc55662455 100644 (file)
@@ -52,12 +52,10 @@ rhythm = #(define-music-function (parser location note) (ly:music?)
           ))))
 
 \score {
-   \new Staff {
-       \time 5/4
-
-       \rhythm c'
-       \rhythm c''
-       \rhythm g
-   }
+  \new Staff {
+    \time 5/4
+    \rhythm c'
+    \rhythm c''
+    \rhythm g
+  }
 }
-
index 87a0b64fd5258d651c6c19b4e65e7e079373a160..6406707e90e17a36f4b3c794b907625eb436ecea 100644 (file)
@@ -5,26 +5,27 @@
 \header {
   lsrtags = "expressive-marks, text"
  texidoc = "
-Although the easiest way to add parenthesis to a dynamic mark is to use
-a \\markup block, this method has a downside: the created objects will
-behave like text markups, and not like dynamics.
+Although the easiest way to add parentheses to a dynamic mark is to use
+a @code{\\markup} block, this method has a downside: the created
+objects will behave like text markups, and not like dynamics.
 
 However, it is possible to create a similar object using the equivalent
 Scheme code (as described in \"Markup programmer interface\"), combined
-with the make-dynamic-script function. This way, the markup will be
-regarded as a dynamic, and therefore will remain compatible with
-commands such as \\dynamicUp or \\dynamicDown.
+with the @code{make-dynamic-script} function. This way, the markup will
+be regarded as a dynamic, and therefore will remain compatible with
+commands such as @code{\\dynamicUp} or @code{\\dynamicDown}.
 
 
 " }
 % begin verbatim
 \paper { ragged-right = ##t }
 
-parenF = #(make-dynamic-script (markup #:line(#:normal-text #:italic
-#:fontsize 2 "(" #:hspace -0.8 #:dynamic "f" #:normal-text #:italic
-#:fontsize 2 ")" )))
+parenF = #(make-dynamic-script (markup #:line (#:normal-text #:italic
+           #:fontsize 2 "(" #:hspace -0.8 #:dynamic "f" #:normal-text #:italic
+           #:fontsize 2 ")"
+          )))
 
-\score
-{
-       { c''\parenF c'' c'' \dynamicUp c''\parenF }
+\score {
+  { c''\parenF c'' c'' \dynamicUp c''\parenF }
 }
+
diff --git a/input/lsr/default-direction-of-stems-on-the-center-line-of-the-staff.ly b/input/lsr/default-direction-of-stems-on-the-center-line-of-the-staff.ly
new file mode 100644 (file)
index 0000000..2a88993
--- /dev/null
@@ -0,0 +1,18 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+The direction of stems on the center line of the staff can be changed,
+as demonstrated in this example. 
+" }
+% begin verbatim
+\relative c'' {
+  a b c b
+  \override Stem #'neutral-direction = #up
+  a b c b
+  \override Stem #'neutral-direction = #down
+  a b c b
+}
index 89a58b9b36f05ac33a1b43916e0205ad5f4e0554..e26193bc03d5ebab4555434f5b89201ff727fc3f 100644 (file)
@@ -5,8 +5,8 @@
 \header {
   lsrtags = "pitches"
  texidoc = "
-In early XXth century works, starting with Schönberg, Berg and Webern
-(the \"second\" Viennese school), every pitch in the twelve-tone scale
+In early 20th century works, starting with Schönberg, Berg and Webern
+(the \"Second\" Viennese school), every pitch in the twelve-tone scale
 has to be regarded as equal, without any hierarchy such as the
 classical (tonal) degrees. Therefore, these composers print one
 accidental for each note, even at natural pitches, to emphasize their
@@ -15,16 +15,13 @@ achieve such notation rules with LilyPond.
 " }
 % begin verbatim
 webernAccidentals = {
-    % the 5s are just "a value different from any accidental"
-    \set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
-                                 (4 . 5) (5 . 5) (6 . 5))
-    \set Staff.extraNatural = ##f
-    #(set-accidental-style 'forget)
+  % the 5s are just "a value different from any accidental"
+  \set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
+                               (4 . 5) (5 . 5) (6 . 5))
+  \set Staff.extraNatural = ##f
+  #(set-accidental-style 'forget)
 }
 
-\layout {
-  \context { \Staff \remove "Key_engraver" }
-}
 \score {
   {
     \webernAccidentals
@@ -32,4 +29,7 @@ webernAccidentals = {
     c' dis' cis' cis'
     c' c' dis' des'
   }
+  \layout {
+    \context { \Staff \remove "Key_engraver" }
+  }
 }
index 05f5d94acebfea5222c50eb3ce1b421c563259e4..6b73eaba9ce26c059c6918509d8a57df32cc88d3 100644 (file)
@@ -1,10 +1,29 @@
-creating-blank-staves.ly
-forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
+adding-fingerings-to-chords.ly
 changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
-coloring-objects.ly
+putting-parentheses-around-a-single-note.ly
 changing-the-default-text-font-family.ly
-changing-a-single-notes-size-in-a-chord.ly
-three-sided-box.ly
+changing-the-size-of-note-heads.ly
+grid-lines;-adding-vertical-lines-between-staves.ly
+creating-blank-staves.ly
+grid-lines;-changing-their-appearance.ly
+coloring-objects.ly
+allowing-fingerings-to-be-printed-inside-the-staff.ly
+default-direction-of-stems-on-the-center-line-of-the-staff.ly
 clefs-commonly-tweaked-properties.ly
 blanking-staff-lines-using-the--whiteout-command.ly
+forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
+changing-the-size-of-layout-objects.ly
+adding-fingerings-to-a-score-using-markup-objects.ly
+controlling-the-placement-of-chord-fingerings.ly
+rgb-colors.ly
 applying-notehead-styles-depending-on-the-step-of-the-scale.ly
+adding-fingerings-to-a-score.ly
+anaylsis-brackets.ly
+how-to-add-thumb-fingerings.ly
+square-balloons.ly
+changing-a-single-notes-size-in-a-chord.ly
+putting-parentheses-around-non-note-objects.ly
+three-sided-box.ly
+hiding-notes.ly
+grid-lines;-emphasizing-rhythms-and-notes-synchronization.ly
+coloring-elements-of-notation.ly
index 14cfe8f7ef814f7fa4e451e5075922fcade1c1cc..31278914d3c5e22352b20619ab7773b872f7cbb9 100644 (file)
@@ -1,13 +1,14 @@
 combining-dynamics-with-markup-texts.ly
 creating-text-spanners.ly
-adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
+breathing-sign.ly
 changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
 caesura-railtracks-with-fermata.ly
-breathing-sign.ly
+adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
 creating-real-parenthesized-dynamics.ly
+putting-parentheses-around-non-note-objects.ly
 center-text-below-hairpin-dynamics.ly
 contemporary-glissando.ly
-adding-parentheses-around-an-expressive-mark.ly
+adding-parentheses-around-an-expressive-mark-or-chordal-note.ly
 line-arrows.ly
 changing--flageolet-mark-size.ly
 piano-template-with-centered-dynamics.ly
diff --git a/input/lsr/grid-lines;-adding-vertical-lines-between-staves.ly b/input/lsr/grid-lines;-adding-vertical-lines-between-staves.ly
new file mode 100644 (file)
index 0000000..2540365
--- /dev/null
@@ -0,0 +1,42 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Vertical lines can be drawn between staves synchronized with the notes.
+" }
+% begin verbatim
+\layout {
+ \context {
+   \Staff
+   \consists "Grid_point_engraver"
+   % sets up grids
+   gridInterval = #(ly:make-moment 1 4)
+   % this sets the grid interval to 1 quarternote (crotchet)
+ }
+}
+
+\new Score \with {
+ \consists "Grid_line_span_engraver"
+ %% by default this centers grid lines horizontally below and to the
+ % left side of the notehead, the grid lines extend from
+ % the middle lines of each staff
+}
+
+\new ChoirStaff <<
+ \new Staff {
+   \relative c'' {
+     \stemUp
+     c4. d8 e8 f g4
+   }
+ }
+ \new Staff {
+   \clef bass
+   \relative c {
+     \stemDown
+     c4  g'  f  e
+   }
+ }
+>>
diff --git a/input/lsr/grid-lines;-changing-their-appearance.ly b/input/lsr/grid-lines;-changing-their-appearance.ly
new file mode 100644 (file)
index 0000000..4bfc039
--- /dev/null
@@ -0,0 +1,51 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Grid lines can look differently, by modifying some of their properties
+using the @code{\\override} command.
+" }
+% begin verbatim
+\layout {
+ \context {
+   \Staff
+   \consists "Grid_point_engraver"
+   % sets up grids
+   gridInterval = #(ly:make-moment 1 4)
+   % this sets the grid interval to 1 quarternote (crotchet)
+ }
+}
+
+\new Score \with {
+ \consists "Grid_line_span_engraver"
+ \override NoteColumn #'X-offset = #-0.5
+ % this moves them to the right half a staff space
+}
+
+\new ChoirStaff <<
+ \new Staff {
+  \relative c'' {
+    \stemUp
+    c'4. d8 e8 f g4
+  }
+ }
+ \new Staff {
+   \relative c {
+     \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
+     % this moves them up one staff space from the default position
+     \stemDown
+     \clef bass
+     \once \override Score.GridLine #'thickness = #5.0
+      c4
+      \once \override Score.GridLine #'thickness = #1.0
+      g'
+      \once \override Score.GridLine #'thickness = #3.0
+      f
+      \once \override Score.GridLine #'thickness = #5.0
+      e
+   }
+ }
+>>
diff --git a/input/lsr/grid-lines;-emphasizing-rhythms-and-notes-synchronization.ly b/input/lsr/grid-lines;-emphasizing-rhythms-and-notes-synchronization.ly
new file mode 100644 (file)
index 0000000..b1c6c95
--- /dev/null
@@ -0,0 +1,72 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Regular vertical lines can be drawn between staves to show notes
+synchronization; however, in case of monophonic music, you may want to
+make the second stave invisible, and make the lines shorter like in
+this snippet.
+" }
+% begin verbatim
+%% sets of grid
+\layout {
+ \context {
+   \Staff
+   \consists "Grid_point_engraver"
+   gridInterval = #(ly:make-moment 1 8)
+%% lines length
+   \override GridPoint #'Y-extent = #'(6 . 0)
+ }
+ \context {
+   \StaffGroup
+   \remove "System_start_delimiter_engraver"
+ }
+}
+
+\layout {
+ ragged-right = ##t
+}
+\new Score
+\with {
+ \consists "Grid_line_span_engraver"
+%% centers grid lines  horizontally below noteheads
+ \override NoteColumn #'X-offset = #-0.5
+}
+
+\new ChoirStaff <<
+ \new Staff
+ {
+   \time 12/8
+   \stemUp
+   \relative {
+   c'4. d8 e8 f g4 f8 e8.[ d16 c8] }
+ }
+ \new Staff
+ {
+%% making sure the lines will be placed outside the Staff
+   \override Score.GridLine #'extra-offset = #'( 0.0 . -4.0 )
+
+%% hides staff and notes so that only the grid lines are visible
+   \override NoteHead #'transparent = ##t
+   \override NoteHead #'no-ledgers = ##t
+   \override Stem #'transparent = ##t
+   \override Beam #'transparent = ##t
+   \override Staff.BarLine #'transparent = ##t
+   \override Staff.StaffSymbol #'line-count = #0
+   \override Staff.TimeSignature #'transparent = ##t
+   \override Staff.Clef #'transparent = ##t
+
+% you have to put 'dummy' notes here to force regular grid spacing...
+ \once  \override Score.GridLine #'thickness = #4.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #3.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #4.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #3.0
+ c8   c8   c8
+ }
+>>
diff --git a/input/lsr/hiding-notes.ly b/input/lsr/hiding-notes.ly
new file mode 100644 (file)
index 0000000..abd116a
--- /dev/null
@@ -0,0 +1,22 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, spacing"
+ texidoc = "
+In the following examples, some notes are hidden: although they are
+made transparent, they still take vertical and horizontal space.
+" }
+% begin verbatim
+\relative c'' {
+  c4 d
+  \hideNotes
+  e  f
+  \unHideNotes
+  g  a
+  \hideNotes
+  b
+  \unHideNotes
+  c
+}
diff --git a/input/lsr/how-to-add-thumb-fingerings.ly b/input/lsr/how-to-add-thumb-fingerings.ly
new file mode 100644 (file)
index 0000000..cddb30a
--- /dev/null
@@ -0,0 +1,15 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, strings"
+ texidoc = "
+Special scripts can be entered for thumb fingerings (for example in
+cello music).
+" }
+% begin verbatim
+\relative c'' {
+  a2_\thumb
+  <b_\thumb b'-3>
+}
index cef8e0f13cd007f3ec597f417d13085d7c8947ab..a57f8575b2420d93ceff9d19241ffbe92ffca46c 100644 (file)
@@ -12,17 +12,12 @@ Beam positions may be controlled manually, by overriding the
 
 " }
 % begin verbatim
-\score { 
-    \context Voice \relative c {
-       %% from upper staffline (position 4) to centre (position 0)
-       \override Beam  #'positions = #'(2 . 0)
-        c'8[ c] 
-       
-       %% from center to one above centre (position 2)
-       \override Beam  #'positions = #'(0 . 1)
-        c[ c]
-  }
-
+\relative c {
+  % from upper staffline (position 4) to centre (position 0)
+  \override Beam  #'positions = #'(2 . 0)
+  c'8[ c]
+  % from centre to one above centre (position 2)
+  \override Beam  #'positions = #'(0 . 1)
+  c[ c]
 }
 
-
index 76eba09c80f33482bca18482f58fa5e8c497915e..d601cb665653dfc7134fb53c9f2d9a17901423d7 100644 (file)
@@ -5,9 +5,9 @@
 \header {
   lsrtags = "pitches, text"
  texidoc = "
-Internally, the set-octavation function sets the properties
+Internally, the @code{set-octavation} function sets the properties
 @code{ottavation} (e.g., to @code{\"8va\"} or @code{\"8vb\"}) and
-@code{middleCPosition}.  To override the text of the bracket, set
+@code{middleCPosition}. To override the text of the bracket, set
 @code{ottavation} after invoking @code{set-octavation}, like in the
 following example.
 
index a7375219013933a9a8b50c055838dff6a4be4556..a748489e7462d3eef12f1ad1c43160c2ed4c1d7a 100644 (file)
@@ -3,6 +3,8 @@ clusters.ly
 piano-template-with-centered-lyrics.ly
 vocal-ensemble-template-with-automatic-piano-reduction.ly
 piano-template-simple.ly
+controlling-the-placement-of-chord-fingerings.ly
+adding-fingerings-to-chords.ly
 piano-template-with-melody-and-lyrics.ly
 jazz-combo-template.ly
 demo-midiinstruments.ly
index 9f3eea8056b107784753fd55928b442fd49b0737..3c0c7d9105092047d876d55dc49359c0b721c3a7 100644 (file)
@@ -1,6 +1,6 @@
 makam.ly
 ambiti-multiple-voices.ly
-applying-notehead-styles-depending-on-the-step-of-the-scale.ly
+dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
 transposing-pitches-with-minimum-accidentals-smart-transpose.ly
 ottava-text.ly
 preventing-extra-naturals-from-being-automatically-added.ly
@@ -8,7 +8,7 @@ generating-random-notes.ly
 quoting-another-voice-with-transposition.ly
 adding-ambiti-per-voice.ly
 clefs-commonly-tweaked-properties.ly
-dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
+applying-notehead-styles-depending-on-the-step-of-the-scale.ly
 preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly
 creating-a-sequence-of-notes-on-various-pitches.ly
 non-traditional-key-signatures.ly
diff --git a/input/lsr/positioning-multi--measure-rests.ly b/input/lsr/positioning-multi--measure-rests.ly
new file mode 100644 (file)
index 0000000..ecd9a90
--- /dev/null
@@ -0,0 +1,43 @@
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.11.42"
+\layout { ragged-right= ##t }
+\header {
+  doctitle = "Positioning multi-measure rests"
+  lsrtags = "rhythms,tweaks-and-overrides"
+  texidoc = "
+Unlike ordinary rests, there is no predefined command
+to change the vertical position on the staff of a multi-measure
+rest symbol of either form by attaching it to a note.  However,
+in polyphonic music multi-measure rests in odd-numbered and
+even-numbered voices are vertically separated.  The positioning
+of multi-measure rests can be controlled as follows:
+ "}
+% begin verbatim
+\relative c'' {
+% Multi-measure rests by default are set under the 2nd line
+R1
+% They can be moved with an override
+\override MultiMeasureRest #'staff-position = #-2
+R1
+% A value of 0 is the default position;
+% the following trick moves the rest to the center line
+\override MultiMeasureRest #'staff-position = #-0.01
+R1
+% Multimeasure rests in odd-numbered voices are under the top line
+<< {R1} \\ {a1} >>
+% Multi-measure rests in even-numbered voices are under the bottom line
+<< {c1} \\ {R1} >>
+% They remain separated even in empty bars
+<< {R1} \\ {R1} >>
+% This brings them together even though there are two voices
+\compressFullBarRests
+<<
+  \revert MultiMeasureRest #'staff-position
+  {R1*3}
+\\
+  \revert MultiMeasureRest #'staff-position
+  {R1*3}
+>>
+}
+
index fbf165b75c4f7d67a13a8fb5c0c02c9435b1b723..b27a9ef5fe260fa82029f23417058ce5737c4eb6 100644 (file)
@@ -4,6 +4,13 @@
 
 \header {
   lsrtags = "pitches"
+
+  texidocfr = "
+En accord avec les règles standards de l'écriture musicale, on grave
+un bécarre avant un dièse ou un bémol si on a besoin d'annuler une
+altération précédente.  Pour modifier ce comportement, assignez la propriété
+@code{extraNatural} du contexte @code{Staff} à la valeur @code{##f} (faux).
+"
  texidoc = "
 In accordance with standard typesetting rules, a natural sign is
 printed before a sharp or flat if a previous accidental on the same
index b62b3081bbc7532a07a37f5f00696aecbdb78904..782e12aa24fc04504f807a199a0c0cc7633948f7 100644 (file)
@@ -6,13 +6,11 @@
   lsrtags = "rhythms, percussion"
  texidoc = "
 In the following snippet, two parts have a completely different time
-signature, and yet keep synchronized.
-
-This can be achieved with the \\compressMusic command, as demonstrated
-here.
-
-The barlines can't be printed at the Score level anymore, so you have
-to remove the Barline_engraver and put it in the Staff context.
+signature, and yet keep synchronized. This can be achieved with the
+@code{\\compressMusic} command, as demonstrated here. The barlines
+can't be printed at the @code{Score} level anymore, so you have to
+remove the @code{Barline_engraver} and put it in the @code{Staff}
+context. 
 " }
 % begin verbatim
 % Thanks to Adam James Wilson for this snippet
diff --git a/input/lsr/putting-parentheses-around-a-single-note.ly b/input/lsr/putting-parentheses-around-a-single-note.ly
new file mode 100644 (file)
index 0000000..ec706f9
--- /dev/null
@@ -0,0 +1,20 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+Objects may be parenthesized by prefixing @code{\\parenthesize} to the
+music event: in other words, the note has to be put after the
+@code{\\parenthesize} command.
+
+This only functions inside chords; to parenthesize a single note it
+must be enclosed with @code{ as if it is a chord.} 
+" }
+% begin verbatim
+\relative c'' {
+  a4
+  < \parenthesize b >
+  c d
+}
diff --git a/input/lsr/putting-parentheses-around-non-note-objects.ly b/input/lsr/putting-parentheses-around-non-note-objects.ly
new file mode 100644 (file)
index 0000000..33d8019
--- /dev/null
@@ -0,0 +1,14 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "expressive-marks, editorial-and-educational-use"
+ texidoc = "
+Various objects may be parenthesized as well as notes: in this example,
+the articulation mark is printed between parentheses.
+" }
+% begin verbatim
+\relative c' {
+  < c d g >2-\parenthesize -. d
+}
index 893f00a6614150a4bc77db878426e9520ff594e9..dc08d0bc1a870394b461fdc4c4d80bef52cacfa2 100644 (file)
@@ -1,2 +1,4 @@
 positioning-segno-and-coda-with-line-break.ly
+adding-volta-brackets-to-additional-staves.ly
 volta-multi-staff.ly
+shortening-volta-brackets.ly
index 62cf4a07e848703958469f243f43fceff5c202cd..8fbb70722aca36614c77c67f5b6425f7f1db12da 100644 (file)
@@ -12,31 +12,31 @@ Rests may be used in various styles.
 " }
 % begin verbatim
 \layout {
-    indent = 0.0
-    raggedright = ##t
+  indent = 0.0
+  \context {
+    \Staff
+    \remove Time_signature_engraver
+  }
 }
 
-\context Staff \relative c {
-    \set Score.timing = ##f
-    \override Staff.Rest  #'style = #'mensural
-    r\maxima^\markup \typewriter { mensural }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar "" 
-
-    \override Staff.Rest  #'style = #'neomensural
-    r\maxima^\markup \typewriter { neomensural }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar "" 
-
-    \override Staff.Rest  #'style = #'classical
-    r\maxima^\markup \typewriter { classical }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar ""
-    
-    \override Staff.Rest  #'style = #'default
-    r\maxima^\markup \typewriter { default }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    
+\relative c {
+  \set Score.timing = ##f
+  \override Staff.Rest  #'style = #'mensural
+  r\maxima^\markup \typewriter { mensural }
+  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+  \bar ""
+  
+  \override Staff.Rest  #'style = #'neomensural
+  r\maxima^\markup \typewriter { neomensural }
+  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+  \bar ""
+  
+  \override Staff.Rest  #'style = #'classical
+  r\maxima^\markup \typewriter { classical }
+  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+  \bar ""
+  
+  \override Staff.Rest  #'style = #'default
+  r\maxima^\markup \typewriter { default }
+  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
 }
-
-
diff --git a/input/lsr/rgb-colors.ly b/input/lsr/rgb-colors.ly
new file mode 100644 (file)
index 0000000..3bfad3a
--- /dev/null
@@ -0,0 +1,27 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use"
+ texidoc = "
+In addition to the built-in x11-color system, it is possible to get
+exact RGB colors by specifying the amounts of red, green and blue.
+" }
+% begin verbatim
+\relative c''{
+  \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
+  \set Staff.instrumentName = \markup {
+    \with-color #(x11-color 'navy) "Clarinet"
+  }
+
+  %black
+%  \override Stem #'color = #(rgb-color 0 0 0)
+  gis8 a
+  % white
+%  \override Stem #'color = #(rgb-color 1 1 1)
+  gis8 a
+  % dark blue
+%  \override Stem #'color = #(rgb-color 0 0 0.5)
+  gis4 a
+}
index 6cd245fe0c07d1b91acecbd5672387d3bc820940..9cfdbdf9ed0382a121a9c2db973ebf7ae23033c6 100644 (file)
@@ -7,17 +7,15 @@
  texidoc = "
 In \"simple\" lead-sheets, sometimes no actual notes are written,
 instead only \"rhythmic patterns\" and chords above the measures are
-noted giving the structure of a song.  Such a feature is for example
+notated giving the structure of a song. Such a feature is for example
 useful while creating/transcribing the structure of a song and also
-when sharing lead sheets with guitarists or jazz musicians.
-
-The standard support for this is described in section \"Measure
-repeats\", but  then the first beat has to be an ordinary note or rest. 
-
-This example shows two solutions to this problem, by redefining
-ordinary rests to be printed as slashes. (If the duration of each beat
-is not a quarter note, replace the r4 in the definitions by a rest of
-the appropriate duration).
+when sharing lead sheets with guitarists or jazz musicians. The
+standard support for this using @code{\\repeat percent} is unsuitable
+here since the first beat has to be an ordinary note or rest. This
+example shows two solutions to this problem, by redefining ordinary
+rests to be printed as slashes. (If the duration of each beat is not a
+quarter note, replace the @code{r4} in the definitions with a rest of
+the appropriate duration). 
 " }
 % begin verbatim
 % Macro to print single slash
@@ -28,7 +26,6 @@ rs = {
   r4
 }
 
-
 % Function to print a specified number of slashes
 comp = #(define-music-function (parser location count) ( integer?)
   #{
@@ -41,7 +38,9 @@ comp = #(define-music-function (parser location count) ( integer?)
 )
 
 \score{
-  \relative c'{
-    c d e f | \rs \rs \rs \rs | \comp #4 |
+  \relative c' {
+    c d e f |
+    \rs \rs \rs \rs |
+    \comp #4 |
   }
 }
index 8192c813078471b66d2d02121bb106daead27c95..9f01dad3d5561e607c961467cf07d4ebddf57dc5 100644 (file)
@@ -7,6 +7,7 @@ skips-in-lyric-mode-2.ly
 chant-or-psalms-notation.ly
 controlling-tuplet-bracket-visibility.ly
 heavily-customized-polymetric-time-signatures.ly
+positioning-multi--measure-rests.ly
 using-ties-with-arpeggios.ly
 forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
 compound-time-signatures.ly
@@ -17,6 +18,7 @@ making-an-object-invisible-with-the-transparent-property.ly
 changing-the-tuplet-number.ly
 entering-several-tuplets-using-only-one--times-command.ly
 conducting-signs,-measure-grouping-signs.ly
+changing-form-of-multi--measure-rests.ly
 rhythmic-slashes.ly
 automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
 permitting-line-breaks-within-beamed-tuplets.ly
diff --git a/input/lsr/shortening-volta-brackets.ly b/input/lsr/shortening-volta-brackets.ly
new file mode 100644 (file)
index 0000000..6d70527
--- /dev/null
@@ -0,0 +1,22 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "repeats"
+ texidoc = "
+By default, the volta brackets will be drawn over all of the
+alternative music, but it is possible to shorten them by setting
+@code{voltaSpannerDuration}.  In the next example, the bracket only
+lasts one measure, which is a duration of 3/4. 
+" }
+% begin verbatim
+\relative c'' {
+  \time 3/4
+  c c c
+  \set Score.voltaSpannerDuration = #(ly:make-moment 3 4)
+  \repeat volta 5 { d d d }
+    \alternative { { e e e f f f }
+    { g g g } 
+  }
+}
index 5fc4d1e2213371a761309f735c47d67e9e8c860f..1b1e6f3868b4a7bcf8681c8d73c66ceebb71b978 100644 (file)
@@ -7,14 +7,12 @@
  texidoc = "
 Although you can't use @code{s} in @code{\\lyricmode} (it's taken to be
 a literal \"s\", not a space) you can use either @code{\"\"} or
-@code{_}.
-
-So for example:
+@code{_} .So for example: 
 " }
 % begin verbatim
 << 
- \relative c'' { a4 b c d }
\new Lyrics \lyricmode { a4   _2  gap4 }
 \relative c'' { a4 b c d }
 \new Lyrics \lyricmode { a4 _2 gap4 }
 >>
 
 
index 9c5cc3cb80217d18ae9b13aa8bc2c328d853a441..9cfed3b470110be9be9dc8b5cfcddeee5d375674 100644 (file)
@@ -5,12 +5,12 @@
 \header {
   lsrtags = "rhythms, vocal-music"
  texidoc = "
-The s syntax is only available in note mode and chord mode. In other
-situations, for example, when entering lyrics, you should use the
-\\skip command.
+The @code{s} syntax for skips is only available in note mode and chord
+mode. In other situations, for example, when entering lyrics, you
+should use the @code{\\skip} command. 
 " }
 % begin verbatim
 <<
-  \relative { a'2 a1 }
-  \new Lyrics \lyricmode { \skip 2 bla1 }
+  \relative { a'1 a }
+  \new Lyrics \lyricmode { \skip 1 bla1 }
 >>
index 1762bd4f7b006be693f1026f795ea61058ca2bd0..1162bcea96a33f8b50c4731fb261a3190842fb48 100644 (file)
@@ -1,6 +1,8 @@
-vertically-aligning-ossias-and-lyrics.ly
-adjusting-lyrics-vertical-spacing.ly
-alignment-vertical-spacing.ly
-page-label.ly
 vertically-centered-dynamics-and-textscripts.ly
 proportional-strict-notespacing.ly
+vertically-aligning-ossias-and-lyrics.ly
+allowing-fingerings-to-be-printed-inside-the-staff.ly
+hiding-notes.ly
+page-label.ly
+alignment-vertical-spacing.ly
+adjusting-lyrics-vertical-spacing.ly
diff --git a/input/lsr/square-balloons.ly b/input/lsr/square-balloons.ly
new file mode 100644 (file)
index 0000000..fe98385
--- /dev/null
@@ -0,0 +1,18 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-and-educational-use, text, contexts-and-engravers"
+ texidoc = "
+Elements of notation can be marked and named with the help of a square
+balloon.  The primary purpose of this feature is to explain notation.
+" }
+% begin verbatim
+\new Voice \with { \consists "Balloon_engraver" }
+  \relative c''{
+   \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
+   a4
+   <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
+}
+
index 72f0b3a74e931a613bcda1a4c2bccaf88bc7d383..5e49716177237fc12147a816df765309c4d87e2a 100644 (file)
@@ -1,15 +1,15 @@
 creating-blank-staves.ly
-time-signature-in-parentheses.ly
+incipit.ly
 adding-and-extra-staff-at-a-line-break.ly
 changing-the-number-of-lines-in-a-staff.ly
-incipit.ly
-inserting-score-fragments-above-the-staff,-as-markups.ly
+time-signature-in-parentheses.ly
 adding-an-extra-staff.ly
 changing-the-staff-size.ly
-quoting-another-voice-with-transposition.ly
+quoting-another-voice.ly
 adding-ambiti-per-voice.ly
 clefs-commonly-tweaked-properties.ly
-quoting-another-voice.ly
 volta-multi-staff.ly
+inserting-score-fragments-above-the-staff,-as-markups.ly
+quoting-another-voice-with-transposition.ly
 non-traditional-key-signatures.ly
 nesting-staves.ly
index a0795b5bcf71d2991c4d430eaabea0b211e62fdc..ad0a0dce0a3a57fffa655fe290014fd5d92df586 100644 (file)
@@ -1,3 +1,4 @@
 string-quartet-template-simple.ly
+how-to-add-thumb-fingerings.ly
 string-quartet-template-with-separate-parts.ly
 demo-midiinstruments.ly
index 8af6644e5a99342e8f7792020acffb241f94ab88..59b06c613003f94fdd4a141e68e2a39f338babca 100644 (file)
@@ -1,17 +1,17 @@
 piano-template-with-centered-dynamics.ly
 single-staff-template-with-notes-and-lyrics.ly
 single-staff-template-with-only-notes.ly
-jazz-combo-template.ly
+piano-template-with-centered-lyrics.ly
 score-for-diatonic-accordion.ly
 piano-template-simple.ly
-ancient-notation-template----modern-transcription-of-mensural-music.ly
+string-quartet-template-with-separate-parts.ly
 ancient-notation-template----modern-transcription-of-gregorian-music.ly
-single-staff-template-with-notes-and-chords.ly
+ancient-notation-template----modern-transcription-of-mensural-music.ly
+piano-template-with-melody-and-lyrics.ly
 string-quartet-template-simple.ly
 single-staff-template-with-notes,-lyrics,-and-chords.ly
-piano-template-with-melody-and-lyrics.ly
-string-quartet-template-with-separate-parts.ly
-vocal-ensemble-template.ly
+single-staff-template-with-notes-and-chords.ly
 vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
-piano-template-with-centered-lyrics.ly
+jazz-combo-template.ly
+vocal-ensemble-template.ly
 vocal-ensemble-template-with-automatic-piano-reduction.ly
index b7e9f28d22ed449245d37ca406ef14e4ec3f0101..9699027b38645ccbb8fb3917511729bd74e5e97c 100644 (file)
@@ -1,19 +1,20 @@
 combining-dynamics-with-markup-texts.ly
 creating-text-spanners.ly
-creating-real-parenthesized-dynamics.ly
+vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
 markup-lines.ly
+square-balloons.ly
 center-text-below-hairpin-dynamics.ly
-ottava-text.ly
+piano-template-with-centered-lyrics.ly
 demonstrating-all-headers.ly
-utf-8.ly
 changing-the-default-text-font-family.ly
-combining-two-parts-on-the-same-staff.ly
+creating-real-parenthesized-dynamics.ly
+how-to-put-ties-between-syllables-in-lyrics.ly
 aligning-and-centering-instrument-names.ly
-vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
+utf-8.ly
 outputting-the-version-number.ly
 blanking-staff-lines-using-the--whiteout-command.ly
 formatting-lyrics-syllables.ly
-how-to-put-ties-between-syllables-in-lyrics.ly
-piano-template-with-centered-lyrics.ly
+combining-two-parts-on-the-same-staff.ly
+ottava-text.ly
 adjusting-lyrics-vertical-spacing.ly
 aligning-lyrics.ly
index cf8c291fed053cd0bf7c9e3f8e83c336164c3aca..eaf6e5ffca008c2b909f34963170d93aa36e95ea 100644 (file)
@@ -1,26 +1,29 @@
-altering-the-number-of-stems-in-a-beam.ly
 time-signature-in-parentheses.ly
-vertically-centered-dynamics-and-textscripts.ly
-proportional-strict-notespacing.ly
 changing-the-default-text-font-family.ly
-transcription-of-ancient-music-with-incipit.ly
-alignment-vertical-spacing.ly
+drawing-boxes-around-grobs.ly
 manually-controlling-beam-positions.ly
 custodes.ly
-drawing-boxes-around-grobs.ly
 move-specific-text.ly
-drawing-circles-around-various-objects.ly
-making-an-object-invisible-with-the-transparent-property.ly
 rest-styles.ly
-creating-text-spanners.ly
 using-the--tweak-command-to-tweak-individual-grobs.ly
 controlling-tuplet-bracket-visibility.ly
-caesura-railtracks-with-fermata.ly
-rhythmic-slashes.ly
-changing-the-staff-size.ly
-changing-a-single-notes-size-in-a-chord.ly
+positioning-multi--measure-rests.ly
 coloring-objects.ly
+changing-the-staff-size.ly
 clefs-commonly-tweaked-properties.ly
 vertically-aligning-ossias-and-lyrics.ly
+changing-the-size-of-layout-objects.ly
 changing-properties-for-individual-grobs.ly
+altering-the-number-of-stems-in-a-beam.ly
+vertically-centered-dynamics-and-textscripts.ly
+proportional-strict-notespacing.ly
+making-an-object-invisible-with-the-transparent-property.ly
+transcription-of-ancient-music-with-incipit.ly
+alignment-vertical-spacing.ly
+drawing-circles-around-various-objects.ly
+creating-text-spanners.ly
+caesura-railtracks-with-fermata.ly
+changing-form-of-multi--measure-rests.ly
+rhythmic-slashes.ly
+changing-a-single-notes-size-in-a-chord.ly
 nesting-staves.ly
index 398c1df27aac64972a8f247ace8500759cb67977..b581d4eae0e529de22a026bd1dcc10f8381cf2ce 100644 (file)
@@ -1,17 +1,17 @@
 chant-or-psalms-notation.ly
 single-staff-template-with-notes-and-lyrics.ly
 skips-in-lyric-mode-2.ly
-skips-in-lyric-mode.ly
-aligning-lyrics.ly
+ambiti-multiple-voices.ly
+vocal-ensemble-template-with-automatic-piano-reduction.ly
 vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
 how-to-put-ties-between-syllables-in-lyrics.ly
 adding-ambiti-per-voice.ly
-vertically-aligning-ossias-and-lyrics.ly
+piano-template-with-melody-and-lyrics.ly
 single-staff-template-with-notes,-lyrics,-and-chords.ly
-vocal-ensemble-template-with-automatic-piano-reduction.ly
+demo-midiinstruments.ly
 formatting-lyrics-syllables.ly
-piano-template-with-melody-and-lyrics.ly
-ambiti-multiple-voices.ly
+vertically-aligning-ossias-and-lyrics.ly
+aligning-lyrics.ly
 vocal-ensemble-template.ly
 adjusting-lyrics-vertical-spacing.ly
-demo-midiinstruments.ly
+skips-in-lyric-mode.ly
diff --git a/input/new/changing-form-of-multi--measure-rests.ly b/input/new/changing-form-of-multi--measure-rests.ly
new file mode 100644 (file)
index 0000000..5dcdf9c
--- /dev/null
@@ -0,0 +1,20 @@
+\version "2.11.42"
+\layout { ragged-right= ##t }
+\header {
+  doctitle = "Changing form of multi-measure rests"
+  lsrtags = "rhythms,tweaks-and-overrides"
+  texidoc = "
+If there are 10 or fewer measures of rest, LilyPond prints
+a series of longa and breve rests (called in German
+Kirchenpausen - church rests) within the staff and
+prints a simple line otherwise.  This default number of 10
+may be changed by an override:
+"}
+
+\relative c'' {
+\compressFullBarRests
+R1*2 | R1*5 | R1*9
+\override MultiMeasureRest #'expand-limit = 3
+R1*2 | R1*5 | R1*9
+}
+
diff --git a/input/new/positioning-multi--measure-rests.ly b/input/new/positioning-multi--measure-rests.ly
new file mode 100644 (file)
index 0000000..56aeda5
--- /dev/null
@@ -0,0 +1,41 @@
+\version "2.11.42"
+\layout { ragged-right= ##t }
+\header {
+  doctitle = "Positioning multi-measure rests"
+  lsrtags = "rhythms,tweaks-and-overrides"
+  texidoc = "
+Unlike ordinary rests, there is no predefined command
+to change the vertical position on the staff of a multi-measure
+rest symbol of either form by attaching it to a note.  However,
+in polyphonic music multi-measure rests in odd-numbered and
+even-numbered voices are vertically separated.  The positioning
+of multi-measure rests can be controlled as follows:
+ "}
+
+\relative c'' {
+% Multi-measure rests by default are set under the 2nd line
+R1
+% They can be moved with an override
+\override MultiMeasureRest #'staff-position = #-2
+R1
+% A value of 0 is the default position;
+% the following trick moves the rest to the center line
+\override MultiMeasureRest #'staff-position = #-0.01
+R1
+% Multimeasure rests in odd-numbered voices are under the top line
+<< {R1} \\ {a1} >>
+% Multi-measure rests in even-numbered voices are under the bottom line
+<< {c1} \\ {R1} >>
+% They remain separated even in empty bars
+<< {R1} \\ {R1} >>
+% This brings them together even though there are two voices
+\compressFullBarRests
+<<
+  \revert MultiMeasureRest #'staff-position
+  {R1*3}
+\\
+  \revert MultiMeasureRest #'staff-position
+  {R1*3}
+>>
+}
+
diff --git a/input/texidocs/GNUmakefile b/input/texidocs/GNUmakefile
new file mode 100644 (file)
index 0000000..6142dd9
--- /dev/null
@@ -0,0 +1,5 @@
+depth=../..
+
+EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
+
+include $(depth)/make/stepmake.make
diff --git a/input/texidocs/preventing-extra-naturals-from-being-automatically-added.texidoc b/input/texidocs/preventing-extra-naturals-from-being-automatically-added.texidoc
new file mode 100644 (file)
index 0000000..75d3e46
--- /dev/null
@@ -0,0 +1,6 @@
+  texidocfr = "
+En accord avec les règles standards de l'écriture musicale, on grave
+un bécarre avant un dièse ou un bémol si on a besoin d'annuler une
+altération précédente.  Pour modifier ce comportement, assignez la propriété
+@code{extraNatural} du contexte @code{Staff} à la valeur @code{##f} (faux).
+"
index b6da29332b1d427181346fc09e263a5e7934527a..54bb6681bf588d992dc0c5faf19487f46f9a1fb6 100644 (file)
@@ -183,6 +183,13 @@ textLengthOff = {
 showStaffSwitch = \set followVoice = ##t
 hideStaffSwitch = \set followVoice = ##f
 
+expandFullBarRests = {
+  \set Score.skipBars = ##f
+}
+
+compressFullBarRests = {
+  \set Score.skipBars = ##t
+}
 
 
 % For drawing vertical chord brackets with \arpeggio
index 45ed1863534dcd6f316f784a1326de74d2e9bb11..e6f12ba7b03d7ef295ea6db3258217caeba05560 100644 (file)
@@ -29,7 +29,8 @@ LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-
 ## override from cmd line to speed up. 
 ANTI_ALIAS_FACTOR=2
 LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),)
-LILYPOND_BOOK_LILYPOND_FLAGS=-dbackend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=$(ANTI_ALIAS_FACTOR)
+LANG_TEXIDOC_FLAG=$(if $(ISOLANG),--header=texidoc$(ISOLANG),)
+LILYPOND_BOOK_LILYPOND_FLAGS=-dbackend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc $(LANG_TEXIDOC_FLAG) -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=$(ANTI_ALIAS_FACTOR)
 LILYPOND_BOOK_VERBOSE = --verbose
 LILYPOND_BOOK_INFO_IMAGES_DIR = $(if $(INFO_IMAGES_DIR),--info-images-dir=$(INFO_IMAGES_DIR),)
 LILYPOND_BOOK_FLAGS = $(LILYPOND_BOOK_VERBOSE) $(LILYPOND_BOOK_INFO_IMAGES_DIR)
index 5e6ff2b32a0870e2b2f202e9cad63e950cc8461d..d4af98cf65f975e616e2cb0aec988b56e9a4adc5 100644 (file)
@@ -206,6 +206,7 @@ FILTER = 'filter'
 FRAGMENT = 'fragment'
 HTML = 'html'
 INDENT = 'indent'
+LANG = 'lang'
 LATEX = 'latex'
 LAYOUT = 'layout'
 LINE_WIDTH = 'line-width'
@@ -512,6 +513,7 @@ simple_options = [
     NOINDENT,
     PRINTFILENAME,
     TEXIDOC,
+    LANG,
     VERBATIM,
     FONTLOAD,
     FILENAME,
@@ -814,6 +816,8 @@ def split_options (option_string):
                     option_string)
     return []
 
+texinfo_lang_re = re.compile ('(?m)^@documentlanguage (.*?)( |$)')
+
 def set_default_options (source):
     global default_ly_options
     if not default_ly_options.has_key (LINE_WIDTH):
@@ -822,6 +826,11 @@ def set_default_options (source):
             default_ly_options[LINE_WIDTH] = \
              '''%.0f\\pt''' % textwidth
         elif global_options.format == TEXINFO:
+            m = texinfo_lang_re.search (source)
+            if m and not m.group (1).startswith ('en'):
+                default_ly_options[LANG] = m.group (1)
+            else:
+                default_ly_options[LANG] = ''
             for (k, v) in texinfo_line_widths.items ():
                 # FIXME: @layout is usually not in
                 # chunk #0:
@@ -1261,7 +1270,10 @@ class Lilypond_snippet (Snippet):
         base = self.basename ()
         if TEXIDOC in self.option_dict:
             texidoc = base + '.texidoc'
-            if os.path.exists (texidoc):
+            translated_texidoc = texidoc + default_ly_options[LANG]
+            if os.path.exists (translated_texidoc):
+                str += '@include %(translated_texidoc)s\n\n' % vars ()
+            elif os.path.exists (texidoc):
                 str += '@include %(texidoc)s\n\n' % vars ()
 
         substr = ''
@@ -1756,13 +1768,10 @@ def do_file (input_filename):
             progress ('\n')
             return do_file (name)
 
-        include_chunks = map (process_include,
-                   filter (lambda x: is_derived_class (x.__class__,
-                                     Include_snippet),
-                       chunks))
-
+        include_chunks = [process_include (c) for c in chunks
+                          if is_derived_class (c.__class__, Include_snippet)]
 
-        return chunks + reduce (lambda x,y: x + y, include_chunks, [])
+        return chunks + reduce (operator.add, include_chunks, [])
         
     except Compile_error:
         os.chdir (original_dir)