From: Jan Nieuwenhuizen Date: Fri, 27 Feb 2004 14:29:29 +0000 (+0000) Subject: * Documentation/topdocs/NEWS.texi: Add note about info docs with X-Git-Tag: release/2.1.28~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=70f979b6f259e273bf8756af56f438401ebc6f3b;p=lilypond.git * Documentation/topdocs/NEWS.texi: Add note about info docs with images. * Documentation/user/lilypond.tely (@direntry): Update. * stepmake/stepmake/documentation-targets.make (install-info,uninstall-info): Install into $(package_infodir). Install images. Run install-info to update dir. * config.make.in (package_infodir): Add. * Documentation/user/GNUmakefile (info-with-images, local-install-info, local-uninstall-info): New target. --- diff --git a/ChangeLog b/ChangeLog index a194658eea..bfda079c14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-02-27 Jan Nieuwenhuizen + + * Documentation/topdocs/NEWS.texi: Add note about info docs with + images. + + * Documentation/user/lilypond.tely (@direntry): Update. + + * stepmake/stepmake/documentation-targets.make + (install-info,uninstall-info): Install into $(package_infodir). + Install images. Run install-info to update dir. + + * config.make.in (package_infodir): Add. + + * Documentation/user/GNUmakefile (info-with-images, + local-install-info, local-uninstall-info): New target. + 2004-02-27 Han-Wen Nienhuys * scm/define-grobs.scm (all-grob-descriptions): tune concaveness @@ -21,6 +37,9 @@ 2004-02-27 Jan Nieuwenhuizen + * scripts/lilypond-book.py (output_texinfo): Output @image + descriptions for info too. + * input/test/chord-names-jazz.ly: * input/test/embedded-scm.ly: Clarify. diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 74bd75b8e0..d718ed0761 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -18,8 +18,11 @@ Version 2.1.13 @itemize @bullet +@item Info documentation with images. +In eager anticipation of Emacs 21.4 or 22.1, the info docs contain +images. -@item Cue notes can now be quoted directly from the parts that +@item Cue notes can be quoted directly from the parts that contain them. This will take into account tunings of source and target instrument. For example, diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 038605846a..048f066ed5 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -1,8 +1,5 @@ -# Documentation/tex/Makefile - depth=../.. - LATEX_FILES =$(wildcard *.latex) # todo: add latex. @@ -38,10 +35,10 @@ dvi: $(DVI_FILES) ps: $(PS_FILES) # Cancel the default info generation rule. We want to generate info -# from `.nexi', making sure we don't run LilyPond for inline pictures, -# when just generating info: - -$(outdir)/%.info: $(outdir)/%.texi +# from `.nexi', making sure we don't run LilyPond for images, when +# generating info. This will produce info docs without images. For +# full info documentation including images, run make web. +$(outdir)/%.info: # $(outdir)/%.texi default: @@ -104,7 +101,23 @@ deep-symlinks: endif -local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir +local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-with-images info-dir + +# This builds all .info targets with images, in out-www. +# Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info +# TODO: install .info into $(INFODIR)/lilypond/, +# adding symlinks for images (or devise image include dir for Info?). +info-with-images: $(INFO_FILES) + -cp -f $(INFO_INSTALL_FILES) $(builddir)/Documentation/user/$(outconfbase) + +local-install-info: +# URG, silly home-brewn web-install target works from TOPDIR using tarball. +# FIXME: doc pics get installed twice +# (cd $(package_infodir) && ln -s $(local_package_docdir)/html/*png .) + -(cd $(package_infodir) && ln -f $(builddir)/Documentation/user/$(outconfbase)-www/*png .) + +local-uninstall-info: + rm -f $(package_infodir)/*.png local-WWW-clean: deep-WWW-clean diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 8ca8673cff..37bcbf4c97 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -6,25 +6,26 @@ @end iftex @ignore +@c FIXME: use `make install-info' Distributions will want to install lilypond.info doing: - ./install-info --info-dir=/usr/share/info out/lilypond.info + install-info --info-dir=/usr/share/info out/lilypond.info @end ignore + @dircategory GNU music project @direntry @c ;; prepend GNU for dir, must be unique -* GNU LilyPond: (lilypond). The GNU music typesetter. -* lilypond: (lilypond)Invoking lilypond:: Titling LilyPond scores. -* Glossary: (music-glossary). Glossary of music terms. -* convert-ly: (lilypond)Invoking convert-ly:: Older LilyPond versions. -* midi2ly: (lilypond)Invoking midi2ly:: Importing MIDI. -* etf2ly: (lilypond)Invoking etf2ly:: Importing Finale. -* abc2ly: (lilypond)Invoking abc2ly:: Importing ABC. -* pmx2ly: (lilypond)Invoking pmx2ly:: Importing PMX. -* musedata2ly: (lilypond)Invoking musedata2ly:: - Importing Musedata. -* mup2ly: (lilypond)Invoking mup2ly:: Importing MUP. +* GNU LilyPond: (./lilypond/lilypond). The GNU music typesetter. +* lilypond: (./lilypond/lilypond)Invoking LilyPond. Titling LilyPond scores. +* Glossary: (./lilypond/music-glossary). Glossary of music terms. +* convert-ly: (./lilypond/lilypond)Invoking convert-ly. Older LilyPond versions. +* midi2ly: (./lilypond/lilypond)Invoking midi2ly. Importing MIDI. +* etf2ly: (./lilypond/lilypond)Invoking etf2ly. Importing Finale. +* abc2ly: (./lilypond/lilypond)Invoking abc2ly. Importing ABC. +* pmx2ly: (./lilypond/lilypond)Invoking pmx2ly. Importing PMX. +* musedata2ly: (./lilypond/lilypond)Invoking musedata2ly. Importing Musedata. +* mup2ly: (./lilypond/lilypond)Invoking mup2ly. Importing MUP. @end direntry diff --git a/config.make.in b/config.make.in index a133e48f4c..b49c7ec768 100644 --- a/config.make.in +++ b/config.make.in @@ -41,6 +41,7 @@ elispdir = $(datadir)/emacs/site-lisp # move out of config.make.in? package_datadir = $(datadir)/$(package) +package_infodir = $(infodir)/$(package) package_libdir = $(libdir)/$(package) package_docdir = $(docdir)/$(package) package_omfdir = $(omfdir)/$(package) diff --git a/make/ly-rules.make b/make/ly-rules.make index 8e8e9a121e..3849b142a7 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -27,6 +27,7 @@ $(outdir)/%.texi: $(outdir)/%.tely # for plain info doco: don't run lily $(outdir)/%.nexi: %.tely if [ -f $@ ]; then chmod a+w $@; fi + rm -f $(outdir)/$*.texi $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) --process='true' $< mv $(outdir)/$*.texinfo $@ 2>/dev/null || mv $(outdir)/$*.texi $@ chmod -w $@ diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index b93518628b..0d7659714c 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -219,12 +219,12 @@ output = { ''', OUTPUT: r''' [picture of music]''', + border="0" src="%(image)s" alt="[image of music]">''', PRINTFILENAME:'

%(filename)s

', VERBATIM: r'''
 %(verb)s
''', }, - + LATEX : { AFTER: '', BEFORE: '', @@ -242,19 +242,20 @@ output = { %(verb)s\end{verbatim} ''', }, - - TEXINFO : { + + TEXINFO : { AFTER: '', BEFORE: '', + OUTPUT: r''' + @image{%(base)s,,,[image of music],%(ext)s} +''', PRINTFILENAME: '''@file{%(filename)s} ''', VERBATIM: r'''@example %(verb)s@end example ''', - }, - } PREAMBLE_LY = r'''%% Generated by %(program_name)s @@ -496,31 +497,46 @@ class Lilypond_snippet (Snippet): func = Lilypond_snippet.__dict__ ['output_' + self.format] return func (self) - def output_html (self): + def get_images (self): base = self.basename () - str = '' - if format == HTML: - str = self.output_print_filename (HTML) - if VERBATIM in self.options: - verb = verbatim_html (self.substring ('code')) - str += write (output[HTML][VERBATIM] % vars ()) - # URGUGHUGHUGUGHU single = '%(base)s.png' % vars () multiple = '%(base)s-page1.png' % vars () - pictures = (single,) + images = (single,) if os.path.exists (multiple) \ and (not os.path.exists (single)\ or (os.stat (multiple)[stat.ST_MTIME] \ > os.stat (single)[stat.ST_MTIME])): - pictures = glob.glob ('%(base)s-page*.png' % vars ()) + images = glob.glob ('%(base)s-page*.png' % vars ()) + return images + def output_html (self): + base = self.basename () + str = '' + if format == HTML: + str = self.output_print_filename (HTML) + if VERBATIM in self.options: + verb = verbatim_html (self.substring ('code')) + str += write (output[HTML][VERBATIM] % vars ()) + str += output[HTML][BEFORE] % vars () - for picture in pictures: + for image in self.get_images (): + base, ext = os.path.splitext (image) str += output[HTML][OUTPUT] % vars () str += output[HTML][AFTER] % vars () return str - + + def output_info (self): + str = output[TEXINFO][BEFORE] % vars () + for image in self.get_images (): + base, ext = os.path.splitext (image) + # URG, makeinfo implicitely prepends dot to ext + # specifying no extension is most robust + ext = '' + str += output[TEXINFO][OUTPUT] % vars () + str += output[TEXINFO][AFTER] % vars () + return str + def output_latex (self): str = '' base = self.basename () @@ -554,9 +570,10 @@ class Lilypond_snippet (Snippet): verb = verbatim_texinfo (self.substring ('code')) str += (output[TEXINFO][VERBATIM] % vars ()) + str += ('@ifinfo\n' + self.output_info () + '\n@end ifinfo\n') str += ('@tex\n' + self.output_latex () + '\n@end tex\n') str += ('@html\n' + self.output_html () + '\n@end html\n') - # need par after picture + # need par after image str += '\n' return str diff --git a/stepmake/stepmake/documentation-targets.make b/stepmake/stepmake/documentation-targets.make index b8eabaed77..4193e522b4 100644 --- a/stepmake/stepmake/documentation-targets.make +++ b/stepmake/stepmake/documentation-targets.make @@ -10,15 +10,21 @@ local-WWW: $(OUTHTML_FILES) INFO_INSTALL_FILES = $(wildcard $(addsuffix *, $(INFO_FILES))) # should we call install-info? -INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(DESTDIR)$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_INSTALL_FILES)" -f $(stepdir)/install-out.sub.make +INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(DESTDIR)$(package_infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_INSTALL_FILES)" -f $(stepdir)/install-out.sub.make local-install: install-info local-uninstall: uninstall-info +local-install-info: +local-uninstall-info: +install-info: local-install-info +uninstall-info: local-uninstall-info install-info: $(INFO_FILES) - -$(INSTALL) -d $(DESTDIR)$(infodir) + -$(INSTALL) -d $(DESTDIR)$(package_infodir) $(INFOINSTALL) local-install + -install-info --info-dir=$(infodir) $(outdir)/$(package).info uninstall-info: + -install-info --info-dir=$(infodir) --remove $(outdir)/$(package).info $(INFOINSTALL) local-uninstall -rmdir $(infodir)