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 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * 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 <hanwen@xs4all.nl>
* scm/define-grobs.scm (all-grob-descriptions): tune concaveness
2004-02-27 Jan Nieuwenhuizen <janneke@gnu.org>
+ * scripts/lilypond-book.py (output_texinfo): Output @image
+ descriptions for info too.
+
* input/test/chord-names-jazz.ly:
* input/test/embedded-scm.ly: Clarify.
@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,
-# Documentation/tex/Makefile
-
depth=../..
-
LATEX_FILES =$(wildcard *.latex)
# todo: add latex.
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:
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
@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
# 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)
# 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 $@
<a href="%(base)s.ly">''',
OUTPUT: r'''
<img align="center" valign="center"
- border="0" src="%(picture)s" alt="[picture of music]">''',
+ border="0" src="%(image)s" alt="[image of music]">''',
PRINTFILENAME:'<p><tt><a href="%(base)s.ly">%(filename)s</a></tt></p>',
VERBATIM: r'''<pre>
%(verb)s</pre>''',
},
-
+
LATEX : {
AFTER: '',
BEFORE: '',
%(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
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 ()
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
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)