]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/topdocs/NEWS.texi: Add note about info docs with
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 27 Feb 2004 14:29:29 +0000 (14:29 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 27 Feb 2004 14:29:29 +0000 (14:29 +0000)
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.

ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/GNUmakefile
Documentation/user/lilypond.tely
config.make.in
make/ly-rules.make
scripts/lilypond-book.py
stepmake/stepmake/documentation-targets.make

index a194658eeac5dcd869987dcc9e2758a9eadf5627..bfda079c149099b38ca3c88d34035b126a7f1bfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+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
@@ -21,6 +37,9 @@
 
 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.
 
index 74bd75b8e04326bd504a31fd2d71248e7ab50876..d718ed07610667704e6752704ace88f9aae91f43 100644 (file)
@@ -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,
 
index 038605846a2d55150ade901ced4328232e61930c..048f066ed53b6141ea6b092b10026d2525acee48 100644 (file)
@@ -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
 
index 8ca8673cfffe5ccc9420f2a507b38039773defd3..37bcbf4c975deb7177d6f638463bd3a2a3328e9d 100644 (file)
@@ -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
 
 
index a133e48f4c5c6f2e6a9b849a6075087e27025120..b49c7ec7689d42631cd755a5310e16a48761d7e5 100644 (file)
@@ -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)
index 8e8e9a121e711d3768456484c355fd902e8f8ebc..3849b142a77d933ac645e6e716e0439256a874a7 100644 (file)
@@ -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 $@
index b93518628bf7b95b547696524328df968eebaa67..0d7659714c039837e40a78a5d7818f4ee21dc04e 100644 (file)
@@ -219,12 +219,12 @@ output = {
   <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: '',
@@ -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
index b8eabaed77c75833e00df0bb9affd98186ed0e49..4193e522b4adccb783ea502ea0e4b376e4ccbae2 100644 (file)
@@ -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)