]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Merge from stable:
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 21 Oct 2002 13:24:27 +0000 (13:24 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 21 Oct 2002 13:24:27 +0000 (13:24 +0000)
    cvs update -jlilypond_1_6_5 -jlilypond_1_6_6

24 files changed:
ChangeLog
Documentation/topdocs/INSTALL.texi
Documentation/topdocs/index.tely
Documentation/user/lilypond-book.itely
Documentation/windows/installing.texi
GNUmakefile.in
aclocal.m4
buildscripts/mf-to-table.py
cygwin/changelog
input/GNUmakefile
make/lilypond-vars.make
make/ly-rules.make
scm/chord-name.scm
scm/pdftex.scm
scm/tex.scm
scripts/lilypond-book.py
stepmake/aclocal.m4
stepmake/stepmake/www-targets.make
tex/GNUmakefile
tex/lily-pdf-defs.tex
tex/lily-ps-defs.tex
tex/lilypond-latex.tex [deleted file]
tex/lilypond-plaintex.tex [deleted file]
tex/lilyponddefs.tex

index c355b0c50195cb4005f63ca9e13c33145b589eeb..194da13497ed7e9d152ff6d88658a33689cac4e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * Merge from stable:
+
+           cvs update -jlilypond_1_6_5 -jlilypond_1_6_6
+
 2002-10-21  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * scm/generate-documentation.scm (string-append): add macro
@@ -9,7 +15,8 @@
        * lily/multi-measure-rest-engraver.cc: make separate
        MultiMeasureRestNumber grob. Introduce restNumberThreshold.
 
-       * lily/multi-measure-rest.cc: remove text handling. Remove number-threshold.
+       * lily/multi-measure-rest.cc: remove text handling. Remove
+       number-threshold.
 
 2002-10-20  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        (schedule_lilypond_block): Implement `noquote' option for LaTeX
        mode.
 
-2002-10-04  Jan Nieuwenhuizen  <janneke@gnu.org>
+2002-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * scm/grob-description.scm (minimum-beam-collision-distance): 0.75
-       staff-space.  Previous 1.5 was probably meant as half-spaces.
-       (cautionary-style): parentheses (was: smaller).  This is what doco
-       says, and it seems more logical.
+       * Documentation/topdocs/INSTALL.texi: Add note about using ksh for
+       as workaround for /bin/sh problems on Solaris7.
 
-       * Documentation/user/refman.itely (Chromatic alterations): Bugfix
-       for 2nd sentence.
+2002-10-19  Werner Lemberg  <wl@gnu.org>
 
-2002-10-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+       * GNUmakefile.in (web-doc): Fix typos.
+       * tex/lilyponddefs.tex (\lilypondspecial): Don't scan
+       `music-drawing-routines.ps' but emit \special{header=...} once.
+       * scm/tex.scm (header-end): Updated.
 
-       * make/lilypond.redhat.spec.in: various fixes for RedHat 8.0
+2002-10-19  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
-2002-10-03  Jan Nieuwenhuizen  <janneke@gnu.org>
+       * lily/stem-engraver.cc (acknowledge_grob): don't crash on
+       undefined tremolo. 
 
-       * lily/beam.cc (rest_collision_callback): Fixed: partial rewrite.
+2002-10-15  Werner Lemberg  <wl@gnu.org>
+
+       * scripts/lilypond-book.py (g_make_html): New global variable.
+       (schedule_lilypond_block): Don't compute EPS and PNG for `texi'
+       if `g_make_html' isn't set.
+       [main]: Add format `texi-html'.
+       (option_definitions): Updated.
+       * Documentation/user/lilypond-book.itely: Updated.
+
+       * make/lilypond-vars.make (LILYPOND_BOOK_FORMAT): New variable.
+       * make/ly-rules.make (%.texi, %.nexi): Use it.
+       * stepmake/stepmake/www-targets.make (web): Pass `tex-html' as
+       format to lilypond-book.
+       * GNUmakefile.in (web-doc): Ditto.
+
+2002-10-14  Werner Lemberg  <wl@gnu.org>
+
+       Further improve TeX output.  The produced files are about 40%
+       smaller.  `lilyponddefs.tex' is now read only once.
+
+       * tex/lilyponddefs.tex: Remove footer stuff.
+       (\ifundefined): Renamed to...
+       (\lilypondundefined): This.  Use LaTeX's definition to
+       make it nestable and make it global.
+       (\lilypondstart, \lilypondend): New macro to initialize LilyPond
+       output.
+       (\lilypondspecial): New macro to read `music-drawing-routines.ps'.
+       (\fetasixteen, \fetafont, \fetachar, \botalign, \leftalign): Make
+       them global.
+       (\placebox): Renamed to...
+       (\lyitem): This.
+       Make it global and call \outputscale by itself.
+       (\lybox, \lyvrule): New macros to reduce input data.
+       (\lilypondfirst, \lilypondsecond, \lilypondloop, \lilyponditerate):
+       New auxiliary macros.
+       (\SkipLilydefs, \EndLilyPondOutput): Removed.
+       * tex/lily-pdf-defs.tex, tex/lily-ps-defs.tex (\lilySpace): Renamed
+       to...
+       (\lilypondspace): This and made it global.
+       (\turnOnPostScript): Renamed to...
+       (\lilypondpostscript): This and made it global.
+       (\turnOnExperimentalFeatures): Renamed to...
+       (\lilypondexperimentalfeatures): This and made it global.
+       * tex/lily-ps-defs.tex (\PSsetTeXdimen): Renamed to...
+       (\lilypondsetdimen): This and made it global.
+       * tex/lilypond-latex.tex, tex/lilypond-plaintex.tex: Removed.
+       * tex/GNUmakefile (TEX_FILES): Add `music-drawing-routines.ps'
+       (all, $(outdir)/music-drawing-routines.ps): New rules.
+       * buildscripts/mf-to-table.py (write_tex_defs): Use \gdef.
+       * scm/pdftex.scm, scm/tex.scm (end-output, header-end, placebox,
+       start-system, stop-system, stop-last-system, filledbox): Updated to
+       use the changed macros from lilyponddefs.tex.
+       * scripts/lilypond-book.ly (output_dict) <latex, texi>: Ditto.
+
+2002-10-07  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * Documentation/windows/installing.texi: Update.
 
 2002-09-30  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * VERSION: 1.6.5 released
+
        * scripts/lilypond-book.py (make_pixmap): don't produce empty pages.
 
 2002-09-28  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
index 1420bfee6e9e44a7a9cf04f8e960280a76cbcd94..c96536c400cf1a1a3e4bcd938eead65c3e8eafe2 100644 (file)
@@ -721,9 +721,22 @@ CFLAGS='-I /usr/pkg/include' LDFLAGS='-L/usr/pkg/lib' ./configure
 
 @end itemize
 
-@unnumberedsubsec  Solaris:
+@unnumberedsubsec  Solaris
 
 @itemize @bullet
+@item Solaris7, ./configure
+
+@file{./configure} needs a POSIX compliant shell.  On Solaris7,
+@file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
+is.  Please run configure like:
+@example
+        /bin/ksh -c ./configure
+@end example
+or
+@example
+        bash -c ./configure
+@end example
+
 @item Sparc64/Solaris 2.6, GNU make-3.77
 
 GNU make-3.77 is buggy on this platform, upgrade to 3.78.1 or newer.
index c65f5a0b26a8b40570e72cca86f0ca1e4b60f5c6..afe2db533cea3c958395765904487add224e1a2e 100644 (file)
@@ -68,6 +68,17 @@ and are essentially bug-free.  If you're not a developer, you probably
 want to visit the @uref{http://lilypond.org/stable, latest stable
 website}.
 
+@c development:
+@ignore
+LilyPond has a development version and a stable version.  This webpage
+is for the @b{development} version.  The development releases contain
+experimental and often buggy code, so you should use this only if you
+need any special new features.  The stable releases don't change much,
+and are essentially bug-free.  If you're not a developer, you probably
+want to visit the @uref{http://lilypond.org/stable, latest stable
+website}.
+@end ignore
+
 @unnumberedsec Want to know more?
 
 If you want to know more, visit the
index 5023fc7f152bf09b2a85312a2e68ae35c7bb6dac..1b23cbd4a2b8c8c54aa0fe80cae9ccc8f7700178 100644 (file)
@@ -361,6 +361,11 @@ Specify the document type to process: @code{html}, @code{latex} or
 @code{texi} (the default).  @command{lilypond-book} usually figures this
 out automatically.
 
+Note that the @code{texi} document type produces a DVI file; to
+convert a texinfo document to @code{html}, you should use the additional
+format @code{texi-html} instead of @code{texi} to convert lilypond
+fragments to PNG images.
+
 @item @option{--default-music-fontsize=@var{sz}pt}
 Set the fontsize to use for LilyPond if no fontsize is given
 as option.
index d2c14b5b69090841e949f2441356f75043a66b9f..9f7c4c9b08bbb3a3dfce5fe0b9e0bd5a1f16922e 100644 (file)
@@ -145,8 +145,17 @@ PDF output to `foo.pdf'...
 @end example
 
 If you install the Cygwin's XFree86 X11 window system, tetex-x11 and
-ghostscript-x11 packages too, you can view the @code{dvi} output doing
-@code{xdvi test.dvi}.  If you have installed a PostScript/PDF viewer,
+ghostscript-x11 packages too, you can view the @code{dvi} output
+@c copied from tutorial, where xdvi command has been explained above
+@c doing @code{xdvi test.dvi}.
+doing:
+
+@example
+startx
+xdvi test.dvi
+@end example
+
+If you have installed a PostScript/PDF viewer,
 such as @code{GSView} from @uref{http://www.cs.wisc.edu/~ghost},
 viewing the PS file can be done with:
 
index 3aa2b41d3ea187ccd65e8c68e7ec695c42f492c5..568118f0a9b600e1fb899e3a166c7bca864209c2 100644 (file)
@@ -44,10 +44,10 @@ doc: run-reqs
        $(MAKE) -C Documentation
 
 web-doc: web-reqs
-       $(MAKE) out=www -C input/regression/ WWW
-       $(MAKE) out=www -C input/template/ WWW
-       $(MAKE) out=www -C input/test/ WWW
-       $(MAKE) out=www -C Documentation WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/regression/ WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/template/ WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/test/ WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C Documentation WWW
        $(MAKE) footify
 
 pfa-fonts:
index 400f64a6bf56f254c776451d98d729c9bbba17b6..2dc4f8afe7437fccca9938a6b65cb278dfb7318a 100644 (file)
@@ -1,6 +1,6 @@
 dnl aclocal.m4   -*-shell-script-*-
 dnl WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from /users/hanwen/usr/src/lilypond/stepmake/aclocal.m4
+dnl do not edit! this is aclocal.m4, generated from /home/fred/lily/stepmake/aclocal.m4
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
@@ -477,7 +477,9 @@ AC_DEFUN(STEPMAKE_INIT, [
        AC_MSG_RESULT(Stepmake package!)
 
        AC_MSG_CHECKING(builddir)
+
        builddir="`pwd`"
+
        if test "$srcdir" = "."; then
            srcdir_build=yes
        else
index 7564737dd552d8d967878f55321b4e1f3cd2b7c3..298311a0594df891d6c78919d2e051b0754e2ecc 100644 (file)
@@ -132,7 +132,7 @@ def write_tex_defs (file, global_info, charmetrics):
        ##nm = global_info['FontFamily']
        nm = font_family
        for m in charmetrics:
-               file.write (r'''\def\%s%s{\char%d}%%%s''' % (nm, m['tex'], m['code'],'\n'))
+               file.write (r'''\gdef\%s%s{\char%d}%%%s''' % (nm, m['tex'], m['code'],'\n'))
        file.write ('\\endinput\n')
 
 def write_ps_encoding (file, global_info, charmetrics):
index bdd38dabafe37db10508b5a1eab47f9c680cb01a..69c69fb66b9013af638e80c1bd72279deb2a70d5 100644 (file)
@@ -1,3 +1,9 @@
+lilypond (1.6.5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Jan Nieuwenhuizen <janneke@gnu.org>  Mon,  7 Oct 2002 14:54:12 +0200
+
 lilypond (1.6.4-1) stable; urgency=low
 
   * New upstream release.
index 5ed0316b6487aff5a197694210602564e52324b4..4961aa6666d893c7815ef53e93b734cb59752e2d 100644 (file)
@@ -1,6 +1,6 @@
 depth = ..
 
-SUBDIRS=test regression tutorial no-notation ascii-art template mutopia sondag-morgen
+SUBDIRS=test regression tutorial no-notation ascii-art template mutopia 
 
 # nereides is tweaked a lot, can't do (read webpage)
 examples= size11 size26 
index 7d0d40cd6f1b9d50312799cd1698c9ea614b0902..cdb4b61466fcddb53cd952571b97c32048e0762b 100644 (file)
@@ -44,6 +44,7 @@ CONVERT_LY = $(script-dir)/convert-ly.py
 LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
 LILYPOND_BOOK = $(script-dir)/lilypond-book.py
 LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/  -I $(builddir)/mf/out/
+LILYPOND_BOOK_FORMAT = texi
 LY2DVI = $(script-dir)/ly2dvi.py
 LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py
 
@@ -57,6 +58,7 @@ CONVERT_LY = $(shell $(SHELL) -c 'type -p convert-ly')
 LILYPOND = $(shell $(SHELL) -c 'type -p lilypond')
 LILYPOND_BOOK = $(shell $(SHELL) -c 'type -p lilypond-book')
 LILYPOND_BOOK_INCLUDES = -I. -I.. -I$(outdir)
+LILYPOND_BOOK_FORMAT = texi
 LY2DVI = $(shell $(SHELL) -c 'type -p ly2dvi')
 LYS_TO_TELY = $(shell $(SHELL) -c 'type -p lys-to-tely')
 
index dd3f297c4f5cea5c0d14172f894085c5121b9739..4876e5bb9b1a6247a00915617fc7b5645de1b481 100644 (file)
@@ -5,8 +5,7 @@
 
 $(outdir)/%.latex: %.doc
        -chmod a+w $@
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES)\
-$(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
        chmod -w $@
 
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
@@ -14,14 +13,14 @@ $(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
 $(outdir)/%.texi: %.tely
        -chmod a+w $@
        set|egrep '(TEX|LILY)'  # ugh, what's this?
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --verbose $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
        chmod -w $@
 
 $(outdir)/%.texi: $(outdir)/%.tely
        -chmod a+w $@
 # debugging:
 #      set|egrep '(TEX|LILY)'
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --verbose $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
 #
 # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
 #      rm -f $<
@@ -31,7 +30,7 @@ $(outdir)/%.texi: $(outdir)/%.tely
 # for plain info doco: don't run lily
 $(outdir)/%.nexi: %.tely
        -chmod a+w $@
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --no-lily $(LILYPOND_BOOK_FLAGS) $<
        mv $(@D)/$(*F).texi $@
        chmod -w $@
 
index 1cb89d89a2aa72e59379e60946c9447364df5162..99e8c226bd5e59fbb3b9300b85e4687337064055 100644 (file)
 ;; chord to be name-calculated.
 ;;
 ;; CHORD: (pitches (bass . inversion))
-(define (default-chord-name-function style chord)
+(define-public (default-chord-name-function style chord)
   (let* ((pitches (map c++-pitch->scm (car chord)))
         (modifiers (cdr chord))
         (bass-and-inversion (if (pair? modifiers)
                                         (pitch::transpose x diff))
                                       (cdr pitches))
                    '())))
-    (chord::name->text style (car pitches) steps bass-and-inversion)))
+;    (display (chord::name->text style (car pitches) steps bass-and-inversion))
+    (chord::name->text style (car pitches) steps bass-and-inversion)
+
+
+    ))
 
 ;;;
 ;;; American style
index 779cb016dc42eec4fa7e77480a5e9a9ea3142d00..3724dfbda128bffee7606ba329302f103b28d591 100644 (file)
   (begin
                                        ; uncomment for some stats about lily memory      
                                        ;               (display (gc-stats))
-    (string-append "%\n\\EndLilyPondOutput\n"
+    (string-append "%\n\\lilypondend\n"
                                        ; Put GC stats here.
                   )))
 
                    (else (error "unknown unit" (ly:unit)))
                    ))
    "}%\n"
-   "\\input lilyponddefs\n"
+   "\\ifx\\lilypondstart\\undefined\n"
+   "  \\input lilyponddefs\n"
+   "\\fi\n"
    "\\outputscale=\\lilypondpaperoutputscale \\lilypondpaperunit\n"
-   "\\turnOnPostScript\n"
+   "\\lilypondpostscript\n"
    "\\pdfcompresslevel=0"))
 
 ;; Note: this string must match the string in ly2dvi.py!!!
    (ly:number->string x) " \\outputscale "))
 
 (define (placebox x y s) 
-  (string-append 
-   "\\placebox{"
-   (number->dim y) "}{" (number->dim x) "}{" s "}%\n"))
+  (string-append "\\lyitem{"
+                (ly-number->string y) "}{"
+                (ly-number->string x) "}{"
+                s "}%\n"))
 
 (define (bezier-bow l thick)
   (embedded-pdf (list 'bezier-bow  `(quote ,l) thick)))
 (define (start-system wd ht)
   (string-append "\\leavevmode\n"
                 "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
-                "\\ifundefined{lilypondscoreshift}%\n"
-                "\\else\n"
-                "  \\advance\\scoreshift by -\\lilypondscoreshift\n"
-                "\\fi\n"
-                "\\hbox to " (number->dim wd) "{%\n"
-                "\\lower\\scoreshift\n"
-                "\\vbox to " (number->dim ht) "{\\hbox{%\n"))
+                "\\lilypondifundefined{lilypondscoreshift}%\n"
+                "  {}%\n"
+                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
+                "\\lybox{"
+                (ly-number->string wd) "}{"
+                (ly-number->string ht) "{%\n"))
 
 (define (stop-system) 
-  "}\\vss}\\hss}\\interscoreline\n")
+  "}%\n%\n\\interscoreline\n%\n")
 (define (stop-last-system)
-  "}\\vss}\\hss}")
+  "}%\n")
+
 (define (filledbox breapth width depth height) 
-  (string-append 
-   "\\kern" (number->dim (- breapth))
-   "\\vrule width " (number->dim (+ breapth width))
-   "depth " (number->dim depth)
-   "height " (number->dim height) " "))
+  (string-append "\\lyvrule{"
+                (ly-number->string (- breapth)) "}{"
+                (ly-number->string (+ breapth width)) "}{"
+                (ly-number->string depth) "}{"
+                (ly-number->string height) "}"))
 
 (define (roundfilledbox x y width height blotdiam)
   (embedded-pdf (list 'roundfilledbox  x y width height blotdiam)))
index c9a32a5f652cb6659af23d24dd291a70b299aedf..4026ec1789c13b94e388ec52b9f6efd86409abb8 100644 (file)
                                        ; uncomment for some stats about lily memory      
                                        ;               (display (gc-stats))
     (string-append
-     "%\n"
-     "\\EndLilyPondOutput\n"
-     "\\begingroup\n"
-     "\\ifx\\LilyPondDocument\\undefined\n"
-     "  \\def\\x{\\endgroup}%\n"
-     "\\else\n"
-     "  \\def\\x{%\n"
-     "    \\endgroup\n"
-     "    \\enddocument\n"
-     "  }\n"
-     "\\fi\n"
-     "\\x\n"
+     "\\lilypondend\n"
                                        ; Put GC stats here.
                   )))
 
                     ((equal? (ly:unit) "pt") (/ 72.0  72.27))
                     (else (error "unknown unit" (ly:unit)))
                     ))
-    " mul }%\n"
-   "\\special{\\string! "
-   
-   ;; URG: ly:gulp-file: now we can't use scm output without Lily
-   (regexp-substitute/global
-    #f "\n"
-    (ly:gulp-file "music-drawing-routines.ps") 'pre " %\n" 'post)
-   ;; (if (defined? 'ps-testing) "/testing true def%\n" "")
-   "}%\n"
-   "\\begingroup\n"
-   "\\catcode `\\@=11\n"
-   "\\expandafter\\ifx\\csname @nodocument\\endcsname \\relax\n"
-   "  \\def\\x{\\endgroup}%\n"
-   "\\else\n"
-   "  \\def\\x{%\n"
-   "    \\endgroup\n"
-   "    \\def\\LilyPondDocument{}\n"
-   "    \\documentclass{article}\n"
-   "    \\pagestyle{empty}\n"
-   ;; argh, we can't say \begin{document} because \begin is defined as
-   ;; \outer in texinfo
-   "    \\begingroup\n"
-   "    \\document\n"
-   "    \\ifdim\\lilypondpaperlinewidth\\lilypondpaperunit > 0pt\n"
-   "      \\hsize\\lilypondpaperlinewidth\\lilypondpaperunit\n"
-   "    \\fi\n"
-   "    \\parindent 0pt\n"
-   "  }\n"
+   " mul }%\n"
+   "\\ifx\\lilypondstart\\undefined\n"
+   "  \\input lilyponddefs\n"
    "\\fi\n"
-   "\\x\n"
-   "\\input lilyponddefs\n"
-   "\\outputscale=\\lilypondpaperoutputscale \\lilypondpaperunit\n"
-   "\\turnOnPostScript\n"))
+   "\\outputscale = \\lilypondpaperoutputscale\\lilypondpaperunit\n"
+   "\\lilypondstart\n"
+   "\\lilypondspecial\n"
+   "\\lilypondpostscript\n"))
 
 ;; Note: this string must match the string in ly2dvi.py!!!
 (define (header creator generate) 
    (ly:number->string x) " \\outputscale "))
 
 (define (placebox x y s) 
-  (string-append 
-   "\\placebox{"
-   (number->dim y) "}{" (number->dim x) "}{" s "}%\n"))
+  (string-append "\\lyitem{"
+                (ly:number->string y) "}{"
+                (ly:number->string x) "}{"
+                s "}%\n"))
 
 (define (bezier-bow l thick)
   (embedded-ps (list 'bezier-bow  `(quote ,l) thick)))
 (define (start-system wd ht)
   (string-append "\\leavevmode\n"
                 "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
-                "\\ifundefined{lilypondscoreshift}%\n"
-                "\\else\n"
-                "  \\advance\\scoreshift by -\\lilypondscoreshift\n"
-                "\\fi\n"
-                "\\hbox to " (number->dim wd) "{%\n"
-                "\\lower\\scoreshift\n"
-                "\\vbox to " (number->dim ht) "{\\hbox{%\n"))
+                "\\lilypondifundefined{lilypondscoreshift}%\n"
+                "  {}%\n"
+                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
+                "\\lybox{"
+                (ly:number->string wd) "}{"
+                (ly:number->string ht) "}{%\n"))
 
 (define (stop-system) 
-  "}\\vss}\\hss}\\interscoreline\n")
+  "}%\n%\n\\interscoreline\n%\n")
 (define (stop-last-system)
-  "}\\vss}\\hss}")
+  "}%\n")
 
 (define (filledbox breapth width depth height)
   (if (and #f (defined? 'ps-testing))
       (embedded-ps
        (string-append (numbers->string (list breapth width depth height))
                      " draw_box" ))
-      (string-append 
-       "\\kern" (number->dim (- breapth))
-       "\\vrule width " (number->dim (+ breapth width))
-       "depth " (number->dim depth)
-       "height " (number->dim height) " ")))
+      (string-append "\\lyvrule{"
+                    (ly:number->string (- breapth)) "}{"
+                    (ly:number->string (+ breapth width)) "}{"
+                    (ly:number->string depth) "}{"
+                    (ly:number->string height) "}")))
 
 (define (roundfilledbox x y width height blotdiam)
   (embedded-ps (list 'roundfilledbox  x y width height blotdiam)))
index 77870ede96f1d07a741e8d1c0a8b21ace083efca..68ff22873f5e3424573affb665f68fe8f921347a 100644 (file)
@@ -4,7 +4,6 @@
 # * junk --outdir for --output
 # * Figure out clean set of options.
 # *
-# * EndLilyPondOutput is def'd as vfil. Causes large white gaps.
 # * texinfo: add support for @pagesize
 
 # todo: dimension handling (all the x2y) is clumsy. (tca: Thats
@@ -170,6 +169,7 @@ g_force_music_fontsize = 0
 g_read_lys = 0
 g_do_pictures = 1
 g_do_music = 1
+g_make_html = 0
 
 format = ''
 g_run_lilypond = 1
@@ -330,7 +330,7 @@ html_linewidths = {
        'letterpaper': {12: in2pt(6)}}
 
 option_definitions = [
-       ('EXT', 'f', 'format', 'use output format EXT (texi [default], latex, html)'),
+       ('EXT', 'f', 'format', 'use output format EXT (texi [default], texi-html, latex, html)'),
        ('DIM',  '', 'default-music-fontsize', 'default fontsize for music.  DIM is assumed to be in points'),
        ('DIM',  '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
        ('OPT', '', 'extra-options' , 'pass OPT quoted to the lilypond command line'),
@@ -462,16 +462,12 @@ output_dict= {
 %s@end example
 ''',
                # do some tweaking: @ is needed in some ps stuff.
-               # override EndLilyPondOutput, since @tex is done
-               # in a sandbox, you can't do \input lilyponddefs at the
-               # top of the document.
                #
                # ugh, the <p> below breaks inline images...
                'output-texi-noquote': r'''@tex
 \catcode`\@=12
 \parindent 0pt
-\input lilyponddefs
-\def\EndLilyPondOutput{}
+\def\lilypondbook{}
 \input %(fn)s.tex
 \catcode`\@=0
 @end tex
@@ -484,8 +480,7 @@ output_dict= {
                'output-texi-quoted': r'''@quotation
 @tex
 \catcode`\@=12
-\input lilyponddefs
-\def\EndLilyPondOutput{}
+\def\lilypondbook{}
 \input %(fn)s.tex
 \catcode`\@=0
 @end tex
@@ -1045,7 +1040,7 @@ def schedule_lilypond_block (chunk):
                update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
        needed_filetypes = ['tex']
 
-       if format == 'html' or format == 'texi':
+       if format == 'html' or g_make_html:
                needed_filetypes.append ('eps')
                needed_filetypes.append ('png')
        if 'eps' in opts and not ('eps' in needed_filetypes):
@@ -1503,6 +1498,9 @@ for opt in options:
                __main__.verbose_p = 1
        elif o == '--format' or o == '-f':
                __main__.format = a
+               if a == 'texi-html':
+                       __main__.format = 'texi'
+                       g_make_html = 1
        elif o == '--outname' or o == '-o':
                if len(files) > 1:
                        #HACK
index be1dcab893229788c9fa9800de7962847d955787..3a3257072df1b385bee2dcd1bc5c9f4c7c2840d6 100644 (file)
@@ -474,7 +474,9 @@ AC_DEFUN(STEPMAKE_INIT, [
        AC_MSG_RESULT(Stepmake package!)
 
        AC_MSG_CHECKING(builddir)
+
        builddir="`pwd`"
+
        if test "$srcdir" = "."; then
            srcdir_build=yes
        else
index 58f2d4ed6a4b5ea18e05d0b8f044b7d95769c664..259d06fe85067ea06fca1a4d698932241b0292df 100644 (file)
@@ -9,11 +9,12 @@ WWW-clean: local-WWW-clean
        $(LOOP)
 endif
 
+#ugh, this is (but whole make web/www/WWW is) lilypond specific
 local-web:
-       $(MAKE) out=www local-WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html local-WWW
 
 web:
-       $(MAKE) out=www WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html WWW
 
 local-WWW-clean:
        rm -f $(outdir)/*
index c9f4c4b19bde51bef61237946a64879403d07092..b58a7e55ce2ba1a92530cfed9b8ce8db76e0e23f 100644 (file)
@@ -1,6 +1,6 @@
 depth = ..
 
-TEX_FILES = $(wildcard *.tex)
+TEX_FILES = $(wildcard *.tex) $(outdir)/music-drawing-routines.ps
 
 EXTRA_DIST_FILES = $(TEX_FILES)
 STEPMAKE_TEMPLATES=install
@@ -10,3 +10,7 @@ INSTALLATION_FILES=$(TEX_FILES)
 
 include $(depth)/make/stepmake.make
 
+$(outdir)/music-drawing-routines.ps: $(depth)/ps/music-drawing-routines.ps
+       -cp $< $@
+
+all: $(INSTALLATION_FILES)
index f85aa5b1e8b5b5bbdf6348c375e5ec444d83db2a..69af9f0465e0dd222e475fad836cd989c6b07663 100644 (file)
@@ -5,23 +5,23 @@
 \edef\lilypdfdefsELC{\the\endlinechar}%
 \endlinechar -1\relax
 
-\def\lilySpace{ }
+\gdef\lilypondspace{ }
 
-\def\turnOnPostScript{
+\gdef\lilypondpostscript{
   % This sets CTM so that you get to the currentpoint
   % by executing a 0 0 moveto
   \def\embeddedpdf##1{
     \pdfliteral{
-      q \lilypondpaperoutputscale\lilySpace 0 0 %
-        \lilypondpaperoutputscale\lilySpace 0 0 cm %
-        \lilyoutputscalefactor\lilySpace 0 0 %
-        \lilyoutputscalefactor\lilySpace 0 0 cm %
+      q \lilypondpaperoutputscale\lilypondspace 0 0 %
+        \lilypondpaperoutputscale\lilypondspace 0 0 cm %
+        \lilyoutputscalefactor\lilypondspace 0 0 %
+        \lilyoutputscalefactor\lilypondspace 0 0 cm %
       ##1 Q
     }
   }
 }
 
-\def\turnOnExperimentalFeatures{}
+\gdef\lilypondexperimentalfeatures{}
 
 \endlinechar \lilypdfdefsELC
 \endinput
index 4efc3c418cb7c622207c37707adba1d3d897bb3c..71e31e8aabc6aadcf9f58ddc710e51b82a66d6d2 100644 (file)
@@ -9,30 +9,30 @@
 % Escape the colon with \string to avoid problems with French while using
 % the Babel package.
 
-\def\PSsetTeXdimen#1{
+\gdef\lilypondsetdimen#1{
   \expandafter\special{
     ! /#1 (\csname #1\endcsname) set_tex_dimen
   }
 }
 
-\def\lilySpace{ }
+\gdef\lilypondspace{ }
 
-\def\turnOnPostScript{
+\gdef\lilypondpostscript{
   % This sets CTM so that you get to the currentpoint
   % by executing a 0 0 moveto
   \def\embeddedps##1{
     \special{
       ps\string: @beginspecial @setspecial %
-                 \lilypondpaperoutputscale\lilySpace\scaletounit %
-                 \lilypondpaperoutputscale\lilySpace\scaletounit %
+                 \lilypondpaperoutputscale\lilypondspace\scaletounit %
+                 \lilypondpaperoutputscale\lilypondspace\scaletounit %
                  % FUCKING REDHAT XDVI -- ARG!
                  skeel ##1 @endspecial
     }
   }
-  \PSsetTeXdimen{lilypondpaperblotdiameter}
+  \lilypondsetdimen{lilypondpaperblotdiameter}
 }
 
-\def\turnOnExperimentalFeatures{}
+\gdef\lilypondexperimentalfeatures{}
 
 \endlinechar \lilypsdefsELC
 \endinput
diff --git a/tex/lilypond-latex.tex b/tex/lilypond-latex.tex
deleted file mode 100644 (file)
index e139af7..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-% lilypond-latex.tex
-%
-\edef\lilypondlatexELC{\the\endlinechar}%
-\endlinechar -1\relax
-
-\message{LaTeX definitions}
-
-\def\texsuffix{LaTeX}
-
-\def\lilyfooterLaTeX{
-  \let\nopagenumbers\relax
-
-  %% FIXME
-  \def\ps@plain{
-    \renewcommand{\@oddhead}{}
-    \renewcommand{\@evenfoot}{}
-    \renewcommand{\@evenhead}{}
-    \renewcommand{\@oddfoot}{
-      \ifnum\thepage = 1\relax
-        {\hfil \lilypondtagline}
-      \else
-        {foo\hfil \the\pageno \hfil}
-      \fi
-    }
-  }
-
-  \def\ps@empty{
-    \renewcommand{\@oddhead}{}
-    \renewcommand{\@evenfoot}{}
-    \renewcommand{\@evenhead}{}
-    \renewcommand{\@oddfoot}{
-      \ifnum\thepage = 1\relax
-        {\hfil \lilypondtagline}
-      \else
-        {foo\hfil \the\pageno \hfil}
-      \fi
-    }
-  }
-
-  \nopagenumbers
-}
-
-\def\nolilyfooterLaTeX{}
-
-\endlinechar \lilypondlatexELC
-\endinput
diff --git a/tex/lilypond-plaintex.tex b/tex/lilypond-plaintex.tex
deleted file mode 100644 (file)
index b269993..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-% lilypond-plaintex.tex
-%
-\edef\lilypondplaintexELC{\the\endlinechar}%
-\endlinechar -1\relax
-
-\message{LilyPond Plain TeX settings}
-
-\def\texsuffix{PlainTeX}
-
-\def\lilyfooterPlainTeX{
-  \footline = {
-    \ifnum\pageno = 1\relax
-      \smalltextfont\lilypondcopyright\hfil \lilypondtagline
-    \else
-      \hfil \the\pageno \hfil
-    \fi
-  }
-}
-
-
-%% make plain work ok Out Of The Box
-
-\ifundefined{lilypondpaperunit}
-\def\lhsize{\hsize} 
-\else
-\def\lhsize{\lilypondpaperlinewidth\lilypondpaperunit}
-\fi
-
-\ifdim0pt<\lhsize
-\hsize=\lhsize
-\fi
-
-\advance\hoffset by -.6in
-
-\def\nolilyfooterPlainTeX{\nopagenumbers}
-
-\endlinechar \lilypondplaintexELC
-\endinput
index acacba8e3db41ce8396528a2815d9e2015c026c6..8f6bae4167d6754e7fb9a707d10f7252cd76fdc9 100644 (file)
 %
 % Include file for LilyPond.
 %
-% This file defines various macros to accomodate lilypond output.
+% This file defines various macros to acommodate lilypond output.
+%
+% It should run with plain TeX, LaTeX, pdftex, and texinfo.
+%
+% To avoid interferences, lilyponddefs.tex should be loaded within a group.
+% To load it only once, most of the definitions must be global.
+%
+% The overall structure of a file created by LilyPond is as follows:
+%
+%   <lilypond parameter definitions>
+%   \ifx\lilypondstart \undefined
+%     \input lilyponddefs
+%   \fi
+%   \lilypondstart
+%   <font setup and note output>
+%   \lilypondend
+%
+% No footers and headers are provided for the stand-alone run (i.e., for
+% directly saying `latex <LilyPond output>'.
+%
 %
 % Avoid \par while reading this file.
 \edef\lilyponddefsELC{\the\endlinechar}%
 \endlinechar -1\relax
 
-% TeXbook ex 7.7
-\def\ifundefined#1{
+% the next three macros are taken from LaTeX
+\long\gdef\lilypondfirst#1#2{#1}
+
+\long\gdef\lilypondsecond#1#2{#2}
+
+\gdef\lilypondifundefined#1{
   \expandafter\ifx\csname#1\endcsname\relax
+    \expandafter\lilypondfirst
+  \else
+    \expandafter\lilypondsecond
+  \fi
 }
 
-% If we must make titles, do so, before we're skipped.
-
-\ifx\mustmakelilypondtitle\undefined
-\else
-  \makelilypondtitle
-\fi
+\gdef\lilypondstart{
+  \begingroup
+  \catcode `\@=11\relax
+  % \@nodocument is defined as \relax after `\begin{document}'
+  \lilypondifundefined{@nodocument}
+    {
+      % either plain TeX or texinfo or not at the beginning of LaTeX input
+      \def\x{\endgroup}
+    }
+    {
+      % provide a proper LaTeX preamble (for A4 paper format)
+      \def\x{
+        \endgroup
+        \def\lilyponddocument{}
+        \documentclass[a4paper]{article}
+        \pagestyle{empty}
+        % \begin is defined as \outer in texinfo, thus we use \csname
+        \csname begin\endcsname{document}
+        % center staves horizontally on page
+        \ifdim\lilypondpaperlinewidth\lilypondpaperunit > 0pt
+          \hsize\lilypondpaperlinewidth\lilypondpaperunit
+          % we abuse \scoreshift temporarily
+          \scoreshift \paperwidth
+          \advance\scoreshift -\the\hsize
+          \scoreshift 0.5\scoreshift
+          \advance\scoreshift -1in
+          \oddsidemargin \scoreshift
+          \evensidemargin \scoreshift
+        \fi
+        \parindent 0pt
+      }
+    }
+
+  \x
+
+  \lilypondifundefined{mustmakelilypondtitle}
+    {}
+    {\makelilypondtitle}
+
+  \lilypondifundefined{mustmakelilypondpiecetitle}
+    {}
+    {\makelilypondpiecetitle}
+}
 
-\ifx\mustmakelilypondpiecetitle\undefined
-\else
-  \makelilypondpiecetitle
-\fi
+\gdef\lilypondend{
+  \lilypondifundefined{lilypondbook}
+    {\lilypondifundefined{lilypondpaperlastpagefill}
+      {\vskip 0pt plus \lilypondpaperinterscorelinefill00 fill}
+      {}
+    }
+    {}
+
+  \begingroup
+  \lilypondifundefined{lilyponddocument}
+    {
+      \def\x{\endgroup}
+    }
+    {
+      \def\x{
+        \endgroup
+        \csname end\endcsname{document}
+      }
+    }
+
+  \x
+}
 
-% skip if included already
+% this is an inversed \loop ... \repeat macro
+\def\lilypondloop#1\lilypondrepeat{
+  \def\lilypondbody{#1}
+  \lilyponditerate
+}
 
-\def\SkipLilydefs{
-  \endlinechar \lilyponddefsELC
-  \endinput}
-\ifundefined{EndLilyPondOutput}
-  \def\EndLilyPondOutput{\csname bye\endcsname}
-  \def\SkipLilydefs{}
-\fi
-\SkipLilydefs
+\def\lilyponditerate{
+  % \if ...
+    \lilypondbody
+    \let\lilypondnext \relax
+  \else
+    \let\lilypondnext \lilyponditerate
+  \fi
+  \lilypondnext
+}
 
-% need to do some stuff to turn page numbering off
+\newread\lilypondinput
 
-\ifundefined{documentclass}
-  \input lilypond-plaintex
-\else
-  \input lilypond-latex
-\fi
+% the following macro is executed only once
+\gdef\lilypondspecial{
+  \special{header=music-drawing-routines.ps}
+  \gdef\lilypondspecial{}
+}
 
-% The feta characters
+% the feta characters
 \input feta20
 
-\font\fetasixteen = feta16
-\def\fetafont{\fetasixteen}
-\def\fetachar#1{\hbox{\fetasixteen#1}}
+\global\font\fetasixteen = feta16
+\gdef\fetafont{\fetasixteen}
+\gdef\fetachar#1{\hbox{\fetasixteen#1}}
 
-\def\botalign#1{
+\gdef\botalign#1{
   \vbox to 0pt{\vss #1}
 }
-\def\leftalign#1{
+\gdef\leftalign#1{
   \hbox to 0pt{#1\hss}
 }
 
-% Attempt to keep lilypiecetitle together with the piece:
+\gdef\lyitem#1#2#3{
+  \botalign{
+    \hbox{\raise #1\outputscale
+          \leftalign{\kern #2\outputscale #3}}
+  }
+}
 
-%
-% TODO: figure this out.
-%
+\gdef\lybox#1#2#3{
+  \hbox to #1\outputscale {
+    \lower\scoreshift \vbox to #2\outputscale {
+      \hbox{#3}
+      \vss
+    }
+    \hss
+  }
+}
 
-\def\myfilbreak{}%\par\vfil\penalty200\vfilneg}
+\gdef\lyvrule#1#2#3#4{
+  \kern #1\outputscale
+  \vrule width #2\outputscale depth #3\outputscale height #4\outputscale
+}
 
+% Attempt to keep lilypiecetitle together with the piece:
+%
+% TODO: figure this out.
+\gdef\myfilbreak{}%\par\vfil\penalty200\vfilneg}
 
-\ifundefined{lilypondpaperinterscorelinefill}
-  \def\lilypondpaperinterscorelinefill{0}
-\else
-  \def\lilypondpaperinterscorelinefill{1}
-\fi
+\lilypondifundefined{lilypondpaperinterscorelinefill}
+  {\gdef\lilypondpaperinterscorelinefill{0}}
+  {\gdef\lilypondpaperinterscorelinefill{1}}
 
-\def\interscoreline{
+\gdef\interscoreline{
   \vskip \lilypondpaperinterscoreline \lilypondpaperunit
     plus \lilypondpaperinterscorelinefill fill
 }
 
-\def\placebox#1#2#3{
-  \botalign{
-    \hbox{\raise #1\leftalign{\kern #2{}#3}}
-  }
-}
-
 % Are we using PDFTeX?  If so, use pdf definitions.
-% MiKTeX checks \pdfoutput the wrong way; this makes our
-% check more complicated.
-\ifx\pdfoutput\undefined  
-  \input lily-ps-defs
-\else
-  \ifx\pdfoutput\relax
-    \input lily-ps-defs
-  \else
-    \pdfoutput = 1
-    \input lily-pdf-defs
-  \fi
-\fi
-
-\def\EndLilyPondOutput{
-  \ifundefined{lilypondpaperlastpagefill}
-    \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill
-  \fi
-  \csname bye\endcsname
-}
+% MiKTeX checks \pdfoutput the wrong way, thus we use \csname.
+\lilypondifundefined{lilypondpostscript}
+  {
+    \lilypondifundefined{pdfoutput}
+      {\input lily-ps-defs }
+      {
+        \pdfoutput = 1
+        \input lily-pdf-defs
+      }
+  }
+  {}
 
-% Need to do some stuff to turn page numbering off;
-% they seriously mess up your fragments.
-
-\ifx\csname nolilyfooter\endcsname\relax
-  \message{[footer defined]}
-  \csname lilyfooter\texsuffix\endcsname
-\else
-  \message{[footer empty]}
-  \csname nolilyfooter\texsuffix\endcsname
-\fi
-
-% It is very bad that lilyponddefs.tex gets included in every lilypond
-% output snippet.  This is necessary because these output snippets
-% often get encapsulated, eg by texinfo. This should be fixed by
-% putting the variable parts in this file into a macro so that loading
-% the file multiple times can be avoided.
-\ifx\outputscale\undefined
-  \csname global\endcsname\csname newdimen\endcsname\outputscale
-  \csname global\endcsname\csname newdimen\endcsname\scoreshift
-\fi
+\newdimen\outputscale
+\newdimen\scoreshift
 
 % Restore newline functionality (disabled to avoid \par).
 \endlinechar \lilyponddefsELC
 \endinput
+
+% EOF