tags
test-output-distance
Documentation/user/lilypond
+input/lsr/lilypond-snippets
in <a class="title" href="user/lilypond-program.pdf">PDF</a>)
<br>(how to install and run the program)
-<li><a class="title" href="../input/lsr/snippets/index.html">Snippets</a>
-(in <a class="title" href="../input/lsr/snippets-big-page.html">one big page</a>,
-in <a class="title" href="../input/lsr/snippets.pdf">PDF</a>)
+<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Snippets</a>
+(in <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">one big page</a>,
+in <a class="title" href="user/lilypond-snippets.pdf">PDF</a>)
<br>(Short tricks, tips, and examples)
</ul>
# this prevents aux files from being reused for translated docs
TEXI2PDF_FLAGS = --tidy
+MAIN_INFO_DOC = lilypond
INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
ifeq ($(out),www)
INFO_IMAGES_DIR = lilypond
+DEST_INFO_IMAGES_SUBDIR = Documentation/user
endif
STEPMAKE_TEMPLATES=tex texinfo omf documentation
xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
-# There are two modes for info: with and without images.
-ifeq ($(out),www)
-
-# This builds all .info targets with images, in out-www.
-# Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
-
-local-install-info: info
- -$(INSTALL) -d $(DESTDIR)$(infodir)
-ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
-## Can not have absolute symlinks because some binary packages build schemes
-## install files in nonstandard root. Best we can do is to notify the
-## builder or packager.
- @echo
- @echo "***************************************************************"
- @echo "Please add or update the LilyPond direntries, do"
- @echo
- @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
- @echo
- @echo "For images in the INFO docs to work, do: "
- @echo
- @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/Documentation/user lilypond)"
- @echo "or add something like that to the postinstall script."
- @echo
-else # installing directly into standard /usr/...
- -$(INSTALL) -d $(DESTDIR)$(infodir)
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
- install-info --info-dir=$(infodir) $(outdir)/lilypond.info
- cd $(infodir) && ln -sfT $(webdir)/Documentation/user lilypond
-endif # installing directly into standard /usr/...
-
-local-uninstall-WWW:
- rm -f $(infodir)/lilypond
-
-else # out!=www
-
-local-install-info: info
- -$(INSTALL) -d $(DESTDIR)$(package_infodir)
-ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
-## Can not have absolute symlinks because some binary packages build schemes
-## install files in nonstandard root. Best we can do is to notify the
-## builder or packager.
- @echo
- @echo "***************************************************************"
- @echo "Please add or update the LilyPond direntries, do"
- @echo
- @echo " install-info --info-dir=$(infodir) out/lilypond.info"
- @echo
- @echo "For images in the INFO docs to work, do"
- @echo
- @echo " make out=www install-info "
- @echo
- @echo "and read the extra instructions."
- @echo
-else # installing directly into standard /usr/...
- -$(INSTALL) -d $(DESTDIR)$(infodir)
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
- -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
- install-info --info-dir=$(infodir) $(outdir)/lilypond.info
- @echo
- @echo "***************************************************************"
- @echo "For images in the INFO docs to work, do"
- @echo
- @echo " make out=www install-info "
- @echo
-endif # installing into standard /usr/* root# installing into /usr/...
-
-endif # out!=www
# All web targets, except info image symlinks and info docs are
# installed in non-recursing target from TOP-SRC-DIR
$(outdir)/lilypond-learning/index.html
# Symlinks to refer to external source documents from split and non-split HTML
-source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
+source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source \
+ $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
$(outdir)/source:
@rm -f $(@)
@ref{\TEXT\,,,lilypond-learning-big-page}
@end macro
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets-big-page}
+@end macro
+
@end ifset
@ref{\TEXT\,,,lilypond-learning}
@end macro
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
@end ifclear
@end ifhtml
@ref{\TEXT\,,,lilypond-learning}
@end macro
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
@end ifdocbook
@ref{\TEXT\,,,lilypond-learning}
@end macro
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
@end ifinfo
@macro rprogram{TEXT}
program usage manual, @ref{\TEXT\,,,lilypond-program}
-@c @internalsref{\TEXT\}
@end macro
@macro ruser{TEXT}
notation reference, @ref{\TEXT\,,,lilypond}
-@c @internalsref{\TEXT\}
@end macro
@macro rlearning{TEXT}
learning manual, @ref{\TEXT\,,,lilypond-learning}
-@c @internalsref{\TEXT\}
+@end macro
+
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
@end macro
@end iftex
splitted_docs_re = re.compile ('(input/lsr/out-www/snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/')
-# On systems without symlinks (e.g. Windows), docs are not very usable
-# Get rid of symlinks references here
+snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets')
+
+## Windows does not support symlinks.
+# This function avoids creating symlinks for splitted HTML manuals
# Get rid of symlinks in GNUmakefile.in (local-WWW-post)
# this also fixes missing PNGs only present in translated docs
-def replace_symlinks_urls (s, prefix):
+def _urls (s, prefix):
if splitted_docs_re.match (prefix):
s = re.sub ('(href|src)="(lily-.*?|.*?[.]png)"', '\\1="../\\2"', s)
+
+ # fix Snippets xrefs ad hoc
+ s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s)
+
source_path = os.path.join (os.path.dirname (prefix), 'source')
if not os.path.islink (source_path):
return s
raise Exception ('unknown option: ' + o)
def name2line (n):
- # UGR
s = r"""
@ifhtml
@html
@end html
@end ifhtml
-@lilypondfile[%s]{%s}""" % (os.path.basename (n), fragment_options, n)
+@lilypondfile[%s]{%s}
+""" % (os.path.basename (n), fragment_options, n)
return s
if files:
if not os.path.exists (dest):
os.symlink (p, dest)
+ ## ad-hoc renaming to make xrefs between PDFs work
+ os.rename (os.path.join (out_root, 'input/lsr/lilypond-snippets.pdf'),
+ os.path.join (out_root, 'Documentation/user/lilypond-snippets.pdf'))
+
# need this for content negotiation with documentation index
if 'online' in targets:
f = open (os.path.join (target_pattern % 'online', 'Documentation/.htaccess'), 'w')
LOCALSTEPMAKE_TEMPLATES=lilypond ly
EXTRA_DIST_FILES += README $(call src-wildcard,*.snippet-list)
+MAIN_INFO_DOC = lilypond-snippets
+INFO_DOCS = lilypond-snippets
+INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
+INFO_IMAGES_DIR = lilypond-snippets
+DEST_INFO_IMAGES_SUBDIR = input/lsr
+
include $(depth)/make/stepmake.make
IN_ITELY_FILES = $(call src-wildcard,*-intro.itely)
$(outdir)/%.itely: %-intro.itely %.snippet-list
xargs $(PYTHON) $(buildscript-dir)/lys-to-tely.py -f printfilename,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
-$(outdir)/snippets.texi: snippets.tely $(GENERATED_ITELY_FILES)
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
+$(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES)
+
+info: $(INFO_FILES)
+
+ifneq ($(out),www)
+# cancel install-info target
+# (there is no lilypond-snippets.info without images)
+local-install-info:
+ true
+endif
-$(outdir)/snippets-big-page.html: $(outdir)/snippets.texi $(OUT_PNG_IMAGES)
- $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
+# All web targets, except info image symlinks and info docs are
+# installed in non-recursing target from TOP-SRC-DIR
+local-install-WWW: local-install-info
+local-uninstall-WWW: local-uninstall-info
-$(outdir)/snippets/index.html: $(outdir)/snippets.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
- mkdir -p $(dir $@)
- $(MAKEINFO) -I$(outdir) --output=$(dir $@) --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
+local-clean:
+ rm -f $(INFO_IMAGES_DIR)
-local-WWW: $(outdir)/snippets.pdf $(outdir)/snippets/index.html $(outdir)/snippets-big-page.html
+local-WWW: info $(outdir)/lilypond-snippets.pdf \
+ $(outdir)/lilypond-snippets/index.html \
+ $(outdir)/lilypond-snippets-big-page.html
--- /dev/null
+\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
+@setfilename lilypond-snippets.info
+@settitle LilyPond snippets
+@documentencoding UTF-8
+@documentlanguage en
+
+@iftex
+@afourpaper
+@c don't replace quotes with directed quotes
+@tex
+\gdef\SETtxicodequoteundirected{Foo}
+\gdef\SETtxicodequotebacktick{Bla}
+@end tex
+@end iftex
+
+@dircategory GNU LilyPond --- the music typesetter
+@direntry
+* LilyPond Snippets: (lilypond-snippets) Short tricks, tips, and examples.
+@end direntry
+
+@finalout
+
+@titlepage
+@title LilyPond
+@subtitle The music typesetter
+@titlefont{Snippets}
+@author LilyPond Snippet Repository contributors
+
+@vskip 20pt
+
+This document shows a selected set of LilyPond snippets from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
+(LSR). It is in the public domain.
+
+We would like to address many thanks to Sebastiano Vigna for maintaining
+LSR web site and database, and the University of Milano for hosting LSR.
+
+Please note that this document 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}.
+
+Snippets are grouped by tags; tags listed in the table of contents match
+a section of LilyPond notation manual. Snippets may have several tags,
+and not all LSR tags may appear in this document.
+
+In the HTML version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+@end titlepage
+
+@iftex
+@contents
+@end iftex
+
+@ifnottex
+@node Top
+@top LilyPond examples
+
+This document shows a selected set of LilyPond snippets from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
+(LSR). It is in the public domain.
+
+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}.
+
+Snippets are grouped by tags; tags listed in the table of contents match
+a section of LilyPond notation manual. Snippets may have several tags,
+and not all LSR tags may appear in this document.
+
+In the HTML version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+@end ifnottex
+
+@c maybe generate/update @menu and @includes automatically? --jm
+@menu
+Musical notation
+* Pitches::
+* Rhythms::
+* Expressive marks::
+* Repeats::
+* Simultaneous notes::
+* Staff notation::
+* Editorial and educational use::
+* Text::
+
+Specialist notation
+* Vocal music::
+* Chords::
+* Piano::
+* Percussion::
+* Guitar::
+* Strings::
+@c * Bagpipes::
+* Ancient notation::
+
+Other collections
+* Contexts and engravers::
+* Tweaks and overrides::
+* Paper and layout::
+* Titles::
+* Spacing::
+* MIDI::
+* Templates::
+@end menu
+
+
+@c Please take care of naming every .itely
+@c with an existing tag name.
+
+@include pitches.itely
+@include rhythms.itely
+@include expressive-marks.itely
+@include repeats.itely
+@include simultaneous-notes.itely
+@include staff-notation.itely
+@include editorial-and-educational-use.itely
+@include text.itely
+
+@include vocal-music.itely
+@include chords.itely
+@include piano-music.itely
+@include percussion.itely
+@include guitar.itely
+@include strings.itely
+@c ignore empty section
+@c @include bagpipes.itely
+@include ancient-notation.itely
+
+@include contexts-and-engravers.itely
+@include tweaks-and-overrides.itely
+@include paper-and-layout.itely
+@include titles.itely
+@include spacing.itely
+@include midi.itely
+@include template.itely
+
+@bye
+++ /dev/null
-\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
-@setfilename snippets.info
-@settitle LilyPond snippets
-@documentencoding UTF-8
-@documentlanguage en
-
-@iftex
-@afourpaper
-@c don't replace quotes with directed quotes
-@tex
-\gdef\SETtxicodequoteundirected{Foo}
-\gdef\SETtxicodequotebacktick{Bla}
-@end tex
-@end iftex
-
-@finalout
-
-@titlepage
-@title LilyPond
-@subtitle The music typesetter
-@titlefont{Snippets}
-@author LilyPond Snippet Repository contributors
-
-@vskip 20pt
-
-This document shows a selected set of LilyPond snippets from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
-(LSR). It is in the public domain.
-
-We would like to address many thanks to Sebastiano Vigna for maintaining
-LSR web site and database, and the University of Milano for hosting LSR.
-
-Please note that this document 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 may be for a newer
-version (see below).
-
-Snippets are grouped by tags; tags listed in the table of contents match
-a section of LilyPond notation manual. Snippets may have several tags,
-and not all LSR tags may appear in this document.
-
-In the HTML version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-
-@lilypond[ragged-right]
-\score {
- \context Lyrics {
- \override Score.RehearsalMark #'self-alignment-X = #LEFT
- \override Score.RehearsalMark #'font-size = #-1
- \mark #(ly:export (string-append
- "This document is for LilyPond version " (lilypond-version) "."))
- s2
- }
- \layout {
- indent = 0.0\pt
- }
-}
-@end lilypond
-@end titlepage
-
-@iftex
-@contents
-@end iftex
-
-@ifnottex
-@node Top
-@top LilyPond examples
-
-This document shows a selected set of LilyPond snippets from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
-(LSR). It is in the public domain.
-
-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 may be for a newer version (see
-below).
-
-Snippets are grouped by tags; tags listed in the table of contents match
-a section of LilyPond notation manual. Snippets may have several tags,
-and not all LSR tags may appear in this document.
-
-In the HTML version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-@end ifnottex
-
-@c maybe generate/update @menu and @includes automatically? --jm
-@menu
-Musical notation
-* Pitches::
-* Rhythms::
-* Expressive marks::
-* Repeats::
-* Simultaneous notes::
-* Staff notation::
-* Editorial and educational use::
-* Text::
-
-Specialist notation
-* Vocal music::
-* Chords::
-* Piano::
-* Percussion::
-* Guitar::
-* Strings::
-@c * Bagpipes::
-* Ancient notation::
-
-Other collections
-* Contexts and engravers::
-* Tweaks and overrides::
-* Paper and layout::
-* Titles::
-* Spacing::
-* MIDI::
-* Templates::
-@end menu
-
-
-@c Please take care of naming every .itely
-@c with an existing tag name.
-
-@include pitches.itely
-@include rhythms.itely
-@include expressive-marks.itely
-@include repeats.itely
-@include simultaneous-notes.itely
-@include staff-notation.itely
-@include editorial-and-educational-use.itely
-@include text.itely
-
-@include vocal-music.itely
-@include chords.itely
-@include piano-music.itely
-@include percussion.itely
-@include guitar.itely
-@include strings.itely
-@c ignore empty section
-@c @include bagpipes.itely
-@include ancient-notation.itely
-
-@include contexts-and-engravers.itely
-@include tweaks-and-overrides.itely
-@include paper-and-layout.itely
-@include titles.itely
-@include spacing.itely
-@include midi.itely
-@include template.itely
-
-@bye
if PRINTFILENAME in self.option_dict:
base = self.basename ()
filename = os.path.basename (self.substring ('filename'))
- str = output[global_options.format][PRINTFILENAME] % vars ()
+ str = output[format][PRINTFILENAME] % vars ()
return str
def output_texinfo (self):
- str = ''
- if self.output_print_filename (TEXINFO):
- str += ('@html\n'
- + self.output_print_filename (HTML)
- + '\n@end html\n')
- str += ('@tex\n'
- + self.output_print_filename (LATEX)
- + '\n@end tex\n')
+ str = self.output_print_filename (TEXINFO)
base = self.basename ()
if TEXIDOC in self.option_dict:
texidoc = base + '.texidoc'
## info stuff
local-install: install-info
local-uninstall: uninstall-info
-local-install-info:
-local-uninstall-info:
install-info: local-install-info
uninstall-info: local-uninstall-info
uninstall-info:
$(INFO_INSTALL_COMMAND) local-uninstall
+# There are two modes for info: with and without images.
+ifeq ($(out),www)
+
+# This builds all .info targets with images, in out-www.
+# Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
+
+local-install-info: info
+ -$(INSTALL) -d $(DESTDIR)$(infodir)
+ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
+## Can not have absolute symlinks because some binary packages build schemes
+## install files in nonstandard root. Best we can do is to notify the
+## builder or packager.
+ @echo
+ @echo "***************************************************************"
+ @echo "Please add or update the LilyPond direntries, do"
+ @echo
+ @echo " install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info"
+ @echo
+ @echo "For images in the INFO docs to work, do: "
+ @echo
+ @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR))"
+ @echo "or add something like that to the postinstall script."
+ @echo
+else # installing directly into standard /usr/...
+ -$(INSTALL) -d $(DESTDIR)$(infodir)
+ $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
+ install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
+ cd $(infodir) && ln -sfT $(webdir)/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR)
+endif # installing directly into standard /usr/...
+
+local-uninstall-WWW:
+ rm -f $(infodir)/$(INFO_IMAGES_DIR)
+
+else # out!=www
+
+local-install-info: info
+ -$(INSTALL) -d $(DESTDIR)$(package_infodir)
+ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
+## Can not have absolute symlinks because some binary packages build schemes
+## install files in nonstandard root. Best we can do is to notify the
+## builder or packager.
+ @echo
+ @echo "***************************************************************"
+ @echo "Please add or update the LilyPond direntries, do"
+ @echo
+ @echo " install-info --info-dir=$(infodir) out/$(MAIN_INFO_DOC).info"
+ @echo
+ @echo "For images in the INFO docs to work, do"
+ @echo
+ @echo " make out=www install-info "
+ @echo
+ @echo "and read the extra instructions."
+ @echo
+else # installing directly into standard /usr/...
+ -$(INSTALL) -d $(DESTDIR)$(infodir)
+ $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
+ install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
+ @echo
+ @echo "***************************************************************"
+ @echo "For images in the INFO docs to work, do"
+ @echo
+ @echo " make out=www install-info "
+ @echo
+endif # installing into standard /usr/* root# installing into /usr/...
+
+endif # out!=www
+
TEXINFO_ALL_MENUS_UPDATE_EL ='\
(let ((error nil)\