@code{\TEXT\}@c should use internalsref
@end macro
+@macro lydoctitle {TEXT}
+@emph{\TEXT\}
+
+@end macro
@macro funindex {TEXT}
@findex \TEXT\
@code{\TEXT\}
@end macro
+@macro lydoctitle {TEXT}
+@emph{\TEXT\}
+
+@end macro
+
@macro funindex {TEXT}
@findex \TEXT\
@kindex \TEXT\
@code{\TEXT\}
@end macro
+@macro lydoctitle {TEXT}
+@emph{\TEXT\}
+
+@end macro
+
@macro funindex {TEXT}
@findex \TEXT\
@kindex \TEXT\
DEST_INFO_IMAGES_SUBDIR = Documentation/user
endif
-STEPMAKE_TEMPLATES=tex texinfo omf documentation
+STEPMAKE_TEMPLATES=texinfo omf documentation
OMF_FILES += $(outdir)/lilypond-internals.html.omf
LOCALSTEPMAKE_TEMPLATES=lilypond ly
## unused
$(outdir)/interfaces.itexi: dummy
cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
+
+.SECONDARY:
Most LilyPond test documents (in the @file{input} directory of the
distribution) are small @file{.ly} files which look exactly like this.
+For localization purpose, if the Texinfo document contains
+@code{@@documentlanguage @var{LANG}} and @file{foo@/.ly} header
+contains a @code{texidoc@var{LANG}} field, and if @command{lilypond}
+is called with @option{--header=@/texidoc@var{LANG}}, then
+@file{foo@/.texidoc@var{LANG}} will be included instead of
+@file{foo@/.texidoc}.
+
@item lilyquote
(Only for Texinfo output.) This option is similar to quote, but only
the music snippet (and the optional verbatim block implied by
useful if you want to @code{quote} the music snippet but not the
@code{texidoc} documentation block.
+@item doctitle
+(Only for Texinfo output.) This option works similarly to
+@code{texidoc} option: if @command{lilypond} is called with the
+@option{--header=@/doctitle} option, and the file to be processed is
+called @file{foo@/.ly} and contains a @code{doctitle} field in the
+@code{\header}, it creates a file @file{foo@/.doctitle}. When
+@code{doctitle} option is used, the contents of @file{foo@/.doctitle},
+which should be a single line of @var{text}, is inserted in the
+Texinfo document as @code{@@lydoctitle @var{text}}.
+@code{@@lydoctitle} should be a macro defined in the Texinfo document.
+The same remark about @code{texidoc} processing with localized
+languages also applies to @code{doctitle}.
+
@item printfilename
If a LilyPond input file is included with @code{\lilypondfile}, print
the file name right before the music snippet. For HTML output, this
@end macro
+@macro lydoctitle {TEXT}
+@emph{\TEXT\}
+
+@end macro
+
@macro funindex {TEXT}
@findex \TEXT\
@kindex \TEXT\
@end iftex
-
-@c EOF
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{preventing-extra-naturals-from-being-automatically-added.ly}
@seealso
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{tweaking-clef-properties.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{non-traditional-key-signatures.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{ottava-text.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{adding-ambitus-per-voice.ly}
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{ambitus-with-multiple-voices.ly}
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc]
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
{applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
@noindent
src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
-web-clean: snippets-clean
- $(MAKE) out=www clean
- $(MAKE) $(tree-share-prefix)/lilypond-force
+web-clean: snippets-clean $(tree-share-prefix)/lilypond-force
default: $(config_h) build-dir-setup
# urg, can't name itely templates foo.itely.in because of standard rule
-STEPMAKE_TEMPLATES=documentation texinfo tex
+STEPMAKE_TEMPLATES=documentation texinfo
LOCALSTEPMAKE_TEMPLATES=lilypond ly
EXTRA_DIST_FILES += README $(call src-wildcard,*.snippet-list)
+default:
+
ifneq ($(out),)
MAIN_INFO_DOC = lilypond-snippets
INFO_DOCS = lilypond-snippets
DEST_INFO_IMAGES_SUBDIR = input/lsr
endif
-default:
-
include $(depth)/make/stepmake.make
IN_ITELY_FILES = $(call src-wildcard,*-intro.itely)
GENERATED_ITELY_FILES = $(IN_ITELY_FILES:%-intro.itely=$(outdir)/%.itely)
$(outdir)/%.itely: %-intro.itely %.snippet-list
- xargs $(PYTHON) $(buildscript-dir)/lys-to-tely.py -f printfilename,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
+ xargs $(PYTHON) $(buildscript-dir)/lys-to-tely.py -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
$(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) $(LY_FILES)
$(outdir)/lilypond-snippets/index.html \
$(outdir)/lilypond-snippets-big-page.html \
$(source-links)
+
+.SECONDARY:
@include version.itexi
+@macro lydoctitle{TEXT}
+@section \TEXT\
+@end macro
+
@dircategory GNU LilyPond --- the music typesetter
@direntry
* LilyPond Snippets: (lilypond-snippets). Short tricks, tips, and examples.
ANTI_ALIAS_FACTOR=2
LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),)
LANG_TEXIDOC_FLAGS:=$(foreach lang,$(LANGS),--header=texidoc$(lang))
+LANG_DOCTITLE_FLAGS:=$(foreach lang,$(LANGS),--header=doctitle$(lang))
LILYPOND_BOOK_LILYPOND_FLAGS=-dbackend=eps \
--formats=ps,png,pdf \
$(LILYPOND_JOBS) \
-dinclude-eps-fonts \
-dgs-load-fonts \
+--header=doctitle \
+$(LANG_DOCTITLE_FLAGS) \
--header=texidoc \
$(LANG_TEXIDOC_FLAGS) \
-I $(top-src-dir)/input/manual \
RAGGED_RIGHT = 'ragged-right'
RELATIVE = 'relative'
STAFFSIZE = 'staffsize'
+DOCTITLE = 'doctitle'
TEXIDOC = 'texidoc'
TEXINFO = 'texinfo'
VERBATIM = 'verbatim'
NOFRAGMENT,
NOINDENT,
PRINTFILENAME,
+ DOCTITLE,
TEXIDOC,
LANG,
VERBATIM,
map (consider_file, [base + '.tex',
base + '.eps',
base + '.texidoc',
- base + '.texidoc' + document_language,
+ base + '.doctitle',
base + '-systems.texi',
base + '-systems.tex',
base + '-systems.pdftexi'])
+ if document_language:
+ map (consider_file,
+ [base + '.texidoc' + document_language,
+ base + '.doctitle' + document_language])
# UGH - junk global_options
if (base + '.eps' in result and self.format in (HTML, TEXINFO)
def output_texinfo (self):
str = self.output_print_filename (TEXINFO)
base = self.basename ()
+ if DOCTITLE in self.option_dict:
+ doctitle = base + '.doctitle'
+ translated_doctitle = doctitle + document_language
+ if os.path.exists (translated_doctitle):
+ str += '@lydoctitle %s\n' % open (translated_doctitle).read ()
+ elif os.path.exists (doctitle):
+ str += '@lydoctitle %s\n' % open (doctitle).read ()
if TEXIDOC in self.option_dict:
texidoc = base + '.texidoc'
translated_texidoc = texidoc + document_language
web:
$(MAKE) out=www WWW
$(MAKE) out=www WWW-post
+
+web-clean:
+ $(MAKE) out=www clean