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),)
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:
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
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
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
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.
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
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
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
\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.
@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
\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.
@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
\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.
@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::
@node Writing pitches
@subsection Writing pitches
-Intro text.
+Cette section
@menu
* Normal pitches::
@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
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
\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 {
\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 {
}
\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
@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}.
--- /dev/null
+#!@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)
import __main__
import optparse
-import gettext
import os
-import re
import sys
verbose = 0
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 ('/')
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.")
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 ()
DEST = os.path.join ('input', 'lsr')
NEW_LYS = os.path.join ('input', 'new')
+TEXIDOCS = os.path.join ('input', 'texidocs')
TAGS = []
# NR 1
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
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)
import string
import os
import gettext
-import subprocess
def progress (str):
sys.stderr.write (str + '\n')
sys.path.append (buildscript_dir)
import langdefs
+import buildlib
# load gettext messages catalogs
translation = {}
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)
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)
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')},
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
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]
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])
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
\consists "Ambitus_engraver"
} \relative c' {
\voiceTwo
- es4 f g as b1
+ es4 f g as b1
}
>>
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.\)
}
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
>>
\new DrumStaff <<
\set Staff.instrumentName = "drums"
- \new DrumVoice {\stemUp \drh }
- \new DrumVoice {\stemDown \drl }
+ \new DrumVoice { \stemUp \drh }
+ \new DrumVoice { \stemDown \drl }
>>
>>
}
\context {
\Score
tempoWholesPerMinute = #(ly:make-moment 120 4)
- }
}
+ }
}
-
--- /dev/null
+%% 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" }
+}
--- /dev/null
+%% 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
+}
--- /dev/null
+%% 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 >
+}
--- /dev/null
+%% 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>
+}
+
+++ /dev/null
-%% 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>
-}
-
--- /dev/null
+%% 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' } }
+ >>
--- /dev/null
+%% 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>
+}
--- /dev/null
+%% 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
+}
\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 = {
\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
{
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
{
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
{
--- /dev/null
+%% 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
+}
+
--- /dev/null
+%% 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
+}
--- /dev/null
+%% 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
+}
" }
% 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
+ }
+>>
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 "||"
+ }
}
+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
--- /dev/null
+%% 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
+}
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
--- /dev/null
+%% 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 >
+}
" }
% 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" >>
))))
\score {
- \new Staff {
- \time 5/4
-
- \rhythm c'
- \rhythm c''
- \rhythm g
- }
+ \new Staff {
+ \time 5/4
+ \rhythm c'
+ \rhythm c''
+ \rhythm g
+ }
}
-
\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 }
}
+
--- /dev/null
+%% 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
+}
\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
" }
% 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
c' dis' cis' cis'
c' c' dis' des'
}
+ \layout {
+ \context { \Staff \remove "Key_engraver" }
+ }
}
-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
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
--- /dev/null
+%% 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
+ }
+ }
+>>
--- /dev/null
+%% 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
+ }
+ }
+>>
--- /dev/null
+%% 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
+ }
+>>
--- /dev/null
+%% 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
+}
--- /dev/null
+%% 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>
+}
" }
% 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]
}
-
\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.
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
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
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
--- /dev/null
+%% 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}
+>>
+}
+
\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
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
--- /dev/null
+%% 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
+}
--- /dev/null
+%% 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
+}
positioning-segno-and-coda-with-line-break.ly
+adding-volta-brackets-to-additional-staves.ly
volta-multi-staff.ly
+shortening-volta-brackets.ly
" }
% 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
}
-
-
--- /dev/null
+%% 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
+}
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
r4
}
-
% Function to print a specified number of slashes
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 |
}
}
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
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
--- /dev/null
+%% 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 }
+ }
+}
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 }
>>
\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 }
>>
-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
--- /dev/null
+%% 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.
+}
+
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
string-quartet-template-simple.ly
+how-to-add-thumb-fingerings.ly
string-quartet-template-with-separate-parts.ly
demo-midiinstruments.ly
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
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
-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
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
--- /dev/null
+\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
+}
+
--- /dev/null
+\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}
+>>
+}
+
--- /dev/null
+depth=../..
+
+EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
+
+include $(depth)/make/stepmake.make
--- /dev/null
+ 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).
+"
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
## 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)
FRAGMENT = 'fragment'
HTML = 'html'
INDENT = 'indent'
+LANG = 'lang'
LATEX = 'latex'
LAYOUT = 'layout'
LINE_WIDTH = 'line-width'
NOINDENT,
PRINTFILENAME,
TEXIDOC,
+ LANG,
VERBATIM,
FONTLOAD,
FILENAME,
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):
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:
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 = ''
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)