depth = ..
NAME = documentation
-LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
+LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
SUBDIRS=user bibliography pictures topdocs misc po $(LANGS)
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly
<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Schnipsel</a>
(auf <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">einer großen Seite</a>,
-als <a class="title" href="../input/lsr/lilypond-snippets.pdf">PDF</a>)
+als <a class="title" href="user/lilypond-snippets.pdf">PDF</a>)
<br>(Schnelle Tricks, Tipps und Beispiele.)
</ul>
<ul>
<li>
- <a class="title" href="user/lilypond-program/index.html">Utilización del programa (UP)</a>
+ <a class="title" href="user/lilypond-program/index.es.html">Utilización del programa (UP)</a>
(en <a class="title" href="user/lilypond-program-big-page.html">una sola página</a>,
-en <a class="title" href="user/lilypond-program.pdf">PDF</a>)
+en <a class="title" href="user/lilypond-program.es.pdf">PDF</a>)
<br>(cómo instalar y ejecutar el programa)
<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Fragmentos de código</a>
<br>— installation et exécution des programmes
<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Exemples de code</a>
(en <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">une seule grande page</a>,
-au format <a class="title" href="../input/lsr/lilypond-snippets.pdf">PDF</a>)
+au format <a class="title" href="user/lilypond-snippets.pdf">PDF</a>)
<br>— petits trucs, astuces et exemples
</ul>
</td>
@end ignore
+@item
+@command{lilypond-book} can run any program instead of @command{latex}
+to guess the line width, thanks to @code{--latex} command line option.
+
@item
@code{\setEasyHeads} has been renamed to @code{\easyHeadsOn}, and a new
command @code{\easyHeadsOff} reverts note heads to normal heads.
$(outdir)/source:
@rm -f $(@)
- ln -sf ../../ $(@)
+ ln -sf $(depth) $(@)
$(outdir)/%/source:
@rm -f $(@)
mkdir -p $(dir $@)
- ln -sf ../../../ $(@)
+ ln -sf $(depth)/.. $(@)
local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
$(datafiles) $(PDF_FILES) $(source-links) info
@c TODO Add refs
TBC
-@ignore
-TODO This section needs splitting.
- The part showing the rhythm of a melody should be moved to
- 1.2.3 Displaying rhythms, but the example should be changed
- to omit the drum roll.
- A better example of drum rolls should be devised and placed in
- Basic percussion notation. -td
-
-@node Showing melody rhythms
-@subsubsection Showing melody rhythms
-
-Sometimes you might want to show only the rhythm of a melody. This
-can be done with the rhythmic staff. All pitches of notes on such a
-staff are squashed, and the staff itself has a single line
-
-@lilypond[quote,ragged-right,fragment,relative=1,verbatim]
-\new RhythmicStaff {
- \time 4/4
- c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
-}
-@end lilypond
@seealso
Internals Reference: @internalsref{RhythmicStaff}.
-@end ignore
-
@node Basic percussion notation
@subsubsection Basic percussion notation
Percussion notes may be entered in @code{\drummode} mode, which is
similar to the standard mode for entering notes. Each piece of
-percussion has a full name and an abbreviated name, and both can be used
-in input files
+percussion has a full name and an abbreviated name, and both can
+be used in input files. The simplest way to enter percussion notes
+is to use the @code{\drums} command, which creates the correct
+context and entry mode for percussion:
@lilypond[quote,ragged-right,verbatim]
\drums {
}
@end lilypond
+This is shorthand for
+
+@lilypond[quote,ragged-right,verbatim]
+\new DrumStaff
+\drummode {
+ hihat hh bassdrum bd
+}
+@end lilypond
+
+
The complete list of drum names is in the init file
@file{ly/@/drumpitch@/-init@/.ly}.
@c TODO: properly document this.
+Drum rolls are indicated with three slashes across the stem.
+For quarter notes or longer the three slashes are shown explicitly,
+eighth notes are shown with two slashes (the beam being the third),
+and drum rolls shorter than eighths have one stem slash to
+supplement the beams. This is achieved with the tremolo notation,
+@code{:32}, see @ref{Tremolo repeats}. Here's an example of
+some snare rolls:
+
+@lilypond[quote,ragged-right,verbatim]
+\new DrumStaff
+\drummode {
+ \time 2/4
+ sn16 sn8 sn16 sn8 sn8:32~ |
+ sn8 sn8 sn4:32~ |
+ sn4 sn8 sn16 sn16 |
+ sn4 r4 |
+}
+@end lilypond
+
+Sticking can be indicated by placing @code{^"R"} or @code{^"L"}
+after the note. The @code{staff-padding} property may be
+overridden to achieve a pleasing baseline.
+
+@c TODO Add example of sticking
+
@seealso
Internals Reference: @internalsref{note-event}.
@node Showing melody rhythms
@subsubsection Showing melody rhythms
-TODO
+Sometimes you might want to show only the rhythm of a melody. This
+can be done with the rhythmic staff. All pitches of notes on such a
+staff are squashed, and the staff itself has a single line
+
+@c TODO Devise a more realistic example, perhaps with lyrics -td
+@lilypond[quote,ragged-right,fragment,relative=1,verbatim]
+\new RhythmicStaff {
+ \time 4/4
+ c4 e8 f g2 | r4 g r2 | g1 | r1 |
+}
+@end lilypond
@node Beams
@node References for unfretted strings
@subsubsection References for unfretted strings
-@c TODO Add refs to fingerings, \thumb, bowings, harmonics
+@c TODO Add refs to fingerings, \thumb, bowings
+@c TODO Add multiple fingering indications?
+@c TODO Add snippet showing pizzicato markings
TBC
+@c TODO Decide whether to resurrect Bowed instruments subsection
+@c and if so which of the above should go there
@ignore
@node Bowed instruments
@node Harp
@subsubsection Harp
-@c TODO add \sacredHarpHeads, expanded or ref?
-TBC
+Sacred Harp notation uses four shaped note heads. In the major,
+the tonic is a triangle and then proceeding up the scale you
+have circle, square, triangle, circle, square, diamond. In the
+minor, the shapes should be assigned to keep the same interval
+relationships, e.g. you assign them for the relative major. (This
+means that the scale in the minor gives the tonic a square.)
+
+@c TODO add example of \sacredHarpHeads, or a ref?
+
+
+@knownissues
+
+The \sacredHarpHeads command gives the wrong shapes when the key
+is minor. A work-around is to switch the key to the relative
+major to obtain the right shapes.
}
@end lilypond
+@snippets
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
+{aligning-lyrics.ly}
+
+@c TODO Create and add lsr example of lyricMelismaAlignment
+@c It's used like this to center-align all lyric syllables,
+@c even when notes are tied. -td
+
+@ignore
+\layout
+{
+ \context { \Score lyricMelismaAlignment = #0 }
+}
+@end ignore
+
@node Centering lyrics between staves
@subsubsection Centering lyrics between staves
@noindent
These numbers are put just before the start of the first syllable.
+@c TODO Create and add snippet to show how two lines of a
+@c stanza can be grouped together, along these lines:
+@c (might need improving a bit) -td
+
+@ignore
+leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
+#"brace105" }
+
+stanzaOneOne = {
+ \set stanza = \markup { "1. " \leftbrace }
+ \lyricmode { Child, you're mine and I love you.
+ Lend thine ear to what I say.
+ ...
+ }
+}
+
+stanzaOneThree = {
+% \set stanza = \markup { " "}
+ \lyricmode { Child, I have no great -- er joy
+ Than to have you walk in truth.
+...
+ }
+}
+@end ignore
@node Adding dynamics marks to stanzas
@subsubsection Adding dynamics marks to stanzas
# bootstrap stepmake:
#
STEPMAKE_TEMPLATES=toplevel po install
+LOCALSTEPMAKE_TEMPLATES=lilypond
+
include $(depth)/make/stepmake.make
echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess
$(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/
find $(outdir) -name '*-root' | xargs rm -rf
- $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(outdir) "$(WEB_TARGETS)"
+ $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(outdir) "$(WEB_TARGETS)"
find $(outdir)/offline-root -type l -delete
return page_flavors
-def add_html_footer (translation,
- package_name = '',
+def add_html_footer (package_name = '',
package_version = '',
target = 'offline',
name_filter = lambda s: s):
"""Add header, footer to a number of HTML files
Arguments:
- translation gettext translations dictionary, with language codes as keys
package_name=NAME set package_name to NAME
package_version=VERSION set package version to VERSION
targets=offline|online set page processing depending on the target
negotiation
name_filter a HTML file name filter
"""
+ translation = langdefs.translation
localtime = time.strftime ('%c %Z', time.localtime (time.time ()))
if re.search ("http://", mail_address):
#!@PYTHON@
# html-gettext.py
-# USAGE: html-gettext.py [-o OUTDIR] BUILDSCRIPT-DIR LOCALEDIR LANG FILES
+# USAGE: html-gettext.py [-o OUTDIR] LANG FILES
#
# -o OUTDIR specifies that output files should be written in OUTDIR
# rather than be overwritten
import re
import os
import getopt
-import gettext
+
+import langdefs
optlist, args = getopt.getopt(sys.argv[1:],'o:')
-buildscript_dir, localedir, lang = args[0:3]
+lang = args[0]
+files = args [1:]
outdir = '.'
for x in optlist:
if x[0] == '-o':
outdir = x[1]
-sys.path.append (buildscript_dir)
-import langdefs
-
double_punct_char_separator = langdefs.LANGDICT[lang].double_punct_char_sep
-t = gettext.translation('lilypond-doc', localedir, [lang])
-my_gettext = t.gettext
+my_gettext = langdefs.translation[lang]
html_codes = ((' -- ', ' – '),
(' --- ', ' — '))
def crossmanual_ref_gettext (m):
return '<a href="' + m.group(1) + '">' + _(m.group(2)) + '</a>'
-for filename in args[3:]:
+for filename in files:
f = open (filename, 'r')
page = f.read ()
f.close()
+++ /dev/null
-#!@PYTHON@
-#-*- coding: utf-8 -*-
-
-"""
-Documentation i18n module
-"""
-
-import re
-
-def lang_file_name (p, langext, ext):
- if langext != '':
- return p + '.' + langext + ext
- return p + ext
-
-class LanguageDef:
- def __init__ (self, code, name, webext=None, double_punct_char_sep='', html_filter=lambda s: s):
- self.code = code
- self.name = name
- self.enabled = True
- if webext == None:
- self.webext = self.code
- else:
- self.webext = webext
- self.double_punct_char_sep = double_punct_char_sep
- self.html_filter = html_filter
-
- def file_name (self, prefix, ext):
- return lang_file_name (prefix, self.webext, ext)
-
-
-# All language information needed for documentation i18n is defined
-# here. For each 'Documentation/ab' directory containing docs
-# translated in 'ab', there should be one entry in LANGUAGES.
-
-site = LanguageDef ('en', 'English', webext='')
-
-html_page_body = re.compile ('</?body>', re.M | re.I)
-french_html_typo_rules = ((' :', ' :'),
- (' ;', ' ;'),
- (' ?', ' ?'),
- (' !', ' !'))
-
-def french_html_filter (page):
- parts = html_page_body.split (page)
- for r in french_html_typo_rules:
- parts[1] = parts[1].replace (r[0], r[1])
- return parts[0] + '<body>' + parts[1] + '</body>' + parts[2]
-
-fr = LanguageDef ('fr', 'français', double_punct_char_sep=' ', html_filter = french_html_filter)
-es = LanguageDef ('es', 'español')
-de = LanguageDef ('de', 'deutsch')
-
-# Outdated or broken translations may be disabled
-# (please run 'make web-clean' before doing that):
-#fr.enabled = False
-
-LANGUAGES = (site, fr, es, de)
-
-if __name__ == '__main__':
- print ' '.join ([l.code for l in LANGUAGES if l.enabled and l.code != 'en'])
-else:
- LANGDICT = {}
- for l in LANGUAGES:
- LANGDICT[l.code] = l
return f
return f[len (source_dir) + 1:]
-destfiles = map (lambda f: os.path.join (dest_dir, insert_suffix (relative_path (f))), sourcefiles)
+destfiles = [os.path.join (dest_dir, insert_suffix (relative_path (f))) for f in sourcefiles]
+
+destdirs = set ([os.path.dirname (dest) for dest in destfiles])
+[os.makedirs (d) for d in destdirs if not os.path.exists (d)]
def force_link (src,dest):
if os.path.exists (dest):
for current_dir, dirs, files in os.walk(d):
i = 0
while i < len(dirs):
- if exclude_dirs_re.search (dirs[i]):
+ if exclude_dirs_re.search (os.path.join (current_dir, dirs[i])):
del dirs[i]
else:
p = os.path.join (current_dir, dirs[i])
# -*- coding: utf-8 -*-
# texi-gettext.py
-# USAGE: texi-gettext.py [-o OUTDIR] BUILDSCRIPT-DIR LOCALEDIR LANG FILES
+# USAGE: texi-gettext.py [-o OUTDIR] LANG FILES
#
# -o OUTDIR specifies that output files should rather be written in OUTDIR
#
import re
import os
import getopt
-import gettext
+
+import langdefs
optlist, args = getopt.getopt (sys.argv[1:],'o:')
-buildscript_dir, localedir, lang = args[0:3]
+lang = args[0]
+files = args[1:]
outdir = '.'
for x in optlist:
if x[0] == '-o':
outdir = x[1]
-sys.path.append (buildscript_dir)
-import langdefs
-
double_punct_char_separator = langdefs.LANGDICT[lang].double_punct_char_sep
-t = gettext.translation('lilypond-doc', localedir, [lang])
-_doc = t.gettext
+_doc = langdefs.translation[lang]
-include_re = re.compile (r'@include ((?!lily-).*?)\.texi$', re.M)
+include_re = re.compile (r'@include ((?!../lily-).*?)\.texi$', re.M)
whitespaces = re.compile (r'\s+')
ref_re = re.compile (r'(?ms)@(rglos|ruser|rprogram|ref)(\{)(.*?)(\})')
node_section_re = re.compile (r'@(node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading)( )(.*?)(\n)')
if os.path.exists (p):
process_file (p)
-for filename in args[3:]:
+for filename in files:
process_file (filename)
import sys
import os
import re
-import gettext
-package_name, package_version, buildscript_dir, localedir, outdir, targets = sys.argv[1:]
+package_name, package_version, buildscript_dir, outdir, targets = sys.argv[1:]
targets = targets.split (' ')
outdir = os.path.normpath (outdir)
doc_dirs = ['input', 'Documentation', outdir]
dirs, symlinks, files = mirrortree.walk_tree (
tree_roots = doc_dirs,
process_dirs = outdir,
- exclude_dirs = '(^|/)(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + r'|po|out|.*?[.]t2d|\w*?-root)(/|$)',
+ exclude_dirs = '(^|/)(' + r'|po|out|out-test|.*?[.]t2d|\w*?-root)(/|$)|Documentation/(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + ')',
find_files = r'.*?\.(?:midi|html|pdf|png|txt|ly|signature)$|VERSION',
exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')
f.write ('#.htaccess\nDirectoryIndex index\n')
f.close ()
-# load gettext messages catalogs
-translation = {}
-for l in langdefs.LANGUAGES:
- if l.enabled and l.code != 'en':
- translation[l.code] = gettext.translation('lilypond-doc', localedir, [l.code]).gettext
-
add_html_footer.build_pages_dict (html_files)
for t in targets:
sys.stderr.write ("Processing HTML pages for %s target...\n" % t)
add_html_footer.add_html_footer (
- translation = translation,
package_name = package_name,
package_version = package_version,
target = t,
$(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) $(LY_FILES)
+source-links = $(outdir)/source $(outdir)/lilypond-snippets/source
+
+$(outdir)/source:
+ @rm -f $(@)
+ ln -sf $(depth) $(@)
+
+$(outdir)/%/source:
+ @rm -f $(@)
+ mkdir -p $(dir $@)
+ ln -sf $(depth)/.. $(@)
+
info: $(INFO_FILES)
ifneq ($(out),www)
local-WWW: info $(outdir)/lilypond-snippets.pdf \
$(outdir)/lilypond-snippets/index.html \
- $(outdir)/lilypond-snippets-big-page.html
+ $(outdir)/lilypond-snippets-big-page.html \
+ $(source-links)
@end tex
@end iftex
+@include version.itexi
+
@dircategory GNU LilyPond --- the music typesetter
@direntry
* LilyPond Snippets: (lilypond-snippets). Short tricks, tips, and examples.
Please note that it is not an exact subset of LSR: some snippets come
from @file{input/new} LilyPond sources directory, and snippets from LSR
are converted through @command{convert-ly}, as LSR is based on a stable
-LilyPond version, and this document is for version @value{version}.
+LilyPond version, and this document is for version @version{}.
Snippets are grouped by tags; tags listed in the table of contents match
a section of LilyPond notation manual. Snippets may have several tags,
-$(MAKEINFO) -P $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
$(outdir)/%.pdftexi: $(outdir)/%.texi doc-po $(outdir)/version.itexi
- $(PYTHON) $(buildscript-dir)/texi-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG) $<
+ $(PYTHON) $(buildscript-dir)/texi-gettext.py $(ISOLANG) $<
$(outdir)/%.pdf: $(outdir)/%.pdftexi
cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) $(TEXINFO_PAPERSIZE_OPTION) $(notdir $*).pdftexi
# BIG_PAGE_HTML_FILES is defined differently in each language makefile
local-WWW: $(DEEP_HTML_FILES) $(PDF_FILES) doc-po $(BIG_PAGE_HTML_FILES)
- find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG)
+ find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(ISOLANG)
find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf)
- find $(outdir) \( -name 'lily-??????????.png' -o -name 'lily-??????????.ly' \) | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir)
+ find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir)
doc-po:
$(MAKE) -C $(depth)/Documentation/po out=www messages
TEXINPUTS=$(top-src-dir)/tex/::
export TEXINPUTS
+export LYDOC_LOCALEDIR:= $(top-build-dir)/Documentation/po/out-www
+
#texi-html for www only:
LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html)
LY2DVI = $(LILYPOND_BINARY)
--- /dev/null
+#!@PYTHON@
+#-*- coding: utf-8 -*-
+
+"""
+Documentation i18n module
+"""
+
+import re
+
+def lang_file_name (p, langext, ext):
+ if langext != '':
+ return p + '.' + langext + ext
+ return p + ext
+
+class LanguageDef:
+ def __init__ (self, code, name, webext=None, double_punct_char_sep='', html_filter=lambda s: s):
+ self.code = code
+ self.name = name
+ self.enabled = True
+ if webext == None:
+ self.webext = self.code
+ else:
+ self.webext = webext
+ self.double_punct_char_sep = double_punct_char_sep
+ self.html_filter = html_filter
+
+ def file_name (self, prefix, ext):
+ return lang_file_name (prefix, self.webext, ext)
+
+
+# All language information needed for documentation i18n is defined
+# here. For each 'Documentation/ab' directory containing docs
+# translated in 'ab', there should be one entry in LANGUAGES.
+
+site = LanguageDef ('en', 'English', webext='')
+
+html_page_body = re.compile ('</?body>', re.M | re.I)
+french_html_typo_rules = ((' :', ' :'),
+ (' ;', ' ;'),
+ (' ?', ' ?'),
+ (' !', ' !'))
+
+def french_html_filter (page):
+ parts = html_page_body.split (page)
+ for r in french_html_typo_rules:
+ parts[1] = parts[1].replace (r[0], r[1])
+ return parts[0] + '<body>' + parts[1] + '</body>' + parts[2]
+
+fr = LanguageDef ('fr', 'français', double_punct_char_sep=' ', html_filter = french_html_filter)
+es = LanguageDef ('es', 'español')
+de = LanguageDef ('de', 'deutsch')
+
+# Outdated or broken translations may be disabled
+# (please run 'make web-clean' before doing that):
+#fr.enabled = False
+
+LANGUAGES = (site, fr, es, de)
+
+if __name__ == '__main__':
+ print ' '.join ([l.code for l in LANGUAGES if l.enabled and l.code != 'en'])
+else:
+ LANGDICT = {}
+ for l in LANGUAGES:
+ LANGDICT[l.code] = l
+
+ try:
+ import gettext
+ import os
+
+ translation = {}
+ for l in LANGUAGES:
+ if l.enabled and l.code != 'en':
+ t = gettext.translation('lilypond-doc',
+ os.environ['LYDOC_LOCALEDIR'],
+ [l.code])
+ translation[l.code] = t.gettext
+ except:
+ sys.stderr.write ('URGUHIU\n')
+ translation = dict ([(l.code, lambda x: x) for l in LANGUAGES])
action='store', dest='info_images_dir',
default='')
+ p.add_option ('--latex',
+ help=_ ("Run executable PROG instead of latex"),
+ metavar=_ ("PROG"),
+ action='store', dest='latex_program',
+ default='latex')
+
p.add_option ('--left-padding',
metavar=_ ("PAD"),
dest="padding_mm",
default_ly_options = { 'alt': "[image of music]" }
+document_language = ''
+
#
# Is this pythonic? Personally, I find this rather #define-nesque. --hwn
#
texinfo_lang_re = re.compile ('(?m)^@documentlanguage (.*?)( |$)')
def set_default_options (source, default_ly_options, format):
+ global document_language
if LINE_WIDTH not in default_ly_options:
if format == LATEX:
textwidth = get_latex_textwidth (source)
elif format == TEXINFO:
m = texinfo_lang_re.search (source)
if m and not m.group (1).startswith ('en'):
- default_ly_options[LANG] = m.group (1)
+ document_language = m.group (1)
else:
- default_ly_options[LANG] = ''
+ document_language = ''
for regex in texinfo_line_widths:
# FIXME: @layout is usually not in
# chunk #0:
base = self.basename ()
if TEXIDOC in self.option_dict:
texidoc = base + '.texidoc'
- translated_texidoc = texidoc + default_ly_options[LANG]
+ translated_texidoc = texidoc + document_language
if os.path.exists (translated_texidoc):
str += '@include %(translated_texidoc)s\n\n' % vars ()
elif os.path.exists (texidoc):
tmp_handle.write (latex_document)
tmp_handle.close ()
- ly.system ('latex %s' % tmpfile, be_verbose=global_options.verbose)
+ ly.system ('%s %s' % (global_options.latex_program, tmpfile),
+ be_verbose=global_options.verbose)
parameter_string = file (logfile).read()
os.unlink (tmpfile)
$(outdir)/%.txt: $(outdir)/%.1
troff -man -Tascii $< | grotty -b -u -o > $@
-include $(stepdir)/texinfo-rules.make
-