]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.149 release/1.3.149
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 16 Apr 2001 21:34:46 +0000 (23:34 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 16 Apr 2001 21:34:46 +0000 (23:34 +0200)
============

* Added titling and page wrapping to direct PostScript output.
Determining the line height still doesn't work, but you can set
lineheight in paper block.

* Bugfix: lilypond -o - foo.ly.

* Took a stab at jazz-style chord name additions.

* Compile fixes: gcc-3.0 snapshots hit Debian unstable.  Note that
flex-2.5.4a-11 still breaks with g++-3.0pre.

* Chord-name cleanups.

* Markup text:
- added (extent . (min . max))
- overstrike, as alias for (extent . (0 . 0))
- added overstrike property to super and sub
- allow text to be in too deep list, ie: #'((("text"))) still works
- allow HEAD to be in too deep list, ie: #'(((bold)) "foo")
- fixes to raise
- renamed (rows to (columns (Thanks Mats; I must have been asleep
when I wrote that code)
- renamed align to axis

* Fixes for german-chords.ly (Rune).

* update-lily: use ftplib, notify upon failure, not success.

* Oops, I did it again (Han-Wen).

1.3.148.h

79 files changed:
CHANGES
Documentation/topdocs/WINDOWS.texi
Documentation/user/convert-ly.itexi
Documentation/user/converters.itely
Documentation/user/glossary.tely
Documentation/user/internals.itely
Documentation/user/invoking.itexi
Documentation/user/lilypond-book.itely
Documentation/user/ly2dvi.itexi
Documentation/user/refman.itely
Documentation/user/tutorial.itely
Documentation/windows/cygwin-installer.patch
VERSION
WINDOWS.txt
flower/include/dictionary.hh
flower/include/getopt-long.hh
flower/include/libc-extension.hh
flower/include/rational.hh
flower/include/source-file.hh
flower/include/string.hh
flower/include/virtual-methods.hh
flower/parse-afm.cc
flower/rtti.cc
flower/source-file.cc
input/bugs/dynamic-collide.ly [deleted file]
input/bugs/minimal.ly [deleted file]
input/bugs/script-dir.ly [deleted file]
input/bugs/script.ly [deleted file]
input/bugs/textstyle.ly [deleted file]
input/test/coriolan-margin.ly
input/test/ct-jazz.ly [new file with mode: 0644]
input/test/figured-bass.ly
input/test/markup.ly
input/test/metronome.ly
input/test/part-combine-score.ly
input/test/super-sub.ly [new file with mode: 0644]
input/test/textscript.ly
input/test/title.ly
input/trip.ly
input/tutorial/os-score.ly
input/twinkle.ly
lily/a2-engraver.cc
lily/afm.cc
lily/align-interface.cc
lily/include/grob-info.hh
lily/include/lily-guile.hh
lily/include/main.hh
lily/include/moment.hh
lily/include/paper-stream.hh
lily/include/scm-hash.hh
lily/lexer.ll
lily/lily-guile.cc
lily/main.cc
lily/midi-stream.cc
lily/molecule.cc
lily/music-constructor.cc
lily/paper-stream.cc
lily/scm-option.cc
lily/text-item.cc
lilypond-mode.el
ly/german-chords.ly
ly/params.ly
make/out/lilypond.lsm
make/out/lilypond.spec
midi2ly/main.cc
mutopia/F.Schubert/standchen.ly
ports/mutopia/GruberFX/GNUmakefile [new file with mode: 0644]
ps/lily.ps
ps/lilyponddefs.ps
scm/chord-name.scm
scm/font.scm
scm/grob-property-description.scm
scm/lily.scm
scm/ps.scm
scripts/convert-ly.py
scripts/lilypond-book.py
scripts/ly2dvi.py
scripts/update-lily.py
tex/titledefs.tex

diff --git a/CHANGES b/CHANGES
index d0a17ebec9d055cdd2f53d2b6b49a5e510724462..54da3bce7eaef6da33715b1221c4459c62a4f929 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,50 @@
+1.3.148.jcn3
+============
+
+* Added titling and page wrapping to direct PostScript output.
+Determining the line height still doesn't work, but you can set
+lineheight in paper block.
+
+* Bugfix: lilypond -o - foo.ly.
+
+* Took a stab at jazz-style chord name additions.
+
+* Compile fixes: gcc-3.0 snapshots hit Debian unstable.  Note that
+flex-2.5.4a-11 still breaks with g++-3.0pre.
+
+* Chord-name cleanups.
+
+* Markup text:
+- added (extent . (min . max))
+- overstrike, as alias for (extent . (0 . 0))
+- added overstrike property to super and sub
+- allow text to be in too deep list, ie: #'((("text"))) still works
+- allow HEAD to be in too deep list, ie: #'(((bold)) "foo")
+- fixes to raise
+- renamed (rows to (columns (Thanks Mats; I must have been asleep
+when I wrote that code)
+- renamed align to axis
+
+* Fixes for german-chords.ly (Rune).
+
+* update-lily: use ftplib, notify upon failure, not success.
+
+* Oops, I did it again (Han-Wen).
+
+1.3.148.hwn2
+============
+
+* Documentation updates.
+
+* Bugfix: header/footer for ly2dvi.
+
+* Fixed: ly2dvi file1.ly file2.ly
+
+* lilypond-bug bugfix: remove .png file if output fails.
+
+1.3.148
+=======
+
 1.3.147.jcn2
 ============
 
index 8c79551a564849e7286bab7a12b131f071f95f72..f3eff2dbfaf2641a4f1c3d53846a754abdc14c8a 100644 (file)
@@ -151,9 +151,41 @@ emacs-on-cygwin setup.
 
 * GUILE errors, simple guile test
 
-* TEX errors, simple tex test
+* (La)TEX errors, simple tex test
 
+
+]
+@ignore 
+
+  guile -v
+  Guile 1.4.1
+
+  guile -e %load-path
+  ERROR: Wrong type to apply: ("/usr/share/guile/site" /usr/share/guile/1.4.1")
+  
+
+  
+Mats?
+
+Let's take this step by step.
+
+It should not be critical which MikTeX version you use.
+Let's first verify that your MikTeX works as it should.
+Open a DOS window. Run the commands
+>> latex sample2e
+ Should produce some lines of output
+>> yap sample2e
+ Should display a three page document.
+
+Next step; verify that the geometry package is in place. 
+Save the attached file to the directory where you run 
+your DOS window. Run the commands
+>> latex geometrytest
+>> yap geometrytest
+This one you should get a single page document with some text
+in each corner.
 ]
 
+@end ignore
 
 
index f8af4c7df8eec38f0aa3cd72310e43bf354252f1..255b30fbfd60154e5af7ca994d0dae28823dd88e 100644 (file)
@@ -8,7 +8,7 @@ Convert-ly sequentially applies different conversions to upgrade a
 Lilypond input file.  It uses @code{\version} statements in the file to
 detect the old version number.
 
-@subsection Invoking convert-ly
+@unnumberedsubsec Invoking convert-ly
 
 @example
         convert-ly [OPTION]... [FILE]...
@@ -20,28 +20,38 @@ detect the old version number.
     If version number cannot be determined, apply all conversions.
 @item -e,--edit
     Do an inline edit of the input file. override @code{--output}
-@item -f,--from=@var{FROM_PATCHLEVEL}
+@item -f,--from=@var{from-patchlevel}
     Set the level to convert from. If this is not set, convert-ly will
     guess this, on the basis of @code{\version} strings in the file
-@item -o,--output
-    The output file to write.  
+@item -o,--output=@var{file}
+    Set the output file to write.  
 @item -n,--no-version
     Normally, convert-ly adds a @code{\version} indicator 
 to the output. Specifying this option suppresses this.  
 
 @item --show-rules
-    shows all known conversions, and exit
-@item --to=@var{TO_PATCHLEVEL}
+    Show all known conversions and exit
+@item --to=@var{to-patchlevel}
     Set the goal version of the conversion. It defaults to the latest
     available version.
 @end table
 
+@unnumberedsubsec Example
+
+Upgrade all lilypond files to 1.3.150:
+@example
+        convert-ly -e --to=1.3.150 `find -name '*.ly'`
+@end example
+
+@unnumberedsubsec Bugs
+
 Not all language changes are handled. Multiple output options won't
 work.
 
+@unnumberedsubsec Authors
+
 @code{convert-ly} is written in @uref{http://www.python.org,Python}. It
 was written by @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}. Report bugs
 to @code{bug-gnu-music@@gnu.org}
 
 
-
index 9522f50cd652a15c7111ee0d99c2b3e6fbe53f61..bfedd23c62918f0eaeadb696b4db3bf69a0dbb5e 100644 (file)
@@ -26,8 +26,8 @@ to import files from a program that has no converter for its native
 format.
 
 It is possible to record a MIDI file using a digital keyboard, and then
-convert it to @file{.ly}. However, human players can not rhythmically
-exact enough to make a MIDI to .ly conversion trivial.  midi2ly tries to
+convert it to @file{.ly}. However, human players are not rhythmically
+exact enough to make a MIDI to LY conversion trivial.  midi2ly tries to
 compensate for these timing errors, but is not very good at this. It is
 therefore not recommended to use midi2ly for human-generated midi
 files. Correcting the quantization mistakes of the human player takes a
index 695c8eede10d6d40d2dca42af1d686b4c98d97a1..ad9f9f4759feb0dc9d6a12b896454d595b1522fa 100644 (file)
@@ -1458,15 +1458,16 @@ unlike @emph{leggiero} or @emph{non-legato} (b), @emph{portato} (c) and
 
 @lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
-\property Lyrics.LyricText \set #'font-style = #'large
 \addlyrics
-\notes\relative c'' { 
+\context Staff \notes\relative c'' { 
   c4( d )e \bar "||" 
   c4-- d-- e-- \bar "||" 
   c4-.( d-. )e-. \bar "||" 
   c4-. d-. e-. \bar "||" 
 }
-\context Lyrics \lyrics { a "" "" b "" "" c "" "" d  }
+\context Lyrics \lyrics {
+  \property Lyrics . LyricText \set #'font-style = #'large
+  a "" "" b "" "" c "" "" d  }
 @end lilypond
 
 @item legato curve
@@ -2059,10 +2060,10 @@ sub@-do@-mi@-nant (S) and V = dominant (D).
 
 @lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
-\property Lyrics.LyricText \set #'font-style = #'large
+\property Score.LyricText \set #'font-style = #'large
 %\property Lyrics.minVerticalAlign = #8
 \addlyrics
-\notes\relative c' { 
+\context Staff \notes\relative c' { 
   c1 d e f g a b c }
 \context Lyrics \lyrics { 
   < { I II III IV V VI VII I } 
index cc485a3ae3599426914e49087cfcc6062909f185..84b04293346f885bd7efe6bb20bb8adfadb53d53 100644 (file)
 @node Internals
 @chapter Internals
 
-@menu
-* Conversion stages::           Lilypond is a multi-pass program.
-* Moment::                      
-* Grobs::                       Graphical object  
-* Duration::                    
-* Pitch data type::             
-* Engraver::                    
-* Music_iterator::              
-* Music::                       
-* Molecules::                   Molecules are stand-alone descriptions of output
-* Font metrics::                Font metrics
-* Miscellaneous Scheme functions::  
-@end menu
-
-@node Conversion stages
-@section Conversion stages
 
 When translating the input to notation, there are number of distinct
 phases.  We list them here:
 
-@table @code
+@table @b
 
 @item Parsing:
 
-The .ly file is read, and converted to a list of @code{Scores}, which
-each contain @code{Music} and paper/midi-definitions.
+The LY file is read, and converted to a list of @code{Scores}, which
+each contain @code{Music} and paper/midi-definitions. Here @code{Music},
+@code{Pitch} and @code{Duration}  objects are created.
 
 @item Interpreting music
 @cindex interpreting music
@@ -45,7 +30,13 @@ All music events are "read" in the same order as they would be played
 events are delivered to
 interpretation contexts,
 @cindex engraver
-which use them to build grobs (or MIDI objects, for MIDI output).
+which use them to build @code{Grob}s (or MIDI objects, for MIDI output).
+
+In this stage @code{Music_iterators} do a traversal of the @code{Music}
+structure. The music events thus encountered are reported to
+@code{Translator}s, a set objects that collectively form interpretation
+contexts.
+
 
 @item Prebreaking
 
@@ -76,10 +67,44 @@ spanner grob will only reference other grobs in the same line.
 @item Outputting:
 
 All vertical dimensions and spanning objects are computed, and all grobs
-are output, line by line.
+are output, line by line. The output is encoded in the form of
+@code{Molecule}s
 
 @end table
 
+The data types that are mentioned here are all discussed in this
+section.
+
+@menu
+* Input location::              
+* Moment::                      
+* Duration::                    
+* Pitch data type::             
+* Music::                       
+* Music_iterator::              
+* Translator::                  
+* Grobs::                       Graphical object  
+* Molecules::                   Molecules are stand-alone descriptions of output
+* Font metrics::                Font metrics
+* Miscellaneous Scheme functions::  
+@end menu
+
+@node Input location
+@section input location
+
+The parser generates
+
+Input location objects point to a lcoation in the input file. This
+location is used to generate error messages and to enable the point and
+click output.
+
+@defun ly-input-location?
+Type predicate
+@end defun
+
+
+
+
 @node Moment
 @section Moment
 
@@ -93,6 +118,116 @@ so we created our own rational data type.
 create the rational number @var{num}/@var{den}. 
 @end defun
 
+@node Duration
+@section Duration
+
+A duration is a musical duration, i.e. a length of time described by a
+power of two (whole, half, quarter, etc.) and a number of augmentation
+dots. 
+
+@defun make-duration length dotcount
+
+@var{length} is the negative logarithm (base 2) of the duration:
+1 is a half note, 2 is a quarter note, 3 is an eighth
+note, etc.  The number of dots after the note is given by
+@var{dotcount}.
+@end defun
+
+
+@defun duration? d
+type predicate for Duration
+@end defun
+
+@node Pitch data type
+@section Pitch data type
+
+
+
+@defun make-pitch octave note shift
+
+@var{octave} is specified by an integer, zero for the octave containing
+middle C.  @var{note} is a number from 0 to 6, with 0 corresponding to C
+and 6 corresponding to B.  The shift is zero for a natural, negative for
+flats, or positive for sharps.
+@end defun
+
+@defun pitch-octave p 
+extract the octave from pitch @var{p}.
+@end defun
+
+@defun pitch-notename p
+extract the note name from pitch  @var{p}.
+@end defun
+
+@defun pitch-alteration p
+extract the alteration from pitch  @var{p}.
+@end defun
+
+@defun pitch-semitones p
+calculate the number of semitones of @var{p} from central C.
+@end defun
+
+@defun Pitch::transpose t p
+Transpose @var{p} by the amount @var{t}, where @var{t} is the pitch that
+central C is transposed to. 
+@end defun
+
+
+@node Music
+@section Music
+
+Music is the data type that music expressions are stored in. The data
+type does not yet offer many manipulations.
+
+@defun ly-get-mus-property m sym
+Get the property @var{sym} of music expression @var{m}.
+@end defun
+
+@defun ly-set-mus-property m sym val
+Set property @var{sym} in music expression @var{m} to @var{val}.
+@end defun
+
+@defun ly-make-music name
+Make a music object/expression of type @var{name}. Warning: this
+interface will likely change in the near future.
+@end defun
+
+@defun music? obj
+A type predicate,  return true if @var{obj} is a music object.
+@end defun
+
+@defun ly-music-name music
+Print the name of @var{music}.
+@end defun
+
+
+@node Music_iterator
+@section Music_iterator
+
+Music_iterator is an object type that traverses the Music structure and
+reports the events it finds to interpretation contexts. It is not yet
+user-serviceable.
+
+@defun c++-function?
+type predicate for c++-function.   Music_iterator are created from
+schemified C++ constructors. Such a constructor is a @code{c++-function}.
+@end defun
+
+@node Translator
+@section Translator
+
+Translators are the building blocks of contexts. They are not yet user
+accessible.
+
+@defun ly-get-trans-property tr sym
+retrieve the value of @var{sym} from context @var{tr}
+@end defun
+
+@defun ly-set-trans-property tr sym val
+set value of property @var{sym} in context @var{tr} to @var{val}.
+@end defun
+
+
 @node Grobs
 @section Grobs
 
@@ -109,11 +244,8 @@ The most simple interaction with Grobs are when you use
 @end example
 
 This piece of lily input causes all stem objects to be stem-up
-henceforth.  In effect, you are telling lilypond to extend the defintion
-of the "Stem" grob with the setting @code{direction := 1}.  Of course
-there are many more ways of customizing Lily output, and since most of
-them involve Grobs in some form, this section explains some details of
-how grobs work.
+henceforth.  In effect, you are telling lilypond to extend the definition
+of the `Stem' grob with the setting @code{direction := 1}.
 
 @menu
 * What is a grob?::             
@@ -131,28 +263,27 @@ how grobs work.
 
 In music notation, lots of symbols are related in some way.  You can
 think of music notation as a graph where nodes are formed by the
-symbols, and the arcs by their relations. A grob is node in that
-graph. A grob stores references to other grobs, the directed edges in
-the graph.
+symbols, and the arcs by their relations. A grob is node in that graph.
+The directed edges in the graph are formed by references to other grobs
+(i.e. pointers).
 
-The objective of this big graph of grobs, is to specify the notation
-problem. The solution of this problem is a description of the printout
-that is in closed form, i.e. but a list of values.  These values are
-Molecules. (see @ref{Molecules})
+This big graph of grobs specifies the notation problem. The solution of
+this problem is a description of the printout in closed form, i.e. a
+list of values.  These values are Molecules. (see @ref{Molecules})
 
 All grobs have an X and Y-position on the page.  These X and Y positions
 are stored in a relative format, so they can easily be combined by
 stacking them, hanging one grob to the side of another, and coupling
 them into a grouping-grob.
 
-Each grob has a reference point, or parent: the position of a grob is
-stored relative to that reference point. For example the X-reference
+Each grob has a reference point (a.k.a.  parent): the position of a grob
+is stored relative to that reference point. For example the X-reference
 point of a staccato dot usually is the note head that it applies
-to. Whenever the note head is moved, the staccato dot moves along
+to. When the note head is moved, the staccato dot moves along
 automatically.
 
 If you keep following offset reference points, you will always end up at
-the root-object. This root object is called @code{Line_of_score}, and it
+the root object. This root object is called @code{Line_of_score}, and it
 represents a system (ie. a line of music).
 
 All grobs carry a set of grob-properties.  In the Stem example above,
@@ -162,24 +293,14 @@ that draws the symbol (@code{Stem::brew_molecule}) uses the value of
 appearance of a grob is determined solely by the values of its
 properties.
 
-Often, a grob also is associated with a symbol. However, some
-grobs do not print any symbols, but take care of grouping objects. For
-example, there is a separate grob that stacks staffs vertically, so they
-are not printed in overstrike. The @code{NoteCollision} is another
-example of an abstract grob.  It only moves around chords, but doesn't
-print anything.
-
-A complete list of grob types is found in 
-@ref{(lilypond-internals)LilyPond backend}
-
-Grobs are created in the "Interpreting music" phase, by objects in
-LilyPond called engravers.  In this phase of the translation, a load of
-grobs are created, and they are linked into a giant network of objects.
-This network of grobs forms the "specification" of the print
-problem. This problem is then solved: configurations, directions,
-dimensions, line breaks, etc.  are calculated. Finally,   the printing
-description in the form of Molecules (@ref{Molecules})  is extracted from
-the network. These are then dumped into the output file
+A grob is often associated with a symbol, but some grobs do not print
+any symbols. They take care of grouping objects. For example, there is a
+separate grob that stacks staffs vertically. The @code{NoteCollision}
+also is an abstract grob: it only moves around chords, but doesn't print
+anything.
+
+A complete list of grob types is found in the generated documentation.
+
 
 @node Callbacks
 @subsection Callbacks
@@ -206,7 +327,8 @@ automatically execute all callbacks for that object. In this case, it
 will find @code{my-callback}, and execute that. The result is that the
 stem is translated by two staff spaces in its direction.
 
-(note: Y-offset-callbacks is also a property) 
+(note: @code{Y-offset-callbacks} is also a property)
+
 
 
 Offset callbacks can be stacked, ie.
@@ -217,12 +339,12 @@ Offset callbacks can be stacked, ie.
 
 @end example
 
-The callbacks will be executed in the order callback3 callback2
-callback1. This is used for quantized positioning: the staccato dot is
+The callbacks will be executed in the order @code{callback3 callback2
+callback1}. This is used for quantized positioning: the staccato dot is
 above or below a note head, and it must not be on a staff-line.  To
-achieve this, for the staccato there are two callbacks: one callback
-that positions the grob above or below the note head, and one callback
-that rounds the Y-position of the grob to the nearest open space.
+achieve this, the staccato dot has two callbacks: one that positions the
+grob above or below the note head, and one that rounds the Y-position of
+the grob to the nearest open space.
 
 Similarly, the size of a grob are determined through callbacks, settable
 with grob properties @code{X-extent-callback} and
@@ -236,7 +358,9 @@ extent in that coordinate.
 @subsection Setting grob properties
 
 Grob properties are stored as GUILE association lists, with symbols as
-keys.   From C++, element properties can be accessed using the functions
+keys.  In GUILE you can access these using functions described @ref{Grob
+Scheme functions}.  From C++, grob properties can be accessed using
+these functions:
 
 @example
   SCM  get_grob_property (SCM) const;
@@ -248,34 +372,24 @@ keys.   From C++, element properties can be accessed using the functions
   SCM  remove_grob_property (const char* nm);
 @end example
 
-In GUILE, LilyPond provides
-
-@example
-        ly-get-grob-property GROB SYMBOL
-        ly-set-grob-property GROB SYMBOL VALUE
-@end example
-
-All lookup functions identify undefined properties with 
-end-of-list (ie. @code{'()} in Scheme or @code{SCM_EOL} in C)
+All lookup functions identify undefined properties with end-of-list
+(ie. @code{'()} in Scheme or @code{SCM_EOL} in C)
 
 Properties are stored in two ways:
 @itemize @bullet
-@item mutable properties:
-element properties that change from object to object. The storage of
-these are private to a grob. Typically this is used to store lists of
-pointers to other grobs
+@item mutable properties.
+grob properties that change from object to object. The storage of
+these are private to a grob. For example pointers to other grobs are
+always stored in the mutable properties.
 
-@item immutable properties:
-element properties that are shared across different grobs of the same
+@item immutable properties.
+Grob properties that are shared across different grobs of the same
 type. The storage is shared, and hence it is read-only. Typically, this
-is used to store function callbacks, and values for shared element
-properties are read from @file{scm/element-description.scm}.
+is used to store function callbacks, and default settings. They are
+initially read from from @file{scm/grob-description.scm}.
 @end itemize
 
-There are two ways to manually set grob properties.
-
-You can change immutable grob properties. This is done with the
-\override syntax:
+You can change immutable grob properties with the \override syntax:
 
 @example
         \property Voice.Stem \override #'direction = #1
@@ -283,7 +397,7 @@ You can change immutable grob properties. This is done with the
 
 This will push the entry @code{'(direction . 1)} on the immutable
 property list for stems, in effect overriding the setting from
-@file{scm/element-description.scm}. This can be undone by 
+@file{scm/grob-description.scm}. This can be undone by 
 
 @example
         \property Voice.stem \revert #'direction
@@ -298,14 +412,15 @@ shorthand,
 
 this does a @code{\revert} followed by a @code{\override}
 
-The second way is \outputproperty. This construct looks like
+You can change mutable properties with \outputproperty. This construct
+looks like
 
 @example
         \context ContextName \outputproperty @var{pred} #@var{sym} = #@var{val}
 @end example
 
-In this case, in every grob that satisfies @var{pred}, the property
-assignment @var{sym} = @var{val} is done.  For example
+In this case, in every grob that satisfies @var{pred}, the grob property
+ @var{sym} is set to @var{val} is done.  For example
 
 @example
         \outputproperty
@@ -314,7 +429,7 @@ assignment @var{sym} = @var{val} is done.  For example
                 #'extra-offset = #'(-1.0 . 0.0)
 @end example
 
-This shifts all elements that have a @code{text} property one staff
+This shifts all grobs that have a @code{text} property one staff
 space to the left. This mechanism is rather clumsy to use, but it allows
 you tweak any setting of any grob.
 
@@ -366,7 +481,7 @@ Other grobs have a shape that depends on the horizontal spacing. For
 example, slur, beam, tie, etc. These grobs form a subtype called
 @code{Spanner}. All spanners have two span-points (these must be
 @code{Item}s), one on the left and one on the right. The left bound is
-also the X-reference point.
+also the X-reference point of the spanner.
 
 Some items need special treatment for line breaking. For example, a
 clef is normally only printed at the start of a line (ie. after a line
@@ -377,14 +492,16 @@ before the line break (at the end of a system), one version that is
 printed after the line break.
 
 Whether these versions are visible and take up space, is determined by
-the outcome of the visibility-lambda. This is a function taking a
-direction (-1, 0 or 1) and returns a cons of booleans, signifying wether
-this grob should be transparent and have no extent.
-
+the outcome of the @code{visibility-lambda}. This grob property is a
+function taking a direction (-1, 0 or 1) as argument. It returns a cons
+of booleans, signifying whether this grob should be transparent and have
+no extent.
 
 @node Grob Scheme functions
 @unnumberedsubsec Grob Scheme functions
 
+Grob properties can be manipulated from Scheme. In practice, most
+manipulations are coded in C++ because of tradition.
 
 @defun ly-get-grob-property g sym
   Get the value of a value in grob @var{g} of property @var{sym}. It
@@ -404,97 +521,8 @@ left, and @code{1} for right.
 Typecheck: is @var{g} a grob?
 @end defun
 
-@node Duration
-@section Duration
-
-@defun make-duration length dotcount
-
-@var{length} is the negative logarithm (base 2) of the duration:
-1 is a half note, 2 is a quarter note, 3 is an eighth
-note, etc.  The number of dots after the note is given by
-@var{dotcount}.
-@end defun
-
-
-@defun duration? d
-type predicate for Duration
-@end defun
-
-@node Pitch data type
-@section Pitch data type
-
-
-
-@defun make-pitch octave note shift
-
-@var{octave} is specified by an integer, zero for the octave
-containing middle C.  @var{note} is a number from 0 to 7, with 0
-corresponding to C and 7 corresponding to B.  The shift is zero for a
-natural, negative to add flats, or positive to add sharps.
-@end defun
-
-@defun pitch-octave p 
-extract the octave from pitch @var{p}.
-@end defun
-
-@defun pitch-notename
-extract the note name from pitch  @var{p}.
-@end defun
-
-@defun pitch-alteration
-extract the alteration from pitch  @var{p}.
-@end defun
-
-@defun pitch-semitones
-calculate the number of semitones of @var{p} from central C.
-@end defun
-
-@defun Pitch::transpose t p
-Transpose @var{p} by the amount @var{t}, where @var{t} is the pitch that
-central C is transposed to. 
-@end defun
-
-@node Engraver
-@section Engraver
-
-Engravers are building blocks of contexts. They are not yet user accessible.
-
-@defun ly-get-trans-property tr sym
-retrieve the value of @var{sym} from context @var{tr}
-@end defun
-
-@defun ly-set-trans-property tr sym val
-set value of property @var{sym} in context @var{tr} to @var{val}.
-@end defun
-
-@node Music_iterator
-@section Music_iterator
-
-This data-type is a direct hook into some C++ constructor functions. It
-is not yet user-serviceable.
 
-@defun c++-function?
-type predicate for c++-function.
-@end defun
-
-@node Music
-@section Music
-
-Music is the data type that music expressions are stored in. The data
-type does not yet offer many manipulations.
 
-@defun ly-get-mus-property m sym
-Get the property @var{sym} of music expression @var{m}.
-@end defun
-
-@defun ly-set-mus-property m sym val
-Set property @var{sym} in music expression @var{m} to @var{val}.
-@end defun
-
-@defun ly-make-music name
-Make a music object/expression of type @var{name}. Warning: this
-interface will likely change in the near future.
-@end defun
 
 @node Molecules
 @section Molecules
@@ -504,8 +532,8 @@ interface will likely change in the near future.
 @cindex Output description
 
 The objective of any typesetting system is to put ink on paper in the
-right places. For LilyPond, this final stage is left to the TeX and the
-printer subsystem. For lily, the last stage in processing a score is
+right places. For LilyPond, this final stage is left to the @TeX{} and
+the printer subsystem. For lily, the last stage in processing a score is
 outputting a description of what to put where.  This description roughly
 looks like
 
@@ -516,18 +544,18 @@ looks like
 @end example
 
 you merely have to look at the tex output of lily to see this.
-Internally these instructions are encoded in Molecules:@footnote{At some
+Internally these instructions are encoded in Molecules.@footnote{At some
 point LilyPond also contained Atom-objects, but they have been replaced
-by Scheme expressions, making the name outdated.}.  A molecule is an
-object that combines dimension information (how large is this glyph ?)
-with what-to-print-where.
+by Scheme expressions, making the name outdated.}  A molecule is
+what-to-print-where information that also contains dimension information
+(how large is this glyph?).
 
 Conceptually, Molecules can be constructed from Scheme code, by
 translating a Molecule and by combining two molecules. In BNF
 notation:
 
 @example
- Molecule = COMBINE Molecule Molecule
+Molecule  :: COMBINE Molecule Molecule
            | TRANSLATE Offset Molecule
            | GLYPH-DESCRIPTION
            ;
@@ -535,7 +563,7 @@ notation:
 
 If you are interested in seeing how this information is stored, you
 can run with the @code{-f scm} option. The scheme expressions are then
-dumped onto the output file.
+dumped in the output file.
 
 All visible, i.e. non-transparant, grobs have a callback to create a
 Molecule. The name of the property is @code{molecule-callback}, and its
@@ -553,7 +581,7 @@ type predicate.
 Construct a molecule by putting @var{mol2} next to
 @var{mol1}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{dir} can be
 -1 (left or down) or 1 (right or up).  @var{padding} specifies extra
-space to add in between.  The unit is global staff space.  is the
+space to add in between measured in global staff space.
 @end defun
 
 @defun ly-get-molecule-extent! mol axis
@@ -563,7 +591,11 @@ Return a pair of numbers signifying the extent of @var{mol} in
 
 @defun ly-set-molecule-extent! mol axis extent
 Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in 
-@var{axis} direction (0 or 1 for x and y axis respectively).
+@var{axis} direction (0 or 1 for x- and y-axis respectively).
+
+Note that an extent @code{(A . B)} is an interval and hence @code{A} is
+smaller than @code{B}, and is often negative.
+
 @end defun
 
 @node Font metrics
@@ -573,10 +605,10 @@ The font object represents the metric information of a font. Every font
 that is loaded into LilyPond can be accessed via Scheme. 
 
 LilyPond only needs to know the dimension of glyph to be able to process
-them. This information is stored in font metric files. LilyPond can
-read two types of font-metrics: @TeX{} Font Metric files (tfm files) and
-Adobe Font Metric files (@file{.afm} files).  LilyPond will always try
-to load afm files first since @file{.afm} files are more versatile.
+them. This information is stored in font metric files. LilyPond can read
+two types of font-metrics: @TeX{} Font Metric files (TFM files) and
+Adobe Font Metric files (AFM files).  LilyPond will always try to load
+AFM files first they files are more versatile.
 
 @defun ly-get-default-font gr
 This returns the default font for grob @var{gr}.
@@ -584,7 +616,7 @@ This returns the default font for grob @var{gr}.
 
 @defun ly-find-glyph-by-name font name
 This function retrieves a Molecule for the glyph named @var{name} in
-@var{font}.  The font must be available as a afm file.
+@var{font}.  The font must be available as an AFM file.
 @cindex afm file
 
 @end defun
@@ -592,9 +624,6 @@ This function retrieves a Molecule for the glyph named @var{name} in
 @node Miscellaneous Scheme functions
 @section Miscellaneous Scheme functions
 
-@defun ly-input-location?
-type predicate
-@end defun
  
 @defun ly-warn msg
 Scheme callable function to issue the warning @code{msg}.
@@ -606,8 +635,8 @@ Return the current lilypond version as a list, e.g.
 @end defun
 
 @defun ly-gulp-file name
-read file named @var{name}, and return its contents in a string. This
-uses the lilypond search path.
+Read the file named @var{name}, and return its contents in a string. The
+file is looked up using the lilypond search path.
 
 @end defun
 
@@ -616,13 +645,18 @@ type predicate. A direction is a -1, 0 or 1.
 @end defun
 
 @defun ly-number->string num
- converts @var{num} without generating many decimals. It leaves a space
-at the end.
+ converts @var{num} to a string without generating many decimals. It
+leaves a space at the end.
 @end defun
 
 @defun set-lily-option sym val
- Set a global option for the program.
+ Set a global option for the program. Supported options  include
+@table @code
+@item midi-debug
+If set to true, generate human  readable MIDI
+@end table
 
-[todo: document interesting sym/val pairs ]
+This function is useful to call from the command line: @code{lilypond -e
+"(set-lily-option 'midi-debug #t)"}
 
 @end defun 
index 9556542c6a202732e4c4b1a050a1309070e2abcd..d1779bdbbbc87395557d6170ffa620773d8b94e4 100644 (file)
@@ -6,9 +6,10 @@
 @cindex options, command line
 @cindex switches
 
+Usage:
 
 @example
-        lilypond [OPTION]... [FILE]...
+        lilypond @var{[OPTION]} ... @var{[file]}...
 @end example
 
 @unnumberedsec Options
@@ -21,18 +22,18 @@ files. Multiple @code{-e} options may be given. They will be evaluated
 sequentially.
 
 @item -f,--format=@var{format}
-Output format for sheet music. Choices are tex (for @TeX{}
-output), ps (for PostScript), scm (for a Scheme
-dump), and as (for ASCIIScript).
+Output format for sheet music. Choices are @code{tex} (for @TeX{}
+output), @code{ps} (for PostScript), @code{scm} (for a Scheme
+dump), and @code{as} (for ASCII-art).
 
 @c TODO: TFMFONTS
 
-For processing both the @TeX{} and the PostScript output, you must
-have appropriate environment variables set.  For @TeX{}, you have to
-set @code{MFINPUTS} and @code{TEXINPUTS} to point to the directory
-containing LilyPond metafont and .tex files.  For processing the
-PostScript with Ghostscript, you have to set @code{GS_FONTPATH} to
-point to the directory containing LilyPond @file{pfa} files.
+For processing both the @TeX{} and the PostScript output, you must have
+appropriate environment variables set.  For @TeX{}, you have to set
+@code{MFINPUTS} and @code{TEXINPUTS} to point to the directory
+containing LilyPond metafont and .tex files.  For processing PostScript
+output with Ghostscript you have to set @code{GS_FONTPATH} to point to
+the directory containing LilyPond PFA files.
 
 Scripts to do this are included in
 @file{buildscripts/out/lilypond-profile} (for sh shells) and
@@ -42,20 +43,20 @@ normally be run as part of your login process.
 
 @item -h,--help
 Show a summary of usage.
-@item --include, -I=DIRECTORY
-Add @file{DIRECTORY} to the search path for input files.
+@item --include, -I=@var{directory}
+Add @var{directory} to the search path for input files.
 @cindex file searching
 @cindex search path
-@item -i,--init=FILE
-Set init file to @file{FILE} (default: @file{init.ly}).
+@item -i,--init=@var{file}
+Set init file to @var{file} (default: @file{init.ly}).
 @item -m,--no-paper
 @cindex MIDI
-Disable @TeX{} output. If you have a @code{\midi} definition, it will do the
-midi output only.
+Disable @TeX{} output. If you have a @code{\midi} definition midi output
+will be generated.
 @item -M,--dependencies
 Output rules to be included in Makefile.
-@item -o,--output=FILE
-Set the default output file to @file{FILE}.
+@item -o,--output=@var{FILE}
+Set the default output file to @var{FILE}.
 @item -s,--safe
 Disallow untrusted @code{\include} directives, in-line
 Scheme evaluation, backslashes in @TeX{}, code.
@@ -67,15 +68,17 @@ web). Volunteers are welcome to do a new audit.
 @item -v,--version
 Show version information 
 @item -V,--verbose
-Be verbose
+Be verbose: show full paths of all  files read, and give timing
+information.
+
 @item -w,--warranty
 Show the warranty with which GNU LilyPond comes. (It comes with 
 @strong{NO WARRANTY}!)
 @end table
 
 
-When invoked with a filename that has no extension, LilyPond will try
-adding `@file{.ly}' as an extension first.
+When invoked with a filename that has no extension, LilyPond will try to
+add @file{.ly} as an extension first.
 
 When LilyPond processes @file{filename.ly} it will produce
 @file{filename.tex} as output (or @file{filename.ps} for PostScript
index bfa123b1fee789ea95d1e8f06df3a0471ad240da..d11d447ebdc29e9f153c1cc5adc23383b40bf515 100644 (file)
@@ -1,29 +1,53 @@
-
-@tex
-\def\preLilypondExample{\vspace{0.5cm}}
-@end tex
-
 @node lilypond-book
 @chapter  lilypond-book
 
-[TODO: THIS MANUAL IS NOT FINISHED YET. FIXME.]
+@command{lilypond-book} runs Lilypond on fragments of lilypond in a
+La@TeX{} or texinfo file, and includes the results into a document that
+can be processed with La@TeX{}, @command{makeinfo} or
+@command{texi2dvi}.  The result is a text document containing formatted
+music integrated.
 
-@command{lilypond-book} is a script that helps integrating lilypond with
-La@TeX{} or texinfo. @command{lilypond-book} runs Lilypond on fragments
-of lilypond in your source file, and includes the results into a
-document that can be processed with La@TeX{}, @command{makeinfo} or
-@command{texi2dvi}.  The result is a text document with formatted music
-integrated.
+More precisely, if a La@TeX{}  file contains
+@example 
 
-@command{lilypond-book} will do its best to try to align the music to
-the left and right margins. Currently all papersizes, one- and
-twocolumn mode and the @code{geometry} package is supported. 
-The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4.
-But changing the linewidth in other ways will not give you a straight
-right margin.
+        \begin@{lilypond@}
+        CONTENTS
+        \end@{lilypond@}
+@end example
+or
+@example
+        \lilypond@{CONTENTS@}
+@end example
+then LilyPond is run on CONTENTS.  @command{lilypond-book} puts the
+result back into the latex file. When you run the result through latex,
+you get a document that mixes text and music.  lilypond-book will insert
+line width and font size definitions before @code{CONTENTS}, so the
+music samples will match the layout of your document.
+
+Very often, if you mix music and text, the music is often only a few
+notes or at most a few bars. This music should be as short as possible
+and not stretched to be aligned to the right margin. lilypond-book does
+this automatically if you don't use a @code{\score} block in
+@code{CONTENTS}. For example: @code{\lilypond@{\context Voice <c' e' g'>
+@}}.
+
+You can also use @code{lilypondfile} to include another file:
+@example
+        \lilypondfile@{foo.ly@}
+@end example
+
+All three forms can take several options. They are specified in brackets
+as follows:
+@example
+       \lilypondfile[options, go, here]@{ ..  @}
+       \begin[options, go, here]@{lilypond@} .. \end@{lilypond@}
+       \lilypond[options, go,here]@{ .. @}
+@end example
+
+In the texinfo version, bitmaps of the music are also generated, so you
+can also make a HTML document with embedded music.
 
-This document assumes you have basic knowledge of GNU LilyPond and
-La@TeX{} or texinfo.
 
 @section TeXinfo reference
 
@@ -32,14 +56,11 @@ Your markup the lilypond code like this:
 @@lilypond[options, go, here]
  YOUR LILYPOND CODE
 @@end lilypond
-@end example
-
-or
-
-@example
 @@lilypond[option, go, here]@{ YOUR LILYPOND CODE @}
+@@lilypondfile[options, go,here]@{@var{filename}@}
 @end example
 
+
 @command{lilypond-book} knows the default margins, and a few papersizes.
 These commands should be in the beginning of the document:
 @itemize @bullet
@@ -74,51 +95,6 @@ and its music:
 
 @lilypond[11pt]{<c' e' g'>}
 
-
-@subsection @@example and @@code
-
-I'm not sure if this will go into the final documentation, this is
-here mostly to remember me on why things are the way they are.
-
-@command{lilypond-book} will do nothing with special with @code{@@code} and
-@code{@@example} environments. The 'code' and 'example' commands
-should work just as normal. People looking at document that should be
-processed by @command{lilypond-book}, should notice nothing special, except from
-some block like this:
-@example
-@@lilypond
-BLABLA
-@@end lilypond
-@end example
-
-or this:
-
-@code{@@lilypond@{ BLABLA @}}
-
-Anything other is a bug in @command{lilypond-book}.
-
-So to get this in the printed manual:
-
-@example
-@@lilypond[26pt]
-\relative c'@{c d e f g2 g@}
-@@end lilypond
-@end example
-
-you have to write this:
-
-@example
-@@example
-@@@@lilypond[26pt]
-\relative c'@@@{c d e f g2 g@@@}
-@@@@end lilypond
-@@end example
-@end example
-
-Simply explained, every '@{', '@}' and '@@' has to be written as '@@@{',
-'@@@}' and '@@@@'. This is how it works in plain texinfo too.
-
-
 @section La@TeX{} reference
 
 Your markup the lilypond code like this:
@@ -142,8 +118,6 @@ The music will be surrounded by @code{\preLilypondExample} and
 @code{\postLilypondExample}. The variables are 
 defined to nothing by default, and the user can redefine them
 to whatever he wants.
-@strong{[UGH: THIS DOES NOT HAPPEN WHEN
-YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]}
 
 @subsection Examples 
 
@@ -169,17 +143,21 @@ and its music:
 @lilypond[11pt]{<c' e' g'>}
 
 
-@subsection \begin@{verbatim@} and \verb|\verb| 
-
-There work just as expected. Look at @file{mb-latex.tex} for details.
-
 @section Options
 
 @table @code
 @item eps
-    the music is created as eps graphics that can be inserted in 
-    the middle of a text line, not only as a separate paragraph.
-    (La@TeX{} only)
+This will create the music as eps graphics and include it into the
+document with the @code{\includegraphics} command.  It works in Latex
+only.
+
+This enables you to place music examples in the running text (and not in
+a separate paragraph). To avoid that La@TeX{} places the music on a line
+of its one, there should be no empty lines between the normal text and
+the lilypond environment. For inline music, you probably also need a
+smaller music font size (eg. 11 pt or 13 pt) 
+
+
 @item verbatim
     CONTENTS is copied into the source enclosed in a verbatim block,
     followed by any text given with the @code{intertext} option, then
@@ -188,21 +166,59 @@ There work just as expected. Look at @file{mb-latex.tex} for details.
 
     @code{ @@lilypond@{ CONTENTS @} } and @code{ \lilypond@{ CONTENTS @} }
     
-@item intertext="text inside apostrophs"
-    Used in conjunction with @code{verbatim} option.
-@item filename=FILENAME
-    Save the lilypond code to FILENAME instead of using a hash value
-    of CONTENTS.
-@item 11pt, 13pt, 16pt, 20pt, 26pt
-    set the fontsize to use for the music
+@item intertext="@var{text}"
+    Used in conjunction with @code{verbatim} option: this puts
+@var{text} between the code and the music.
+@item filename=@var{FILENAME}
+    Save the lilypond code to @var{FILENAME}. By default, a hash value
+of the code is used.
+
+@item @code{11pt}
+@lilypond[11pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{13pt}
+@lilypond[13pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{16pt}
+@lilypond[16pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{20pt}
+@lilypond[20pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{26pt}
+@lilypond[26pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+  }
+@end lilypond
+
 @item singleline
-  linewidth = -1.
+  Produce a single naturally spaced, unjustified line. (i.e.: linewidth = -1).
 @item multiline
-  linewidth = textwidth
+  The opposite of @code{singleline}: justify and break lines.
 @item fragment
 @item nofragment
     Override @command{lilypond-book} autodetection of what type of code is in the
     lilypond block, voice contents or complete code.
+@item printfilename
+    Prints the file name before the music example. Useful in conjunction
+with @code{\lilypondfile}.
 @end table
 
 @section Invocation
@@ -217,10 +233,8 @@ directory, or use the @code{--outdir} commandline options:
 @code{lilypond-book --outdir=out yourfile.tex}
 
 
-For latex input, the file to give to latex has ext @file{.latex}.
-TeXinfo input will be written to a file with ext @file{.texi}. So be
-careful, don't give the source file that ext, or the file will be
-overwritten.
+For latex input, the file to give to latex has extension @file{.latex}.
+TeXinfo input will be written to a file with extension @file{.texi}.
 
 If you use @code{--outdir}, you should also @code{cd} to that directory
 before running LaTeX or makeinfo. This may seem a little kludgy, but
@@ -228,24 +242,6 @@ both Latex and makeinfo expect picture files (the music) to be in the
 current working directory. Moreover, if you do this, LaTeX will not
 clutter you normal working directory  with output files.
 
-@strong{About the input}
-
-If the file contains the ``block''
-
-@example 
-
-        \begin@{lilypond@}
-        CONTENTS
-        \end@{lilypond@}
-@end example 
-
-then LilyPond is run on CONTENTS.  @command{lilypond-book} puts the result back,
-surrounded by @code{\preLilypondExample} and @code{\postLilypondExample}
-commands. @code{\preLilypondExample} and @code{posLilypondExample} is
-defined to nothing by default, and the user can redefine them
-to whatever he wants.
-
 @cindex titling and lilypond-book
 @cindex lilypond-book and titling
 @cindex \header in LaTeX documents
@@ -266,34 +262,37 @@ files, you should add  the following to the top of your LaTeX
 @item @option{-f}, @option{--format=}
     Specify the document type to process, @code{latex} or @code{texi}.
     @command{lilypond-book} usually figure out this automatically.
-@item --default-music-fontsize=??pt
+@item --default-music-fontsize=@var{sz}pt
     Set the fontsize to use for lilypond if no fontsize is given
     as option.
-@item --force-music-fontsize=??pt
+@item --force-music-fontsize=@var{sz}pt
     Force all lilypond to use this fontsize, overriding options
-    given to \begin@{lilypond@}
-@item -I DIR, --include=DIR
-    include path
+    given to @code{\begin@{lilypond@}}
+@item -I @var{DIR}, --include=@var{DIR}
+    Add @var{DIR} to the include path.
 @item -M, --dependencies
-        Write dependencies to out-www/filename.dep
-@item --dep-prefix=PREF
-        prepend PREF before each -M dependency
+        Write dependencies to @file{filename.dep}
+@item --dep-prefix=@code{PREF}
+        prepend @code{PREF} before each @code{-M} dependency
 @item -n, --no-lily
-        don't run lilypond
+        don't run lilypond, but do generate the @code{.ly} files
 @item --no-pictures
-        don't generate pictures
+        don't generate pictures when processing texinfo.
 @item --read-lys
         don't write ly files. This way you can do
-        @example
-        lilypond-book file.tely
-        convert-ly
-        lilypond-book --read-lys
-        @end example
-@item --outname=FILE
+@example
+ lilypond-book file.tely
+ convert-ly
+ lilypond-book --read-lys
+@end example
+
+[TODO not a useful option unless you can undump the input file]
+
+@item --outname=@var{FILE}
     The name of La@TeX{} file to output. If this option  is not given,
     the output name derived from the input name.
-@item --outdir=
-        where to place generated files
+@item --outdir=@var{DIR}
+         place generated files in @var{DIR}.
 @item --version
         print version information
 @item --help
@@ -311,8 +310,17 @@ files, you should add  the following to the top of your LaTeX
   
 The La@TeX{} \includeonly@{...@} command is ignored.
 
+The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4.
+But changing the linewidth in other ways will not give you a straight
+right margin.
+
 Ignores almost all La@TeX{} commands that changes margins and linewidths.
 
+Since there is no finder's fee which doubles every year, there is no
+need to wait for the prize money to grow. So send a bug report today if
+you need this one of these options.
+
+
 @section Authors
 
 @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen}
index fb08e7be110f4d202eda26791f6d53d66e654dc7..653cf2a6aeb7ec6be45b23684df604a8be288cbb 100644 (file)
@@ -3,19 +3,16 @@
 @node ly2dvi
 @chapter ly2dvi
 
-@file{ly2dvi} is a Python script which creates input file for La@TeX{},
-based on information from the output files from LilyPond.
-The script handles multiple files. If a LilyPond file name is
-specified LilyPond is run to make an output (@TeX{}) file.
+@file{ly2dvi} is a Python script that creates a nicely title output file
+from an input file for La@TeX{}. It can create a DVI or PS file. It
+works by running LilyPond on the input files, creating a La@TeX{}
+wrapper around the output, and running La@TeX{} (and optionally
+@code{dvips}).
 
-One or more La@TeX{} files are created, based on information found
-in the output (@TeX{}) files, and latex is finally run to create
-one or more DVI files.
-
-@subsection Invoking ly2dvi
+@unnumberedsubsec Invoking ly2dvi
 
 @example
-ly2dvi [OPTION]... [FILE]...
+ly2dvi @var{[OPTIONS]} ... @var{[FILE]}...
 @end example
 
 @unnumberedsec Options
@@ -39,9 +36,11 @@ files. The temporary directory is created in the current directory as @code{ly2d
 @item -P,--postscript
     Also generate PostScript output.
 @item -s,--set=@var{KEY}=@var{VAL}
-    Add @var{key}= @var{val} to the settings, overriding those specified
-in the files. Possible keys: language, latexheaders, latexpackages, latexoptions,
-papersize, pagenumber, linewidth, orientation, textheight.
+    Add @var{KEY}= @var{VAL} to the settings, overriding those specified
+in the files. Possible keys: @code{language}, @code{latexheaders},
+@code{latexpackages}, @code{latexoptions}, @code{papersize},
+@code{pagenumber}, @code{linewidth}, @code{orientation},
+@code{textheight}.
 @item -v,--version
 Show version information 
 @item -V,--verbose
@@ -51,9 +50,9 @@ Show the warranty with which GNU LilyPond comes. (It comes with
 @strong{NO WARRANTY}!)
 @end table
 
-@subsection Titling layout
+@unnumberedsubsec Titling layout
 
-Ly2dvi extracts the following header fields from the .ly files to
+Ly2dvi extracts the following header fields from the LY files to
 generate titling:
 
 @table @code
@@ -62,29 +61,41 @@ generate titling:
 @item subtitle
     Subtitle, centered below the title.
 @item poet
-    Name of the poet, leftflushed below the below subtitle.
+    Name of the poet, left flushed below the below subtitle.
 @item composer
-    Name of the composer, rightflushed below the subtitle.
+    Name of the composer, right flushed below the subtitle.
 @item metre
-    Meter string, leftflushed below the below poet.
+    Meter string, left flushed below the below poet.
 @item opus
-    Name of the opus, rightflushed below the below composer.
+    Name of the opus, right flushed below the below composer.
 @item arranger
-    Name of the arranger, rightflushed below the opus.
+    Name of the arranger, right flushed below the opus.
 @item instrument
     Name of the instrument, centered below the arranger
 @item piece
-    Name of the piece, leftflushed below the instrument
+    Name of the piece, left flushed below the instrument
+@item head
+    A text to print in the header of all pages. It is not called
+@code{header}, because @code{\header} is a reserved word in LilyPond.
+@item footer
+    A text to print in the footer of all pages
 @item tagline
-    Line to print at the bottom of last page.  Default: ``Lily was here,
-@var{version-number}''.
+    Line to print at the bottom of last page. The default text is ``Lily
+was here, @var{version-number}''.
 @end table
 
 
-@subsection Additional parameters
+@cindex header
+@cindex footer
+@cindex page layout
+@cindex titles
+
+
+
+@unnumberedsubsec Additional parameters
 
 Ly2dvi responds to several parameters specified in the LilyPond
-file. They can be overridden by supplying the @code{--set} command line
+file. They can be overridden by supplying a @code{--set} command line
 option.
 
 @table @code
@@ -113,29 +124,27 @@ so you can add multiple packages using multiple @code{-s=latexpackages} options.
 read from the @code{\paper} block, if set.
         
 @item linewidth
-   Is read from the @code{\paper} block.  
+        The music line width. It is normally read from the @code{\paper}
+block.
 
 @item papersize
-   Specify the papersize. Is read from the @code{\paper} block.
+   The paper size (as a name, e.g. @code{a4}). It is normally read from
+the @code{\paper} block.
 @end table
 
-@subsection Environment variables
+@unnumberedsubsec Environment variables
 
 @table @code
 @item LANG
 selects the language for the warning messages of Ly2dvi and LilyPond.
 @end table
 
-@subsection  Bugs
-
-Assumes that @code{cp} and @code{rm} are in the path.
-
-Cannot generate @TeX{} or @code{PostScript} only.
+@unnumberedsubsec  Bugs
 
-If find something that you consider a bug, please send a bugreport (See
-@ref{Bug reports}) to @email{bug-gnu-music@@gnu.org}.
+Cannot generate @TeX{} or @code{PostScript} only.  Send bugreports to to
+@email{bug-gnu-music@@gnu.org}.
 
-@subsection  Authors
+@unnumberedsubsec  Authors
 
 @email{hanwen@@cs.uu.nl,Han-Wen Nienhuys}.
 
index 2bfd92808a5bff44d06c92101fe35df2eb30cf51..fd99c884851606b0636fd35a350f18b4a5ecff29 100644 (file)
@@ -2367,7 +2367,7 @@ names:
 
 \score { \notes {
   \property Staff.instrument = #`((kern . 0.5) (lines
-    "2 Clarinetti" (rows "     (B" ,text-flat ")")))
+    "2 Clarinetti" (columns "     (B" ,text-flat ")")))
     c'' 4 }
 }
 @end lilypond
@@ -3009,7 +3009,8 @@ text: string | (head? text+)
 head: markup | (markup+)
 markup-item: property | abbrev
 property: (@var{key} . @var{value})
-abbrev: @code{rows lines roman music bold italic named super sub text}
+abbrev: @code{columns lines roman music bold italic named super sub
+overstrike text}
         @code{finger volta timesig mmrest mark script large Large dynamic}
 @end example
 
@@ -3020,8 +3021,8 @@ the generated documentation for @code{text-interface}
 
 The following abbreviations are currently defined:
 @table @code
-@item rows
-horizontal mode: set all text on one line (default)
+@item columns
+ horizontal mode: set all text on one line (default)
 @item lines
  vertical mode: set every text on a new line
 @item roman
@@ -3042,6 +3043,8 @@ and uses named lookup
  superscript
 @item sub
  subscript
+@item overstrike
+ the next text or character overstrikes this one
 @item finger
  select fingering number fontstyle
 @item volta
@@ -3069,16 +3072,16 @@ One practical application of complicated markup is to fake a metronome
 marking:
 
 @lilypond[verbatim]
-#(define note '(rows
+#(define note '(columns
   (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
-#(define eight-note `(rows ,note ((kern . -0.1)
+#(define eight-note `(columns ,note ((kern . -0.1)
   (music ((raise . 3.5) "flags-u3")))))
 #(define dotted-eight-note
-  `(rows ,eight-note (music "dots-dot")))
+  `(columns ,eight-note (music "dots-dot")))
 
 \score {
   \notes\relative c'' {
-    a1^#`((rows (font-relative-size . -1)) ,dotted-eight-note " = 64")
+    a1^#`((columns (font-relative-size . -1)) ,dotted-eight-note " = 64")
   }
   \paper {
     linewidth = -1.
@@ -3432,6 +3435,10 @@ LilyPond produce @TeX{} first.  The .tex output must be processed by
 is used to generate PostScript.  Alternatively, @file{ly2dvi} can be
 used to generate the .dvi for you.
 
+@refbugs
+
+Titling is not generated.
+
 
 @node PostScript output
 @subsection PostScript output
@@ -3465,7 +3472,16 @@ created through direct postscript output, you should prepend the
 necessary .pfa files to LilyPond's .ps output, or upload them to the
 printer before printing.
 
-Titling is not generated.
+The line height calculation is broken, you must set @var{lineheight} in
+the paperblock if you have more than one staff in your score, e.g.
+
+@example
+  ...
+  \paper @{
+    % Set line height to 40 staff spaces
+    lineheight = 40    
+  @}
+@end example
 
 @node Scheme output
 @subsection Scheme output
index bc3a3475d23331ac4c73cb912712e70243104c40..5772357a910cbaaa3e01158e31d55f102d4725a7 100644 (file)
@@ -1709,9 +1709,9 @@ conductor's score.
       \context Staff = corni <
         \property Staff.midiInstrument = #"french horn"
         \property Staff.instrument = #`(lines "Corno"
-          (rows "(E" ,text-flat ")"))
+          (columns "(E" ,text-flat ")"))
         \property Staff.instr = #`(lines "Cor."
-          (rows "(E" ,text-flat ")"))
+          (columns "(E" ,text-flat ")"))
         \property Staff.transposing = #3
         \notes \key bes \major
         \context Voice=one \corno
@@ -1885,10 +1885,10 @@ when they're different.
 @separate
 @example
        \property Staff.instrument = #`(lines "Corno"
-          (rows "(E" ,text-flat ")"))
+          (columns "(E" ,text-flat ")"))
 @end example
 The french horn has the most complex scheme markup name, made up of two
-lines of text.  The second line has two elements (rows), the @code{E}
+lines of text.  The second line has two elements (columns), the @code{E}
 and the flat sign @code{text-flat} that we defined before.
 
 @separate
@@ -2223,234 +2223,5 @@ Type @samp{make help} to see possible targets.
 * Songs with additional verses::  
 @end menu
 
-
-So what does this look like? Well, here is an example:
-@li lypond[veryverbatim, intertext="produces this music:"]
-\score{
-  \notes\relative c'{
-    \time 5/8
-    [e16( g b c a g][e a b d] | )e2 d,8 |
-    [e16( g b c a g][e a b d] | )b2 [a16( f] |
-    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
-    [f( a b d b a][f a b d] | )e2
-  }
-}
-@end lilypond
-If you are lucky, the above example show a nice feature of LilyPond
-and La@TeX{}. Since LilyPond can output the music as @TeX{} graphics,
-La@TeX{} can insert pagebreaks between the lines of music.
-
-Notice that there is no @code{\paper} statement in the example
-above. Lilypond-book will insert some code for you that defines the
-linewidth and the font to use. If you don't want to change the default, 
-there is no need to put an empty @code{\paper@{@}} inside the @code{\score}.
-In the example above, something like this might be inserted before your code:
-@example
-\include "paper16.ly"
-\paper@{ \paper_sixteen
-    linewidth = 390.\pt
-@}
-@end example
-The actual values for linewidth will differ depending on papersize and
-number of columns. Also, if you use a different fontsize for the
-music, another file than @code{paper16.ly} should be included.
-
-If you want to make the music not so wide, you can insert a
-@code{\paper} statement to set the linewidth:
-
-@li lypond[veryverbatim, intertext="produces this music:"]
-\score{
-  \notes\relative c'{
-    \time 5/8
-    [e16( g b c a g][e a b d] | )e2 d,8 |
-    [e16( g b c a g][e a b d] | )b2 [a16( f] |
-    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
-    [f( a b d b a][f a b d] | )e2
-  }
-  \paper{linewidth = 10.\cm }
-}
-@end lilypond
-
-Very often, if you mix music and text, the music is often only a 
-few notes or at most a few bars. This music should be as short as
-possible and not stretched to be aligned to the right margin.
-
-If you only write voice-contents in the lilypond block, @command{lilypond-book}
-will set the @code{linewidth} variable to -1, so Lilypond
-will make the music as short as possible but without breaking the
-line. Here is a well know harmonic progression:
-@li lypond[veryverbatim, intertext="produce a well known harmonic progression:"]
-  \context Voice { <c' e g> <b d g> <c2 e g> }
-@end lilypond
-
-If you want to place music examples in the text,
-@li lypond[eps]
-  \context Voice {  <c' e g> <b d g> <c2 e g> }
-@end lilypond
-, you can use the @code{eps} option. This will create the music as
-eps graphics and include it into the document with the 
-@code{\includegraphics} command.
-
-The code used look like this:
-@example
-@@li lypond[eps]
- \context Voice @{ <c' e g> <b d g> <c2 e g> @}
-@@end lilypond
-@end example
-
-You can also use the @code{eps} option if the block is a complete
-lilypond source. This 5 cm long empty line, 
-@li lypond[eps]
-\score{
-  \notes{s}
-  \paper{ linewidth = 5.\cm }
-}
-@end lilypond
-was created with this code:
-@example
-@@li lypond[eps]
-\score@{
-  \notes@{s@}
-  \paper@{ linewidth = 5.\cm@}
-@}
-@@end lilypond
-@end example
-
-To avoid that La@TeX{} places the music on a line of its one, there should
-be no empty lines between the normal text and the lilypond
-environment. 
-
-You can also use @code{lilypondfile}, to include another file:
-@example
-        @@li lypondfile[printfilename]@{foo.ly@}
-@end example
-
-@subsection Fontsize options
-
-You can use all lilypond fontsizes in @command{lilypond-book}.  The
-default 16pt fontsize is probably to big to be included in the middle of
-the text, 11pt or 13pt is probably better.
-
-The code can look like this:
-@example
-@@li lypond[13pt, eps]
-<c' e g>
-@@end lilypond
-@end example
-
-The following options set the fontsize:
-@itemize
-@item @code{11pt}
-@li lypond[11pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end lilypond
-@item @code{13pt}
-@li lypond[13pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end lilypond
-@item @code{16pt}
-@li lypond[16pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end lilypond
-@item @code{20pt}
-@li lypond[20pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end lilypond
-@item @code{26pt}
-@li lypond[26pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-  }
-@end lilypond
-@end itemize
-
-
-@subsection More options
-
-@itemize
-@item The @code{singleline} option sets @code{linewidth} to -1.0.
-@item The @code{multiline} option sets @code{linewidth} to a value letting
-the music be aligned to the right margin. The music can span several
-lines. 
-@end itemize
-
-@subsection Just in case...
-The options @code{fragment} and @code{nofragment} will override
-@command{lilypond-book} when it scans the lilypond code to see if it is voice
-contents or complete code. This might be useful if @command{lilypond-book} choose
-wrong. 
-
-Since there is no finder's fee which doubles every year, there is no
-need to wait for the price money to grow. So send a bug report today
-if you need this one of these options.
-
-@subsection Examples
-
-This was all options to @code{\begin}. The rest of the lilypond
-document will show some ways you can use lilypond in
-La@TeX{} documents. It will also act as a simple test-suite for
-lilypond-book. You can place @code{eps} lilypond in and marginspars just
-as any other included eps graphics.
-
-@li lypond
-\score{
-  \notes\relative c'{ 
-        \time 12/8
-        r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
-        [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
-        
-        r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
-  }
-  \paper{linewidth = 7.\cm}
-}
-@end lilypond
-
-
-To the right you can see some bars from the trumpet fanfara from the
-beginning of the fantastic street opera ``Houdini the Great'', by the
-Danish composer Andy Pape. The music is put inside a
-@code{floatingfigure} environment, and the music will be aligned by
-the right margin if you set floatingfigure width and lilypond linewidth
-to the same value. The code looks like this:
-
-@li lypond[verbatim]
-\score{
-  \notes\relative c'{ 
-    \time 12/8
-    r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
-    [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
-        
-    r4.-\fermata [cis,16 cis g'8 f16 f b8]
-    [g16 g f8 b16 b] dis4.-\fermata
-  }
-  \paper{linewidth = 7.\cm }
-}
-@end lilypond
-
-If you have a lot of small music examples like this in the middle of
-your text, you might get a nicer look by using ``double'' line
-spacing. Put the @code{\linespread@{1.6@}} command into the preamble of
-your document. Then the line spacing will not be increased between the
-lines where you have music printed with the smallest font size.
-
-Lilypond-book does know about @code{\onecolumn} and @code{\twocolumn}. 
-So the music will be adjusted to the new linewidth:
-
-Verbatim environments will also ignore the page margins. That is
-a feature of La@TeX{}. (But you usually put things inside a verbatim
-environment when you don't want La@TeX{} to do any linebreaking)
-
 @end ignore
 
index 551e99db3722d0ea049120945f8382617bba5321..11bac9d2699c91abb90314a0272204de2a7212c0 100644 (file)
@@ -1,8 +1,7 @@
-Only in .: LilyPond.ico
 diff -urN ../cinstall/Makefile.in ./Makefile.in
 --- ../cinstall/Makefile.in    Thu Feb  8 05:55:22 2001
-+++ ./Makefile.in      Tue Apr 10 19:20:14 2001
-@@ -130,11 +130,16 @@
++++ ./Makefile.in      Thu Apr 12 11:41:37 2001
+@@ -130,11 +130,15 @@
        @chmod a-x $@
  
  clean:
@@ -12,10 +11,10 @@ diff -urN ../cinstall/Makefile.in ./Makefile.in
 +      $(MAKE) -C zlib $@
  
  realclean: clean
-       rm -f  Makefile config.cache
-+      rm -f *.d
-+      rm -f inilex.c iniparse.c iniparse.h version.c config.log config.status *.d 
-+
+-      rm -f  Makefile config.cache
++      rm -f Makefile *.d
++      rm -f config.cache config.log config.status 
++      rm -f inilex.c iniparse.c iniparse.h version.c
 +
 +distclean: realclean
  
@@ -23,7 +22,7 @@ diff -urN ../cinstall/Makefile.in ./Makefile.in
        $(SHELL) $(updir1)/mkinstalldirs $(bindir) $(etcdir)
 diff -urN ../cinstall/desktop.cc ./desktop.cc
 --- ../cinstall/desktop.cc     Sat Nov 11 05:55:16 2000
-+++ ./desktop.cc       Tue Apr 10 19:15:01 2001
++++ ./desktop.cc       Thu Apr 12 11:39:52 2001
 @@ -79,9 +79,7 @@
    "done",
    "",
@@ -110,7 +109,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
  
 diff -urN ../cinstall/ini.cc ./ini.cc
 --- ../cinstall/ini.cc Thu Oct  5 05:55:27 2000
-+++ ./ini.cc   Sun Apr  8 21:52:03 2001
++++ ./ini.cc   Thu Apr 12 11:39:52 2001
 @@ -174,7 +174,7 @@
        {
          *nl = 0;
@@ -122,7 +121,7 @@ diff -urN ../cinstall/ini.cc ./ini.cc
        
 diff -urN ../cinstall/msg.cc ./msg.cc
 --- ../cinstall/msg.cc Sat Aug 26 05:55:14 2000
-+++ ./msg.cc   Sun Apr  8 21:51:56 2001
++++ ./msg.cc   Thu Apr 12 11:39:52 2001
 @@ -44,7 +44,7 @@
  
    vsprintf (buf, fmt, args);
@@ -134,7 +133,7 @@ diff -urN ../cinstall/msg.cc ./msg.cc
  void
 diff -urN ../cinstall/res.rc ./res.rc
 --- ../cinstall/res.rc Wed Mar  7 18:13:31 2001
-+++ ./res.rc   Sun Apr  8 19:48:40 2001
++++ ./res.rc   Fri Apr 13 16:06:40 2001
 @@ -30,10 +30,10 @@
  
  IDD_SOURCE DIALOG DISCARDABLE  0, 0, 215, 95
@@ -325,18 +324,19 @@ diff -urN ../cinstall/res.rc ./res.rc
  CYGWIN.ICON             FILE    DISCARDABLE     "cygwin.ico"
  
  /////////////////////////////////////////////////////////////////////////////
-@@ -354,7 +355,7 @@
+@@ -354,7 +355,8 @@
  BEGIN
      IDS_ROOT_SLASH          "Warning: we recommend you do NOT use the root of your hard drive as the cygwin root.  Proceed anyway?"
      IDS_ROOT_SPACE          "You should not choose a root path that include spaces in directory names.  Proceed anyway?"
 -    IDS_MIRROR_LST          "http://sources.redhat.com/cygwin/mirrors.lst"
-+    IDS_MIRROR_LST          "http://appel.lilypond.org/lilypond/gnu-windows/mirrors.lst"
++    // IDS_MIRROR_LST          "http://appel.lilypond.org/lilypond/gnu-windows/mirrors.lst"
++    IDS_MIRROR_LST          "http://www.lilypond.org/gnu-windows/mirrors.lst"
      IDS_DIALOG_FAILED       "Unable to create Dialog Box"
      IDS_CYGWIN_FUNC_MISSING "Error: unable to find function `%s' in %s"
      IDS_DOWNLOAD_SHORT      "Download error: %s too short (%d, wanted %d)"
 diff -urN ../cinstall/resource.h ./resource.h
 --- ../cinstall/resource.h     Thu Mar  1 05:55:20 2001
-+++ ./resource.h       Sun Apr  8 16:38:11 2001
++++ ./resource.h       Thu Apr 12 11:39:52 2001
 @@ -47,11 +47,12 @@
  #define IDB_SPIN                        118
  #define IDB_RTARROW                     119
@@ -351,4 +351,17 @@ diff -urN ../cinstall/resource.h ./resource.h
  #define IDC_SOURCE_DOWNLOAD             1000
  #define IDC_SOURCE_NETINST              1001
  #define IDC_SOURCE_CWD                  1002
-Common subdirectories: ../cinstall/zlib and ./zlib
+diff -urN ../cinstall/zlib/Makefile.in ./zlib/Makefile.in
+--- ../cinstall/zlib/Makefile.in       Tue Aug  8 05:55:18 2000
++++ ./zlib/Makefile.in Thu Apr 12 11:42:10 2001
+@@ -299,6 +299,10 @@
+ clean: clean-am
++realclean: clean
++      rm -f Makefile *.d
++      rm -f config.cache config.log config.status 
++
+ distclean-am:  distclean-noinstLIBRARIES distclean-compile \
+               distclean-tags distclean-generic clean-am
diff --git a/VERSION b/VERSION
index 290a7165e6a9a73c000ff2d09912528276473b44..c04251a6c1ea54e2d5c79a4ed4b126873de63e24 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=148
-MY_PATCH_LEVEL=uu1
+PATCH_LEVEL=149
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 448741ffcb9b17a95cdd059fa3b03d04286773cc..cd455e9319b9dea63ded1da8bc31af76e2dc3d5b 100644 (file)
@@ -142,7 +142,7 @@ emacs-on-cygwin setup.
 
    * GUILE errors, simple guile test
 
-   * TEX errors, simple tex test
+   * (La)TEX errors, simple tex test
 
    ]
 
index 464bfa132336fff8066127f360f47440baea90df..701bc30d1dacb794d48bd02621045db825c2418b 100644 (file)
@@ -19,7 +19,7 @@
 
 unsigned int string_hash (String);
 
-template<class V>
+template <class V>
 struct Dict_initialiser
 {
   char *key_;
@@ -30,8 +30,9 @@ struct Dict_initialiser
 /*
   interface to STL function.
  */
-template<class V>
-class Dictionary : public map<String, V>
+#include "cons.hh"
+template <class V>
+class Dictionary : public std::map<String, V> //map<String, V>
 {
 public:
   Dictionary ()
@@ -46,7 +47,7 @@ public:
     }
   bool elem_b (String s)
   {
-    map<String,V>::const_iterator ki (find (s));
+    std::map<String,V>::const_iterator ki (find (s));
     return ki != end ();
   }
   
index 887a1a37096e039604f73cbc1cb5a28bbec6d89a..a0992c98e6f0e03ccfc7ff91f27061ff85bcce55 100644 (file)
@@ -1,10 +1,9 @@
 #ifndef GETOPT_LONG_HH
 #define GETOPT_LONG_HH
 
+#include <ostream.h> /* gcc 3.0 */
 #include "string.hh"
 
-class ostream;
-
 /**
   a struct this for initialising the commandline options.
  */
index 5d63e995d5046c7cda09962a045b407599dbfa24..bc76e9400bb27bfa31fca0d2fa820832ffa832c8 100644 (file)
@@ -21,7 +21,7 @@ char* strnupr (char* start_l, int n);
 #if !HAVE_MEMMEM               // GNU extension.
 void *memmem (void const * haystack, int haystack_len,
             void const *needle, int needle_len);
-#endif HAVE_MEMMEM
+#endif /* HAVE_MEMMEM */
 
 #if !HAVE_SNPRINTF             // GNU extension.
 int snprintf (char *str, size_t n, char const *format, ...);
index e095f5871092a82e234b7cf5cc06bf5da90aaf8d..0b1d5d972dbe7ca9953e28f0819143f94b1c67ae 100644 (file)
 #ifndef RATIONAL_HH
 #define RATIONAL_HH
 
-
 #include "compare.hh"
 #include "arithmetic-operator.hh"
 #include "flower-proto.hh"
-class String;
+#include "string.hh"
+
 
 /**
    Rational numbers.  Included is support for + and - infinity.
@@ -87,7 +87,6 @@ Rational::copy (Rational const&r)
   den_ = r.den_;
 }
 
-class ostream;
 ostream &
 operator << (ostream &,  Rational);
 
index 7e590e01c0d041ccea6f3bbb58593a211324e096..7c039ca0ea00755c9bee2a2b557e6231a92e210c 100644 (file)
@@ -10,9 +10,6 @@
 #include "string.hh"
 #include "interval.hh"
 
-class istream;
-
-
 /**
   class for reading and mapping a file. 
 
index 5868d9313adfae07981fa2d72518a770ee48f9e3..d64c8403f3f9ab996cbc3ca3e63d55827871bbb6 100644 (file)
 #ifndef STRING_HH
 #define STRING_HH
 
-
+#include <iostream.h> /* gcc 3.0 */
 #include "arithmetic-operator.hh"
 #include "flower-proto.hh"
 #include "string-handle.hh"
 
-class ostream;
-
 /** 
  
   Intuitive string class. provides 
index e5516d8e7008d38255126acca8066f19694709e2..45e610412748cf5824703db2ec4b1295cf21bd7c 100644 (file)
@@ -15,7 +15,7 @@
 #define classname(class_ptr)   demangle_classname (typeid (* (class_ptr)))
 
 const char *
-demangle_classname (type_info const &);
+demangle_classname (std::type_info const &);
 
 /**
 
index 39b9c0d7d989f062c315b2035549f638a95bcfeb..3d205f00894dfe4a3c223c5ae24f77c320f80593 100644 (file)
@@ -225,7 +225,10 @@ static char *linetoken (FILE *stream)
 
 static enum parseKey recognize (  register char *ident)
 {
-    int lower = 0, upper = (int) NOPE, midpoint, cmpvalue;
+    int lower = 0,
+      upper = (int) NOPE,
+      midpoint = 0,
+      cmpvalue = 0;
     BOOL found = FALSE;
 
     while ((upper >= lower) && !found)
index e942dfbc1b29979a928d2c6793f20233974d4d1e..fc278636a1a0041645cf11822c39f094f7120ea3 100644 (file)
@@ -4,7 +4,7 @@
 
 
 const char *
-demangle_classname (type_info const &t)
+demangle_classname (std::type_info const &t)
 {
   char const *s = t.name ();
   while (isdigit (*s))
index 4c5a4390fd0d4edef1028791877bc467dcede61e..9d2b902e55ebf5b92c852ebea7559de46755440a 100644 (file)
@@ -49,7 +49,8 @@ Source_file::istream_l ()
       else
        {
          istream_p_ = new istrstream ("", 0);
-         istream_p_->set (ios::eofbit);
+         istream_p_->setstate (ios::eofbit);
+         //      istream_p_->set (ios::eofbit);
        }
     }
   return istream_p_;
diff --git a/input/bugs/dynamic-collide.ly b/input/bugs/dynamic-collide.ly
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/input/bugs/minimal.ly b/input/bugs/minimal.ly
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/input/bugs/script-dir.ly b/input/bugs/script-dir.ly
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/input/bugs/script.ly b/input/bugs/script.ly
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/input/bugs/textstyle.ly b/input/bugs/textstyle.ly
deleted file mode 100644 (file)
index 15b5f9a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-\score { \notes
-   { c4_"foo" }
-} 
index 6f5b0e20de2165a47e30cc34354bf7b4a136885a..e1a2f78c1d65380f749f5fcf8f969334ac5c6de2 100644 (file)
@@ -32,8 +32,8 @@ oboi = \notes \relative c' {
 
 clarinetti = \notes \relative c' {
 %   \property Staff.instrument = #`("Clarinetti in B" ,text-flat)
-  \property Staff.instrument   = #`(lines "2 Clarinetti" (rows "(B" ,raisedflat ")"))
-  \property Staff.instr                = #`(lines "Cl." (rows "(B" ,raisedflat ")"))
+  \property Staff.instrument   = #`(lines "2 Clarinetti" (columns "(B" ,raisedflat ")"))
+  \property Staff.instr                = #`(lines "Cl." (columns "(B" ,raisedflat ")"))
 
   c1 c
 }
@@ -45,8 +45,8 @@ fagotti = \notes \relative c' {
 }
 
 corni = \notes \relative c' {
-  \property Staff.instrument   = #`(lines "2 Corni" (rows "(E" ,raisedflat ")"))
-  \property Staff.instr                = #`(lines "Cor." (rows "(E" ,raisedflat ")"))
+  \property Staff.instrument   = #`(lines "2 Corni" (columns "(E" ,raisedflat ")"))
+  \property Staff.instr                = #`(lines "Cor." (columns "(E" ,raisedflat ")"))
 
   c1 c
 }
diff --git a/input/test/ct-jazz.ly b/input/test/ct-jazz.ly
new file mode 100644 (file)
index 0000000..f4c7771
--- /dev/null
@@ -0,0 +1,21 @@
+\header {
+  title="Chord Taxomony of LilyPond -- jazz"
+  subtitle="Amy's chord tests"
+}
+scheme = \chords {
+      c1
+      c:4
+      c:9
+      bes:9^7
+      c:11^7
+      c:9+
+      % TODO
+    }
+    
+\score {
+  <
+    \property ChordNames.ChordName \set #'style = #'jazz
+    \context ChordNames \scheme
+    \context Staff \notes \transpose c'' \scheme
+  >
+}
index c087742691136c959ebbbbbe37f8223d3b5c83ec..102c7f90b6a1b3a1fe28d297e3a01f2c0a633fef 100644 (file)
@@ -6,7 +6,7 @@
 
 
 % Scheme macros for accidentals. Note how they can be combined
-% with other strings, for example in: d^#`(rows ,sharp "4")
+% with other strings, for example in: d^#`(columns ,sharp "4")
 
 #(define sharp '((raise . 0.2) (music (named "accidentals-1"))))
 #(define natural '((raise . 0.2) (music (named "accidentals-0"))))
@@ -21,7 +21,7 @@
       fis4^"7 6" [g8 d] e4^"7 6" [f?8 c] |
       [d^#sharp d b g][c^"7" c^"5" a^"6" f] |
       [bes^"7" bes^"5" g^"6" e] a4^#sharp d^"6" ~ |
-      d^#`(rows ,sharp "4") c^"6" d e^#sharp |
+      d^#`(columns ,sharp "4") c^"6" d e^#sharp |
   }
 }
 
index ab20df77810bef2edc7cdc60ad23d6ddddf04373..621567dbad6e0c9f25033a80cde19cb00d0c8375 100644 (file)
 
                d-#'(lines "one" "two" "three")
                e-#'(lines (bold "one") 
-                 (rows "and" "there" "is" ((font-family . number) "2"))
+                 (columns "and" "there" "is" ((font-family . number) "2"))
                  (italic "three"))
                f-#'(finger "3")
                g-#'(music (named "noteheads-2" "flags-u3"))
-               b-#'(rows "a" (((kern . 3) (raise . 2)) "b") "c")
-               c-#'(rows "1" (((raise . -2) (kern . -1)) "2") "3")
+               b-#'(columns "a" (((kern . 3) (raise . 2)) "b") "c")
+               c-#'(columns "1" (((raise . -2) (kern . -1)) "2") "3")
 % }
                d-#'(lines "Violoncello" "    e" "Contrabasso")
                e-#'((lines (baselineskip . 0) (kern . 1.5)) "Violoncello" "    e" "Contrabasso")
index d20eb577c6cebd2ce9a97779209728139fc254ff..6439e82f12ea1caa33d1edf4a69edc2d7a2001f6 100644 (file)
 %
 % FIXME: put in an item, and typeset by an engraver.
 
-#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
-#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3")))))
-#(define dotted-eight-note `(rows ,eight-note (music "dots-dot")))
+#(define note '(columns (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
+#(define eight-note `(columns ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3")))))
+#(define dotted-eight-note `(columns ,eight-note (music "dots-dot")))
 
 \score {
   \notes\relative c'' {
-    a1^#`((rows (font-relative-size . -1)) ,dotted-eight-note " = 64")
+    a1^#`((columns (font-relative-size . -1)) ,dotted-eight-note " = 64")
   }
   \paper {
     linewidth = -1.
index ca51a9ea664e777937c9ff017affc1aaaeb86458..a6d71cc8e4886139495491cf7f6e58ab7335d889 100644 (file)
@@ -46,10 +46,10 @@ flautiStaff =  \notes \context VoiceCombineStaff = flauti <
 %  \property VoiceCombineStaff.instr = #"Fl."
 
   \property VoiceCombineStaff.instrument = #`((kern . 0.5) (lines
-    "2 Clarinetti" (rows "(B" ,text-flat ")")))
+    "2 Clarinetti" (columns "(B" ,text-flat ")")))
 
   \property VoiceCombineStaff.instr = #`((kern . 0.5) (lines
-    "Cl."  (rows "(B" ,text-flat ")")))
+    "Cl."  (columns "(B" ,text-flat ")")))
 
   %\global
   \context VoiceCombineVoice=one \partcombine VoiceCombineVoice
@@ -149,7 +149,7 @@ bassiGroup =  \context PianoStaff = bassi_group \notes <
 
     % Ugh, markup burps
     \property StaffCombineStaff.instrument = #'((kern . 0.5)
-    (lines "Violoncello" (rows "    e") (rows "Contrabasso")))
+    (lines "Violoncello" (columns "    e") (rows "Contrabasso")))
 
     \property StaffCombineStaff.instr = #"Vc."
     
diff --git a/input/test/super-sub.ly b/input/test/super-sub.ly
new file mode 100644 (file)
index 0000000..5d55806
--- /dev/null
@@ -0,0 +1,27 @@
+\header {
+texidoc="Test super/sub, raise and overstrike."
+}
+
+
+
+\score {
+  \notes \relative a'' {
+    c^#'("bar")
+    c^#'(("bar"))
+    c^#'((("bar")))
+    c^#'(bold "bar")
+    c^#'((bold) "bar")
+    c^#'(((bold)) "bar")
+    c^#'(bold ("bar"))
+    c^#'(bold "bar")
+    c^#'(columns "foe" ((raise . 3) "bar"))
+    c^#'(columns "foe" (((raise . 3) "bar")))
+    c^#'(columns "foe" (((raise . 3)) "bar"))
+    c^#'(columns "foe" (super "12") (sub "3 4"))
+    c^#'(columns "foe" (super (overstrike "o") "/") (sub "x"))
+    c^#'(columns "foe" (overstrike "o") "/")
+    c^#'(columns "foe" ((bold roman overstrike) "o") "/")
+    c^#'(columns "foe" ((extent . (0 . 0)) "o") "/")
+    c^#'(columns "foo" (super "bar" (super "baz")))
+  }
+}
\ No newline at end of file
index 24ccd550bcc0219adf5102bab09a2186c100c4f1..8937ff889b91bec9cd65193ec48fdaba10515fdd 100644 (file)
@@ -7,16 +7,16 @@
 
 \score{
   \notes\relative c''{
-    c'1^#'(rows (dynamic "p") " ma sosten.") 
+    c'1^#'(columns (dynamic "p") " ma sosten.") 
     c^#'(bold "ABCD")
-    c^#'(rows "Dal " (music "scripts-segno")) 
+    c^#'(columns "Dal " (music "scripts-segno")) 
     c^#'(Large "ABCD") 
     \break
     \property Voice . TextScript \override #'font-shape = #'upright
-    c1^#'(rows (dynamic "p") " ma sosten.")  
+    c1^#'(columns (dynamic "p") " ma sosten.")  
     c^#'(bold "ABCD")
     \property Voice . TextScript \override #'font-series = #'bold
-    c^#'(rows "Dal " (music "scripts-segno")) 
+    c^#'(columns "Dal " (music "scripts-segno")) 
     c^#'(Large "ABCD")
   }
 }
index 10c4939ffec33763efe1f111a1ce89aa77e6f7f9..397d6c02abd2a854ce4ea0b87a4895e731b25a9c 100644 (file)
@@ -1,41 +1,38 @@
 \version "1.3.146"
-\header{
-filename =     "title.ly"
-title =                "Title"
-subtitle =     "Subtitle"
-composer=      "Composer (xxxx-yyyy)"
-arranger =     "Arranger"
-copyright =    "public domain"
-enteredby =    "jcn"
-source =       "urtext"
-instrument=    "Instrument"
+\header {
+  filename =  "title.ly"
+  title = "Title"
+  subtitle = "Subtitle"
+  subsubtitle = "Subsubtitle"
+  composer = "Composer (xxxx-yyyy)"
+  arranger = "Arranger"
+  copyright = "public domain"
+  enteredby = "jcn"
+  source =  "urtext"
+  instrument = "Instrument"
 }
 
-
-
-\score{
-       \notes
-         \relative c'{
-               c' d e f f e d c \break
-               c d e f f e d c
-       }
-       \header{
-       opus =          "Opus 0"
-       piece =         "Piece I"
-       override="Overdriven"
-       }
+\score {
+  \context Staff \notes \relative c' {
+     \repeat unfold 10 {
+       c d e f f e d c \break
+       c d e f f e d c
+     }
+  }
+  \header {
+    opus = "Opus 0"
+    piece = "Piece I"
+  }
 }
 
-
-\score{
-       \notes
-       \relative c' {
-           f' e d c c d e f \break
-           f e d c c d e f
-       }
-       \header{ 
-       piece = "Piece II" 
-       opus =          "Opus 1"
-       }
+\score {
+  \notes \relative c' {
+     f e d c c d e f \break
+     f e d c c d e f
+  }
+  \header { 
+    opus = "Opus 1"
+    piece = "Piece II" 
+  }
 }
 
index 946dfb8601b2d1199fa2e08d57efa4494c4e43d1..ec69cb2771548395bc53cae3e7bb03971b3bfbd9 100644 (file)
@@ -92,7 +92,7 @@ praeludiumLeft =  \notes \relative c {
 fugaIIRight =  \notes   \relative c''   {
   \key e \major              % E-major
   \clef violin
-  \time3/4
+  \time 3/4
 
   %15
   \context Staff <
index db0e3b3938a9e122fb8b896506e9c0c79b8d8a5a..a5fe3ec333f63f8c18a0a9f14339fe485ed74717 100644 (file)
@@ -43,8 +43,8 @@
       >
       \context Staff = corni <
         \property Staff.midiInstrument = #"french horn"
-       \property Staff.instrument = #`(lines "Corno" (rows "(E" ,text-flat ")"))
-       \property Staff.instr = #`(lines "Cor."  (rows "(E" ,text-flat ")"))
+       \property Staff.instrument = #`(lines "Corno" (columns "(E" ,text-flat ")"))
+       \property Staff.instr = #`(lines "Cor."  (columns "(E" ,text-flat ")"))
        \property Staff.transposing = #3
        \notes \key bes \major
        \context Voice=one \corno
index c9cfc68f476b476cd409082b3db46254b942d575..24f8e47a5f3762e3cf0eecc125899c31725b2969 100644 (file)
@@ -141,11 +141,7 @@ textiii =  \lyrics{
                                %}
                        >
        >
-       \paper{
-               gourlay_maxmeasures = 14.0
-       }
-       \midi{ 
-               \tempo 4 = 120 
-       }
+       \paper{ }
+       \midi{ \tempo 4 = 120 }
 }
 
index f52b9f03875d22bde03f4fa5c0c066a61c1b492b..09d10282d7bad4ec99aa9d40c94b9edfd9145e7c 100644 (file)
@@ -59,7 +59,7 @@ A2_engraver::create_grobs ()
          announce_grob (text_p_, 0);
       
          Direction dir = UP;
-         SCM text;
+         SCM text = SCM_EOL;
          if (solo == SCM_BOOL_T)
            {
              state_ = SOLO;
index 764b633cc19aa77ee186564396672766ff3945c5..aa569951eaa63d986d837e8cd18a766d8ba70e56 100644 (file)
@@ -59,7 +59,7 @@ Adobe_font_metric::find_ascii_metric (int a , bool warn) const
 AFM_CharMetricInfo const *
 Adobe_font_metric::find_char_metric (String nm, bool warn) const
 {
-  map<String,int>::const_iterator ai = name_to_metric_dict_.find (nm);
+  std::map<String,int>::const_iterator ai = name_to_metric_dict_.find (nm);
   
   if (ai == name_to_metric_dict_.end ())
     {
index 0310b7c959388e9e616b925357e3836eed1879a4..6f6321af680df9f7fa860101ead0906474c358db 100644 (file)
 #include "axis-group-interface.hh"
 #include "paper-def.hh"
 
-/*
-  This callback is set in the children of the align element. It does
-  not compute anything, but a side effect of a->do_side_processing ()
-  is that the elements are placed correctly.  */
 MAKE_SCHEME_CALLBACK (Align_interface,alignment_callback,2);
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
index c8f57c20aad655e5cebb051a5d9d0163040d3493..4e00958060328f2c71cd7d0f6740141d9cb9822e 100644 (file)
@@ -20,7 +20,7 @@
   */
 struct Grob_info {
   Translator * origin_trans_l_;
-  friend Engraver;
+  friend class Engraver;
 public:
   Link_array<Translator> origin_trans_l_arr (Translator*) const; 
   Grob * elem_l_;
index a14c160839880c273a84be3b7beaab8690051ad8..fecff2483d6336cc66539bf7a06fbb4eddae999e 100644 (file)
@@ -65,6 +65,9 @@ void init_lily_guile ();
 
 bool isdir_b (SCM s);
 bool isaxis_b (SCM s);
+bool ly_number_pair_p (SCM);
+bool ly_axis_p (SCM);
+
 /*
   these conversion functions also do a typecheck on the argument, and
   return a default value if S has the wrong type.
@@ -88,7 +91,7 @@ void add_scm_init_func (void (*) ());
 
 typedef SCM (*Scheme_function_unknown) ();
 
-#if __GNUC_MINOR__ >= 96
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 96
 typedef SCM (*Scheme_function_0) ();
 typedef SCM (*Scheme_function_1) (SCM);
 typedef SCM (*Scheme_function_2) (SCM,SCM);     
index bf3e931892387c6772dc13058376f5858830932f..d85f19796d55a12908813b853e5b3ea019dce9f1 100644 (file)
@@ -38,7 +38,7 @@ extern File_path global_path;
 extern int score_count_global;
 extern Sources* source_global_l;
 
-class ostream;
+#include <iostream.h> /* gcc 3.0 */
 void print_lilypond_versions (ostream &os);
 
 #endif /* MAIN_HH */
index 7810f2063f1a7323ce1fe8e6c60c5f497c8961a3..2583bb56ab70feefda4595ec05ce88b5af4859ee 100644 (file)
@@ -35,14 +35,14 @@ public:
 
 Moment * unsmob_moment (SCM);
 
+#if 0
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
-IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + );
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * );
+IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + );
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - );
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % );
-
 INSTANTIATE_COMPARE (Moment const&, Rational::compare);
-
+#endif
 
 #endif /* MOMENT_HH */
 
index 939f6522a51eaccf63518ebe9dae708a90d87ffd..0864b408dd1f305600e593d5fa4f3fd11d1bab50 100644 (file)
@@ -33,9 +33,13 @@ private:
   void break_line ();
 };
 
-class ostream;
-#include <streambuf.h>
+#include <iostream.h> /* gcc 3.0 */
+#if __GNUC__ > 2
+ostream *open_file_stream (String filename,
+                          std::ios_base::openmode mode=std::ios::out);
+#else
 ostream *open_file_stream (String filename, int mode=ios::out);
+#endif
 void close_file_stream (ostream *os);
 
 
index 5215476963749460ed3201b81440538726e9c146..c2169f3fdb739d726f830038011be658ddb05c07 100644 (file)
@@ -25,7 +25,7 @@ struct SCM_less
   }
 };
 
-typedef map<SCM,SCM, SCM_less> Scm_stl_map;
+typedef std::map<SCM,SCM, SCM_less> Scm_stl_map;
 
 /**
    auto resizing hash table. 
index 7751f2b979bb0c468fd94194a1a73c18a0c1232d..01a2cf6c700edb794c01aa3ebb23eb20e235f842 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#include <iostream.h> /* gcc 3.0 */
 
 #include "score.hh"
 #include "lily-guile.hh"
index b93e7cb30f6c704bb56a8ca1ac06a8aa279d9a56..30ac299bf827fcffe1844d8739539b8019f02400 100644 (file)
@@ -228,7 +228,17 @@ ly_isdir_p (SCM s)
   return SCM_BOOL_F;
 }
 
+bool
+ly_number_pair_p (SCM p)
+{
+  return gh_pair_p (p) && gh_number_p (gh_car (p)) && gh_number_p (gh_cdr (p));
+}
 
+bool
+ly_axis_p (SCM a)
+{
+  return gh_number_p (a) && (gh_scm2int (a) == 0 || gh_scm2int (a) == 1); 
+}
 
 typedef void (*Void_fptr) ();
 Array<Void_fptr> *scm_init_funcs_;
index 513054c763f8a4fa61bfd2c3776038d24a419a23..703655df754a453718218a72649f450fe7233b86 100644 (file)
@@ -411,7 +411,8 @@ main (int argc, char **argv)
          export GUILE_MAX_SEGMENT_SIZE=576000
 
      may considerably decrease memory footprint (~*0.85), with a small
-     execution time penalty (~*1.10).  */
+     execution time penalty (~*1.10).  However, if this 15% gain in memory
+     usage prevents swapping, the execution time falls drastically. */
   
   sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304");
   sane_putenv ("GUILE_MAX_SEGMENT_SIZE", "8388608");
@@ -431,7 +432,7 @@ main (int argc, char **argv)
          {
            String s = oparser_p_static->optional_argument_ch_C_;
            Path p = split_path (s);
-           if (p.ext.empty_b ())
+           if (s != "-" && p.ext.empty_b ())
              p.ext = format_to_ext (output_format_global);
            output_name_global = p.str ();
          }
index a2e4d7d5d76a5bf7fa5428628e42c2d28a6dd6c6..b353f92dc7af742d5aef3c44f088d9cc05254f1e 100644 (file)
 Midi_stream::Midi_stream (String filename)
 {
   filename_str_ = filename;
+#if __GCC__ > 2
   os_p_ = open_file_stream (filename, ios::out|ios::bin);
+#else
+  os_p_ = open_file_stream (filename, ios::out|ios::binary);
+#endif
 }
 
 Midi_stream::~Midi_stream ()
index 5f1ced7f4975288518cf265a6b7d8a51b24909e8..7b440146acbe6de72bd7c1c232fe248f7d18fbec 100644 (file)
@@ -132,26 +132,12 @@ Molecule::add_at_edge (Axis a, Direction d, Molecule const &m, Real padding)
   add_molecule (toadd);
 }
 
-
-
-
-bool
-number_pair_p (SCM p)
-{
-  return gh_pair_p (p) && gh_number_p (gh_car (p)) && gh_number_p (gh_cdr (p));
-}
-
-bool
-axis_p (SCM a)
-{
-  return gh_number_p (a) && (gh_scm2int (a) == 0 || gh_scm2int (a) == 1); 
-}
-
+/* ly_?  Thought we had the ly_ prefix for wrapping/adding to gh_ */
 SCM
 Molecule::ly_set_molecule_extent_x (SCM mol, SCM axis, SCM np)
 {
   Molecule* m = unsmob_molecule (mol);
-  if (m && axis_p (axis) && number_pair_p (np))
+  if (m && ly_axis_p (axis) && ly_number_pair_p (np))
     {
       Interval iv = ly_scm2interval (np);
       m->dim_[Axis (gh_scm2int (axis))] = ly_scm2interval (np);
@@ -166,7 +152,7 @@ Molecule::ly_get_molecule_extent (SCM mol, SCM axis)
 {
   Molecule *m = unsmob_molecule (mol);
  
-  if (!m || !axis_p (axis))
+  if (!m || !ly_axis_p (axis))
     {
       warning ("ly-get-molecule-extent: invalid arguments");
       return ly_interval2scm (Interval (0,0));
@@ -185,7 +171,7 @@ Molecule::ly_molecule_combined_at_edge (SCM first, SCM axis, SCM direction,
   Molecule * m2 = unsmob_molecule (second);
   Molecule result;
   
-  if (!m1 || !m2 || !isdir_b (direction) || !axis_p (axis) || !gh_number_p (padding))
+  if (!m1 || !m2 || !isdir_b (direction) || !ly_axis_p (axis) || !gh_number_p (padding))
     {
       warning ("ly-combine-molecule-at-edge: invalid arguments");
       Molecule r;
index bd14326605244fe83fa218f1a771b58e4c709605..2615221615b801fe75b81e0a73b182ac64f721cd 100644 (file)
 #include "music-constructor.hh"
 typedef Music* (*Music_ctor) ();
 
-static map<String,Music_ctor> *ctors_map_;
+static std::map<String,Music_ctor> *ctors_map_;
 
 void
 add_music_ctor (String s,  Music_ctor c)
 {
   if (!ctors_map_)
-    ctors_map_ = new map<String, Music_ctor>;
+    ctors_map_ = new std::map<String, Music_ctor>;
   
  (*ctors_map_)[s] = c;
 }
index 8b805d15d452c121d12bb992767995669db97bc9..ba3c9ee11555880dc806fe16f87385f5a687d562 100644 (file)
 
 const int MAXLINELEN = 200;
 
+#if __GNUC__ > 2
+ostream *
+open_file_stream (String filename, std::ios_base::openmode mode)
+#else
 ostream *
 open_file_stream (String filename, int mode)
+#endif
 {
   ostream *os;
   if ((filename == "-"))
-    os = new ostream (cout._strbuf);
+    os = &cout;
   else
     {
       Path p = split_path (filename);
@@ -50,7 +55,8 @@ close_file_stream (ostream *os)
       warning (_ ("Error syncing file (disk full?)"));
       exit_status_global = 1;
     }
-  delete os;
+  if (os != &cout)
+    delete os;
   os = 0;
 }  
 
index 666f08c5759e6af61129b7aa9ff65fd2c1d27ed1..8b26f5ece06577277492eda00c38253de8e5fe49 100644 (file)
 #include "lily-guile.hh"
 #include "scm-option.hh"
 
-/*
-  TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
-  maar is dit nou wel handig voor gebruikert?
-
-  -X, of -fps is hendiger dan
 
-          -e "(set-lily-option 'midi-debug #t)'
+/*
+  This interface to option setting is meant for setting options are
+  useful to a limited audience. The reason for this interface is that
+  making command line options clutters up the command-line option name
+  space.
 
-  [niet voor niets tiepo in 139 announs..]
 
-*/
+  preferably, also dont use TESTING_LEVEL_GLOBAL, since it defeats
+  another purpose of this very versatile interface, which is to
+  support multiple debug/testing options concurrently.
+  
+ */
 
 
 /* Write midi as formatted ascii stream? */
 bool midi_debug_global_b;
+
 /* General purpose testing flag */
 int testing_level_global;
 
 
+
 /*
 
   TODO: verzin iets tegen optie code bloot
index bb99b6f236520a497f692337b32b31ffc3e6ce7b..3e17134db4e00bb0f8cfe56f9731e725758d9140 100644 (file)
@@ -38,15 +38,21 @@ Text_item::text2molecule (Grob *me, SCM text, SCM alist_chain)
 {
   if (gh_string_p (text))
     return string2molecule (me, text, alist_chain);
-
-  /*
-    ugh: gh_list_p () is linear.
-   */
-  
-  else if (gh_list_p (text) && text != SCM_EOL && text != SCM_UNDEFINED)
+  else if (gh_pair_p (text))
     {
+      /* urg, why not just do  this in markup_text2molecule ? */
       if (gh_string_p (gh_car (text)))
-       return string2molecule (me, gh_car (text), alist_chain);
+       return markup_text2molecule (me,
+                                    gh_append2 (gh_list (SCM_EOL,
+                                                        SCM_UNDEFINED),
+                                                text),
+                                    alist_chain);
+      /*
+       Allow (faulty) texts that are in an extra list:
+       #'(("foo"))
+       */
+      else if (scm_ilength (text) <= 1)
+       return text2molecule (me, gh_car (text), alist_chain);
       else
        return markup_text2molecule (me, text, alist_chain);
     }
@@ -130,12 +136,12 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
-  Axis axis = X_AXIS;
-
   /*
-    TODO:  change ALIGN into AXIS.
+    Line mode is default.
    */
-  SCM a = ly_assoc_chain (ly_symbol2scm ("align"), p);
+  Axis axis = X_AXIS;
+
+  SCM a = ly_assoc_chain (ly_symbol2scm ("axis"), p);
   if (gh_pair_p (a) && isaxis_b (gh_cdr (a)))
     axis = (Axis)gh_scm2int (gh_cdr (a));
 
@@ -155,29 +161,85 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
   if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
     raise = gh_scm2double (gh_cdr (r)) * staff_space;
 
-  Offset o (0, (axis == Y_AXIS ? - kern[axis] : 0) + raise);
-   
+  Interval extent;
+  bool extent_b = false;
+  SCM e = ly_assoc_chain (ly_symbol2scm ("extent"), p);
+  if (gh_pair_p (e) && ly_number_pair_p (gh_cdr (e)))
+    {
+      extent = Interval (gh_scm2double (gh_cadr (e)) * staff_space,
+                      gh_scm2double (gh_cddr (e)) * staff_space);
+      extent_b = true;
+    }
+
+  Offset o (0, (axis == Y_AXIS ? - kern[axis] : 0));
+
   Molecule mol;
   while (gh_pair_p (text))
     {
+   
       Molecule m = text2molecule (me, gh_car (text), p);
-      SCM m_p = SCM_EOL;
+
+      /*
+       TODO: look at padding?
+       
+       Look ahead here for kern and raise.
+
+       (cols "foo" ((raise . 1) "bar"))
+       (cols "foo" ((bold (raise . 1)) "bar"))
+
+       When constructing the molecule for bar, all normal extra
+       properties found, such as bold, are used for the construction
+       of bar's molecule.  But for kern or raise, it seems that we're
+       too late then, translating bar's molecule has no effect (or
+       maybe the effect of translating gets nullified when bar's
+       molecule is `added_to_edge' of the molecule for foo?)
+
+       So, while constructing foo's molecule, we look ahead for the
+       raise of bar.  The HEAD of the description of bar may be a
+       single property, or a list, so we must check that too.
+      */
+       
+      SCM next_p = SCM_EOL;
       if (gh_pair_p (gh_car (text)))
-       m_p = gh_cons (gh_call2 (f, sheet, gh_caar (text)), alist_chain);
-      SCM m_k = ly_assoc_chain (ly_symbol2scm ("kern"), m_p);
-      Real m_kern = kern[axis];
-      if (gh_pair_p (m_k) && gh_number_p (gh_cdr (m_k)))
-       m_kern = gh_scm2double (gh_cdr (m_k)) * staff_space;
+       next_p = gh_list (gh_call2 (f, sheet, gh_caar (text)), SCM_UNDEFINED);
+      SCM next_k = ly_assoc_chain (ly_symbol2scm ("kern"), next_p);
+      Real next_kern = kern[axis];
+      if (gh_pair_p (next_k) && gh_number_p (gh_cdr (next_k)))
+       next_kern = gh_scm2double (gh_cdr (next_k)) * staff_space;
+
+      SCM next_r = ly_assoc_chain (ly_symbol2scm ("raise"), next_p);
+      Real next_raise = 0;
+      if (gh_pair_p (next_r) && gh_number_p (gh_cdr (next_r)))
+       next_raise = gh_scm2double (gh_cdr (next_r)) * staff_space;
+
+      o[Y_AXIS] = next_raise;
 
       if (!m.empty_b ())
        {
          m.translate (o);
          if (axis == Y_AXIS && baseline_skip)
-           m_kern += baseline_skip - m.extent (Y_AXIS)[UP];
-         mol.add_at_edge (axis, axis == X_AXIS ? RIGHT : DOWN, m, m_kern);
+           next_kern += baseline_skip - m.extent (Y_AXIS)[UP];
+         mol.add_at_edge (axis, axis == X_AXIS ? RIGHT : DOWN, m, next_kern);
        }
       text = gh_cdr (text);
     }
+  
+  if (extent_b)
+    {
+#if 0
+      /* Hmm, we're not allowed to change a Molecule's extent? */
+      mol.dim_[axis] = extent;
+      Molecule::ly_set_molecule_extent_x (mol.self_scm (), gh_int2scm (axis),
+                                         gh_cdr (e));
+#else
+      // burp: unpredictable names, these...
+      Box b = mol.extent_box ();
+      SCM expr = mol.get_expr ();
+
+      b[axis] = extent;
+      mol = Molecule (b, expr);
+#endif
+       }  
   return mol;
 }
 
index 177004d0966e50677b5a2b1a809374b9814d4e9e..75da56aef65f078da01f6ec8f174969c93147c74 100644 (file)
@@ -249,6 +249,7 @@ Must be the car of an entry in `LilyPond-command-alist'."
   (LilyPond-command (LilyPond-command-query (LilyPond-master-file))
                    'LilyPond-master-file))
 
+;; FIXME, this is broken
 (defun LilyPond-region-file (begin end)
   (let (
        ;; (dir "/tmp/")
@@ -298,7 +299,12 @@ Must be the car of an entry in `LilyPond-command-alist'."
 (defun LilyPond-shell-process (name buffer command)
   (let ((old (current-buffer)))
     (switch-to-buffer-other-window buffer)
-    (goto-char (point-max))
+    ;; Hmm, if we goto the end of the buffer, we don't see
+    ;; the messages scroll by.  I don't know how to fix this,
+    ;; so let's emty the buffer, then
+    ;;(goto-char (point-max))
+    (erase-buffer)
+    (goto-char (point-min))
     (start-process-shell-command name buffer command)
     (switch-to-buffer-other-window old)))
   
index 2bdc143f30284c9d7b59dea269ef06fcc78d9403..41308cf08741d8a23e93335f29e861b2dc114675 100644 (file)
@@ -1,4 +1,49 @@
-\version "1.3.146"
+BABYL OPTIONS: -*- rmail -*-
+Version: 5
+Labels:
+Note:   This is the header of an rmail file.
+Note:   If you are seeing it in rmail,
+Note:    it means the file has no messages in it.
+\1f\f
+1,,
+Return-Path: rz@daimi.au.dk
+Delivery-Date: Fri, 13 Apr 2001 13:33:44 +0200
+Received: from localhost (localhost [127.0.0.1])
+       by appel.lilypond.org (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA02351
+       for <fred@localhost>; Fri, 13 Apr 2001 13:33:43 +0200
+X-XS4ALL-To: <jantien@xs4all.nl>
+Received: from pop.xs4all.nl
+       by localhost with POP3 (fetchmail-5.1.2)
+       for fred@localhost (single-drop); Fri, 13 Apr 2001 13:33:44 +0200 (CEST)
+Received: from smtp5.xs4all.nl (smtp5.xs4all.nl [194.109.6.49])
+       by maildrop7.xs4all.nl (8.11.1/8.11.1) with ESMTP id f3DBWCd93235
+       for <jantien@xs4all.nl>; Fri, 13 Apr 2001 13:32:12 +0200 (CEST)
+       (envelope-from rz@daimi.au.dk)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+       by smtp5.xs4all.nl (8.9.3/8.9.3) with ESMTP id NAA10302
+       for <jantien@xs4all.nl>; Fri, 13 Apr 2001 13:31:04 +0200 (CEST)
+Received: from nightcrawler.daimi.au.dk ([130.225.18.95])
+       by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+       id 14o1n2-0008Pp-00
+       for <janneke@gnu.org>; Fri, 13 Apr 2001 07:31:00 -0400
+Received: from daimi.au.dk (localhost [127.0.0.1])
+       by nightcrawler.daimi.au.dk (8.11.2/8.11.2) with ESMTP id f3DBUwX31324
+       for <janneke@gnu.org>; Fri, 13 Apr 2001 13:30:58 +0200
+Sender: rz@daimi.au.dk
+Message-ID: <3AD6E372.640DEE61@daimi.au.dk>
+Date: Fri, 13 Apr 2001 13:30:58 +0200
+From: Rune Zedeler <rz@daimi.au.dk>
+X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686)
+X-Accept-Language: en
+MIME-Version: 1.0
+To: Jan Nieuwenhuizen <janneke@gnu.org>
+Subject: german-chords
+Content-Type: multipart/mixed;
+ boundary="------------69CC07F348020448DD291CA8"
+X-UIDL: 987161532.maildrop7.93237
+
+*** EOOH ***
+\version "1.3.148"
 
 %  german-chords.ly:
 % german/norwegian/danish?
 
 #(define german-Bb #f)
 
-#(define (pitch->chord-name-text-banter pitch additions)
-   (if (equal? (cdr pitch) '(6 -1))
-     (if german-Bb
-       (cons "B" (accidental->text -1))
-       '("B")
-     )
+#(define (pitch->chord-name-text-banter pitch steps)
+   (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2)))
+                     (list 7 (+ (if german-Bb 0 1) (caddr pitch)))
+                     (cdr pitch)
+                )))
      (cons
-       (list-ref '("C" "D" "E" "F" "G" "A" "H") (cadr pitch))
-       (accidental->text (caddr pitch))
+       (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (car dopitch))
+       (accidental->text-super (cadr dopitch))
      )
    )
- )   
+ )
+
 
 
 #(define (pitch->note-name-text-banter pitch)
-   (if (equal? (cdr pitch) '(6 -1))
-     '("b")
-     (cons
+   (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2)))
+                    (list 7 (+ 1 (caddr pitch)))
+                    (cdr pitch)
+                )))
+     (list
        (string-append
-         (list-ref '("c" "d" "e" "f" "g" "a" "h") (cadr pitch))
-         (if (or (equal? (cadr pitch) 2) (equal? (cadr pitch) 5))
-           (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (caddr pitch)))
-           (list-ref '("eses" "es" "" "is" "isis") (+ 2 (caddr pitch)))
+         (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car dopitch))
+         (if (or (equal? (car dopitch) 2) (equal? (car dopitch) 5))
+           (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (cadr dopitch)))
+           (list-ref '("eses" "es" "" "is" "isis") (+ 2 (cadr dopitch)))
          )
        )
-       '()
      )
    )
  )
+
+\1f
\ No newline at end of file
index 92fdaa288c826e651310e20a1faa49531cac03ca..13bab53ff6bada530e5cbac9f123609fa8111841 100644 (file)
@@ -1,8 +1,16 @@
 \version "1.3.146"
 % JUNKME.
 
+%% deprecated
 papersizename = \papersize 
 
+% ly2dvi now uses `papersize' internally (and on cmd line)
+papersize = \papersize
+
+% FIXME
+% direct PostScript line height for single line staffs
+lineheight = 14
+
 paperfile = \papersize + ".ly"
 
 % paperfile = "a4.ly"
index 08a45a563270b10525dcd0f00f568c0746e122aa..ba96f088cab28fa4ab9086530a1d95eec8a8718c 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.148.uu1
-Entered-date: 13APR01
+Version: 1.3.149
+Entered-date: 17APR01
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.148.uu1.tar.gz 
+       1000k lilypond-1.3.149.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.148.uu1.tar.gz 
+       1000k lilypond-1.3.149.tar.gz 
 Copying-policy: GPL
 End
index 143d51408759659b0a2fa6ba6539ae7f5fa69321..fa05908bffcbccc8572b682aa43a7f47d9717d2b 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.3.148.uu1
+Version: 1.3.149
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.148.uu1.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.149.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
index d48b8739f0dda517179ea8c3d983d9de942f5671..9cc78171d8027b62e0a2cad7702aeb7c1ad97698 100644 (file)
@@ -23,6 +23,7 @@
 #include <libintl.h>
 #endif
 
+bool testing_level_global;
 
 // ugh
 String filename_str_g;
index f008fdef15fb357c489e66b7872416e3a14b72c1..d5c804ee8faae9f2b337a04f970fd45422fb95b4 100644 (file)
@@ -406,6 +406,7 @@ bassStaff =  \context Staff = bass<
 >
 
 grandStaff =  \context PianoStaff <
+
        \trebleStaff
        \bassStaff
 >
@@ -431,12 +432,13 @@ grandStaff =  \context PianoStaff <
                \grandStaff
        >
        \paper { 
-               \translator {
+%{             \translator {
                        \HaraKiriStaffContext
                        %VerticalExtent = #'(0 . 0)
                        %MinimumVerticalExtent = #'(0 . 0)
                        %StaffMinimumVerticalExtent = #'(0 . 0)
                }
+               %}
                \translator {
                        \LyricsContext
                        VerticalExtent = #'(1.2 . 1.2)
diff --git a/ports/mutopia/GruberFX/GNUmakefile b/ports/mutopia/GruberFX/GNUmakefile
new file mode 100644 (file)
index 0000000..aa36317
--- /dev/null
@@ -0,0 +1,3 @@
+ depth = ../../..
+ include $(depth)/ports/ports.make
index b5406ca0ac9089afe7a030e5ef7afe374e7b71d7..154fa206c0effa5275f6ca9deab6324ea1cc1d61 100644 (file)
@@ -1,6 +1,6 @@
 %!PS-Adobe-1.0: lily.ps 
 %
-%
+% Functions for direct and embedded PostScript
 
 % round cappings 
 1 setlinecap
        show
 } bind def
 
-% simple, but does it work everywhere?
-% explain ? --hwn
+% Simple, but does it work everywhere?
+% The filled circles are drawn by setting the linewidth
+% to 2*radius and drawing a point.  Is that (defined to be)
+% a nice filled circle?
 /draw_ez_ball % ch letter_col ball_col font
 {
        % font
index 5f9a9f145118a0386580036e29199b1c839c5902..d4994a0e0f5757fd8fdc0b80f78273f218b73fb9 100644 (file)
@@ -1,15 +1,41 @@
 %!PS-Adobe-1.0: lilyponddefs
+%
+% Functions for direct PostScript output
 
 % hmm
 % /setgray { 1 add } bind def
 
-/stafflinethickness  lilypondpaperstafflinethickness def
-/staffheight lilypondpaperstaffheight def
+/staff-line-thickness lilypondpaperstafflinethickness def
+/staff-height lilypondpaperstaffheight def
+/line-width lilypondpaperlinewidth def
+
+% FIXME: why isn't this set (by default) by lily?
+% /text-height lilypondpapertextheight def
+
+/output-scale lilypondpaperoutputscale def
+/paper-size { lilypondpaperpapersize } bind def
+
+% FIXME
+% urg, read from paper block
+% fixed base line skip value, for single line staffs
+/base-line-skip lilypondpaperlineheight def
+
+
+/init-paper {
+       gsave
+       .1 setlinewidth
+       clippath pathbbox newpath
+       /vsize exch def
+       /hsize exch def  pop pop pop
 
-/xoffset 30 def
-/yoffset 700 def
+       %FIXME:
+       %vsize text-height sub 2 div /top-margin exch def
+       144 2 div /top-margin exch def
+       hsize line-width sub 2 div /left-margin exch def
+       grestore
+} bind def
 
-/placebox
+/place-box
 {
        /object exch def
        gsave
@@ -24,7 +50,7 @@
 % FIXME.  translate to middle of box.
 %
 
-/draw_box % breapth width depth height
+/draw-box % breapth width depth height
 {
        /h exch def
        /d exch def
        grestore
 } bind def
 
-/start_line
+/start-line
 { 
+       line-y top-margin sub base-line-skip lt {
+               showpage
+               /line-y vsize top-margin sub def
+       } if
        gsave
-       xoffset yoffset translate
+       line-x line-y translate
 } bind def
 
-/stop_line
+/stop-line
 { 
-       /object exch def
-       0 0 moveto pathbbox exch pop sub exch pop
-       object
+       /the-line exch def
+       0 0 moveto the-line clippath pathbbox
+       stroke
        grestore
-       yoffset add /yoffset exch def
-       % urg...
-       yoffset lilypondpaperstaffheight 8 mul sub /yoffset exch def
+       exch 4 -1 roll
+       sub
+       3 1 roll
+       exch sub
+       %pstack
+       %
+       % ugh: now we should have `width height' on stack,
+       % but it's probably just the width and height of last element
+       % (the last staff)
+       % How do we get all heights of all staffs in a line?
+       %
+       % output-scale div neg line-y add /line-y exch def
+       %
+       % discarding height...
+       pop
+       %
+       % discard width
+       pop
+       % use fixed base-line-skip for now
+       line-y base-line-skip output-scale mul sub /line-y exch def
+} bind def
+
+% FIXME: font definitions should come from LilyPond
+%        built-in ps fonts are ugly
+/huge-bold-font {
+       /Times-Bold findfont 20.7 scalefont setfont
+} bind def
+
+/Large-bold-font {
+       /Times-Bold findfont 17.3 scalefont setfont
+} bind def
+
+/large-bold-font {
+       /Times-Bold findfont 14.4 scalefont setfont
+} bind def
+
+/large-font {
+       /Times-Roman findfont 14.4 scalefont setfont
+} bind def
+
+/large-smallcaps-font {
+       % urg
+       /Helvetica findfont 14.4 scalefont setfont
+} bind def
+
+/normal-font {
+       /Times-Roman findfont 12 scalefont setfont
+} bind def
+
+/footnote-font {
+       /Times-Roman findfont 10 scalefont setfont
+} bind def
+
+/get-text-dimensions % path .. width height
+{
+       dup true charpath pathbbox
+       newpath
+       line-x line-y moveto
+       exch 4 -1 roll
+       sub
+       3 1 roll
+       exch sub
+} bind def
+
+/set-centered
+{
+       line-x line-y moveto
+       get-text-dimensions
+       neg line-y add /line-y exch def
+       neg line-width add 2 div 0 rmoveto
+       show
+} bind def
+
+/set-left
+{
+       line-x line-y moveto
+       get-text-dimensions
+       neg line-y add /line-y exch def
+       pop
+       show
+} bind def
+
+/set-right
+{
+       line-x line-y moveto
+       get-text-dimensions
+       neg line-y add /line-y exch def
+       neg line-width add 0 rmoveto
+       show
+} bind def
+
+/make-lilypond-title
+{
+       currentdict /lilypondtitle known {
+               huge-bold-font lilypondtitle set-centered
+               line-y 5 sub /line-y exch def
+       } if
+       currentdict /lilypondsubtitle known {
+               Large-bold-font lilypondsubtitle set-centered
+               line-y 5 sub /line-y exch def
+       } if
+       currentdict /lilypondsubsubtitle known {
+               large-bold-font lilypondsubsubtitle set-centered
+       } if
+       currentdict /lilypondcomposer known {
+               large-smallcaps-font lilypondcomposer set-right
+       } if
+       currentdict /lilypondopus known {
+               normal-font lilypondopus set-right
+       } if
+       currentdict /lilypondarranger known {
+               normal-font lilypondarranger set-right
+       } if
+       currentdict /lilypondinstrument known {
+               large-font lilypondinstrument set-centered
+       } if
+       currentdict /lilypondpiece known {
+               large-smallcaps-font lilypondpiece set-left
+       } if
+} bind def
+
+/end-lilypond-output
+{
+       /line-y top-margin def
+       footnote-font lilypondtagline set-left
+       showpage
 } bind def
 
 /turnOnExperimentalFeatures { } bind def
 
-stafflinethickness setlinewidth
+
+staff-line-thickness setlinewidth
+
+paper-size
+
+staff-height init-paper
+
+/line-x left-margin def
+/line-y vsize top-margin sub def
+
+make-lilypond-title
 
 % see if we're there...
 % 10 setlinewidth 0 0 moveto 400 800 lineto stroke
index 7599ef7e339ea0e4dc4464dd4a7fcb69b6dea761..1e409e4bc7d39a3dbe47302e38d9d6213ae0a6e0 100644 (file)
 
 ;; TODO
 ;;
+;; * easier tweakability:
+;;    - split chord::names-alists up into logical bits,
+;;      such as chord::exceptions-delta, exceptions-oslash
+;;    - iso just the 'style parameter, use a list, eg:
+;;      \property ChordNames.ChordName \set
+;;        #'style = #'(jazz delta oslash german-tonic german-Bb)
+;;
 ;; * fix FIXMEs
+;;
 ;; * clean split/merge of bass/banter/american stuff
-;; * handy, documented hooks for user-override of:
-;;    - tonic (chord) name
-;;    - 
+;;
 ;; * doc strings
 
 (define chord::names-alist-banter '())
       chord::names-alist-banter))
 
 ;;;;;;;;;;
+(define simple-super
+;; duh, no docstrings for 
+;;  "No real superscript, just raised and small"
+  '((raise . 1) (font-relative-size . -1)))
 
-
-;; FIXME
-(define (accidental->text acc)
+(define (accidental->textp acc pos)
   (if (= acc 0)
       '()
-       (list '(music (font-relative-size . -2))
-            (string-append "accidentals-" (number->string acc)))))
+      (list '(music (font-relative-size . -2))
+                  (list pos (string-append "accidentals-" (number->string acc))))))
 
+(define (accidental->text acc) (accidental->textp acc 'columns))
 (define (accidental->text-super acc)
-  (if (= acc 0)
-      '()
-      (cons 'super (list (accidental->text acc)))))
-
-(define (accidental->text-sub acc)
-  (if (= acc 0)
-      '()
-      (cons sub (list accidental->text acc))))
-
-
-;; these look nice, but don't work together with current inner-name-jazz
-;; (inner-name-jazz is a bit broken: apply append etc)
-(define (xaccidental->textp acc pos)
-  (if (= acc 0)
-      '()
-       (list (list '(music (font-relative-size . -2))
-            (list pos (string-append "accidentals-" (number->string acc))))))
-)
-
-(define (xaccidental->text acc) (accidental->textp acc 'rows))
-(define (xaccidental->text-super acc) (accidental->textp acc 'super))
-(define (xaccidental->text-sub acc) (accidental->textp acc 'sub))
+  (accidental->textp acc '((raise . 0.6) (font-relative-size . -1))))
+(define (accidental->text-sub acc) (accidental->textp acc 'sub))
 
 (define (pitch->note-name pitch)
   (cons (cadr pitch) (caddr pitch)))
 
-;; FIXME: see german-chords.ly
 (define (pitch->text pitch)
-  (cons
-   (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 65)))
+  (text-append
+   (list
+    '(font-relative-size . 2)
+    (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 65))))
    (accidental->text-super (caddr pitch))))
 
 
          dirty
          '())))
 
-(define (chord::text-append l . r)
+(define (text-append l . r)
   (if (not (chord::text? r))
       l
       (if (not (chord::text? l))
          r
-         (cons l r))))
-  
+         (if (empty? (cdr r))
+             (list 'columns l (car r))
+             (text-append (list 'columns l (car r)) (cdr r))))))
+          
 (define (chord::step tonic pitch)
  (- (pitch::note-pitch pitch) (pitch::note-pitch tonic)))
 
                (modulo (+ i 6) 7)))))))))
 
 (define (chord::additions steps)
-  " Return:
+" Return:
    * any even step (2, 4, 6)
    * any uneven step that is chromatically altered,
      (where 7-- == -1, 7- == 0, 7 == +1)
    * highest step
 
-and you need also:
+?and jazz needs also:
 
    * TODO: any uneven step that's lower than an uneven step which is
      chromatically altered
@@ -277,25 +269,25 @@ and you need also:
 
 (define (chord::additions->text-banter additions subtractions)
   (if (pair? additions)
-      (cons (apply append
-                  (chord::text-cleanup
-                   (list
-                    (cons 'super (step->text-banter (car additions)))
-                    (if (or (pair? (cdr additions))
-                            (pair? subtractions))
-                        '(super "/")))))
-           (chord::additions->text-banter (cdr additions) subtractions))))
+      (text-append
+       (let ((step (step->text-banter (car additions))))
+        (if (or (pair? (cdr additions))
+                (pair? subtractions))
+            (text-append step "/")
+            step))
+      (chord::additions->text-banter (cdr additions) subtractions))
+  '()))
 
 (define (chord::subtractions->text-banter subtractions)         
   (if (pair? subtractions)
-      (cons (apply append
-                  (chord::text-cleanup
-                   (list
-                    '(super "no")
-                    (cons 'super (step->text-banter (car subtractions)))
-                    (if (pair? (cdr subtractions))
-                        '(super "/")))))
-           (chord::subtractions->text-banter (cdr subtractions)))))
+      (text-append
+       '("no")
+       (let ((step (step->text-jazz (car subtractions))))
+        (if (pair? (cdr subtractions))
+                       (text-append step "/")
+                       step))
+       (chord::subtractions->text-banter (cdr subtractions)))
+      '()))
 
 (define (chord::bass-and-inversion->text-banter bass-and-inversion)
   (if (and (pair? bass-and-inversion)
@@ -322,15 +314,14 @@ and you need also:
        (sep-text (if (and (string-match "super" (format "~s" exception-part))
                            (or (pair? additions)
                                (pair? subtractions)))
-                      '((super "/"))))
+                      (list simple-super "/")))
        (adds-text (chord::additions->text-banter additions subtractions))
        (subs-text (chord::subtractions->text-banter subtractions))
        (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion)))
-    (apply append
-          (map chord::text-cleanup
-               (list
-                '(rows) tonic-text except-text sep-text adds-text subs-text
-                b+i-text)))))
+    (text-append
+     tonic-text except-text sep-text
+     (list (list simple-super) adds-text subs-text)
+     b+i-text)))
 
 (define (chord::name-banter tonic exception-part unmatched-steps
                            bass-and-inversion steps)
@@ -432,8 +423,6 @@ and you need also:
                    '())))
     (chord::name->text style (car pitches) steps bass-and-inversion)))
 
-
-
 ;;;
 ;;; American style
 ;;;
@@ -476,13 +465,12 @@ and you need also:
         (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . ("m(maj7)"))
         ;jazz: the delta, see jazz-chords.ly
         ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((font-family . math) "N"))
-        ;; ugh, kludge slashed o
-        ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o
+        ;; slashed o
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (columns (super (overstrike "o") "/") "7"))
 
         (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
-        (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
-        (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
+        (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (columns "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
+        (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (columns "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
         (((0 . 0) (3 . 0) (4 . 0) (6 . -1)) . ("7sus4"))
         ;; Common ninth chords
         (((0 . 0) (2 . 0) (4 . 0) (5 . 0) (1 . 0)) . ("6/9")) ;; we don't want the '/no7'
@@ -524,7 +512,7 @@ and you need also:
 ;;
 ;; This is getting out-of hand?  Only exceptional chord names that
 ;; cannot be generated should be here.
-;; Maybe we should have inner-jazz-name and inner-american-name functions;
+;; Maybe we should have inner-name-jazz and inner-name-american functions;
 ;; 
 ;;       
 ;;
@@ -548,31 +536,31 @@ and you need also:
 
        ;; minor chords
        ; minor sixth chord = m6
-       (((0 . 0) (2 . -1) (4 . 0) (5 . 0)) . (rows("m")((raise . 0.5) "6")))
+       (((0 . 0) (2 . -1) (4 . 0) (5 . 0)) . (columns("m")((raise . 0.5) "6")))
        ;; minor major seventh chord = m triangle
        ;; shouldn't this be a filled black triange, like this:  ? --jcn
-       ;;(((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . (rows ("m") ((raise . 0.5)((font-family . math) "N"))))
-       (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . (rows ("m") ((raise . 0.5)((font-family . math) "M"))))
+       ;;(((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . (columns ("m") ((raise . 0.5)((font-family . math) "N"))))
+       (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . (columns ("m") ((raise . 0.5)((font-family . math) "M"))))
        ; minor seventh chord = m7
-       (((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . (rows("m")((raise . 0.5) "7")))
+       (((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . (columns("m")((raise . 0.5) "7")))
        ; minor sixth nine chord = m6/9
-       (((0 . 0) (2 . -1) (4 . 0) (5 . 0) (1 . 0)) . (rows("m")((raise . 0.5) "6/9")))
+       (((0 . 0) (2 . -1) (4 . 0) (5 . 0) (1 . 0)) . (columns("m")((raise . 0.5) "6/9")))
        ; minor with added nine chord = madd9
-       (((0 . 0) (2 . -1) (4 . 0) (1 . 0)) . (rows("m")((raise . 0.5) "add9")))
+       (((0 . 0) (2 . -1) (4 . 0) (1 . 0)) . (columns("m")((raise . 0.5) "add9")))
        ; minor ninth chord = m9
-       (((0 . 0) (2 . -1) (4 . 0) (6 . -1) (1 . 0)) . (rows("m")((raise . 0.5) "9")))
+       (((0 . 0) (2 . -1) (4 . 0) (6 . -1) (1 . 0)) . (columns("m")((raise . 0.5) "9")))
 
        ;; dominant chords
        ; dominant seventh = 7
        (((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . (((raise . 0.5) "7")))
        ; augmented dominant = +7
        ;(((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (((raise . 0.5) "+7"))) ; +7 with both raised
-       (((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (rows("+")((raise . 0.5) "7"))) ; +7 with 7 raised
-       ;(((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (rows((raise . 0.5) "7(")
+       (((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (columns("+")((raise . 0.5) "7"))) ; +7 with 7 raised
+       ;(((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (columns((raise . 0.5) "7(")
        ;       ((raise . 0.3)(music (named ("accidentals-1"))))
        ;       ((raise . 0.5) "5)"))); 7(#5)
        ; dominant flat 5 = 7(b5)
-       (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows((raise . 0.5) "7(")
+       (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (columns((raise . 0.5) "7(")
                ((raise . 0.3)(music (named ("accidentals--1"))))
                ((raise . 0.5) "5)")))
        ; dominant 9 = 7(9)
@@ -638,7 +626,7 @@ and you need also:
        ;; half diminshed chords
        ;; half diminished seventh chord = slashed o
        ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (((raise . 0.8) "/o")))
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (columns (super (overstrike "o") "/") "7")) ; slashed o
 
        ; half diminished seventh chord  with major 9 = slashed o cancelation 9
        (((0 . 0) (2 . -1) (4 . -1) (6 . -1) (1 . 0)) . (
@@ -652,44 +640,135 @@ and you need also:
       chord::names-alist-american))
 
 (define (step->text-alternate-jazz pitch)
-  (cons
+  (text-append
    (accidental->text (caddr pitch))
-   (list (number->string (+ (cadr pitch) (if (= (car pitch) 0) 1 8))))))
+   (number->string (+ (cadr pitch) (if (= (car pitch) 0) 1 8)))))
 
 (define (step->text-jazz pitch)
   (if (= (cadr pitch) 6)
       (case (caddr pitch)
        ;; sharp 7 only included for completeness?
-       ((-2) (cons (accidental->text -1) '("7")))
+       ((-2) (text-append (accidental->text -1) '("7")))
        ((-1) '("7"))
        ((0) '("maj7"))
-       ((1) (cons (accidental->text-super 1) '("7")))
-       ((2) (cons (accidental->text-super 2) '("7"))))
+       ((1) (text-append (accidental->text-super 1) '("7")))
+       ((2) (text-append (accidental->text-super 2) '("7"))))
       (step->text-alternate-jazz pitch)))
 
-(define (chord::additions->text-jazz additions subtractions)
+(define (xchord::additions->text-jazz additions subtractions)
   (if (pair? additions)
-      (cons (apply append
-                  (chord::text-cleanup
-                   (list
-                    (cons 'super (step->text-jazz (car additions)))
-                    (if (or (pair? (cdr additions))
-                            (pair? subtractions))
-                        '(super "/")))))
-           (chord::additions->text-jazz (cdr additions) subtractions))
-      '()))
+      (text-append
+       (let ((step (step->text-jazz (car additions))))
+        (if (or (pair? (cdr additions))
+                (pair? subtractions))
+            (text-append step "/")
+            step))
+      (chord::additions->text-jazz (cdr additions) subtractions))
+  '()))
+
+(define (chord::>5? x)
+  (or (> (car x) 0)
+      (> (cadr x) 4)))
+
+
+;; FIXME:
+;; Perhaps all logic like this should be done earlier,
+;; so that in this text-construction printing phase
+;; we can just blindly create text from all additions.
+;;
+;; This depends maybe on the fact of code sharing,
+;; in this layout, we can share the functions chord::additions
+;; and chord::subtractions with banter.
+(define (chord::additions->text-jazz additions subtractions)
+  (text-append
+   (chord::additions<=5->text-jazz (filter-out-list chord::>5? additions)
+                                  (filter-out-list chord::>5? subtractions))
+   (chord::additions>5->text-jazz (filter-list chord::>5? additions)
+                                 (filter-list chord::>5? subtractions))))
+
+;; FIXME
+(define (chord::additions<=5->text-jazz additions subtractions)
+  (let ((sus (chord::sus-four-jazz additions)))
+    (if (pair? sus)
+       (text-append '("sus") (step->text-jazz (car sus)))
+       '())))
+
+(define (chord::additions>5->text-jazz additions subtractions)
+  "
+Compose text of all additions
 
+  * if there's a subtraction:
+    - add `add'
+    - list all up to highest
+  * list all steps that are below an chromatically altered step
+  "
+  (text-append
+   (if (not (empty? subtractions)) "add" '())
+   (let ((radds (reverse additions)))
+     (reverse (chord::additions>5->text-jazz-helper
+              radds
+              subtractions
+              (if (or (empty? subtractions) (empty? radds))
+                  #f (car radds)))))))
+
+(define (chord::additions>5->text-jazz-helper additions subtractions list-step)
+  "
+Create texts for all additions
+If list-step != #f, list all steps down to 5
+If we encounter a chromatically altered step, turn on list-step
+"
+
+  (if list-step
+      (if (not (member list-step subtractions))
+         (if (> 5 (cadr list-step))
+             (cons (step->text-jazz list-step)
+                   (chord::additions>5->text-jazz-helper
+                    additions
+                    subtractions
+                    (chord::get-create-step additions
+                                            (- (cadr list-step) 2))))
+             (step->text-jazz list-step))
+         (chord::get-create-step additions (- (cadr list-step) 2)))
+      (if (pair? additions)
+         (let ((step (car additions)))
+           (cons (step->text-jazz step)
+                 (chord::additions>5->text-jazz-helper
+                  (cdr additions)
+                  subtractions
+                  (if (or (and (!= 6 (cadr step)) (!= 0 (caddr step)))
+                          (and (= 6 (cadr step)) (!= -1 (caddr step))))
+                      (chord::get-create-step additions (- (cadr step) 2))
+                      #f))))
+         '())))
+
+(define (chord::sus-four-jazz chord-pitches)
+  "List of pitches that are step 2 or step 4"
+  (filter-list (lambda (x)
+                (and (= 0 (car x))
+                     (or (= 1 (cadr x)) (= 3 (cadr x))))) chord-pitches))
+
+(define (chord::get-create-step steps n)
+  (let* ((i (if (< n 0) (+ n 7) n))
+        (found (filter-list (lambda (x) (= i (cadr x))) steps)))
+    (if (empty? found)
+       (if (!= i 6)
+           (list 0 i 0)
+           (list 0 6 -1))
+       (car found))))
+  
 (define (chord::subtractions->text-jazz subtractions)   
   (if (pair? subtractions)
-      (cons (apply append
-                  (chord::text-cleanup
-                   (list
-                    '(super "omit")
-                    (cons 'super (step->text-jazz (car subtractions)))
-                    (if (pair? (cdr subtractions))
-                        '(super "/")))))
-           (chord::subtractions->text-jazz (cdr subtractions)))
-       '()))
+      (text-append
+       (if (= 5 (cadr (car subtractions)))
+          (text-append
+           '("omit")
+           (let ((step (step->text-jazz (car subtractions))))
+             (if (pair? (cdr subtractions))
+                 (text-append step "/")
+                 step)))
+          '())
+       (chord::subtractions->text-jazz (cdr subtractions)))
+      '()))
 
 
 ;; TODO: maybe merge with inner-name-banter
@@ -697,23 +776,19 @@ and you need also:
 ;; additions, subtractions and bass or inversion into chord name
 (define (chord::inner-name-jazz tonic exception-part additions subtractions
                                  bass-and-inversion steps)
-
-  ;; ugh
-  (apply
-   append
-   
-   (chord::text-cleanup
-    (list '(rows)
-         (pitch->chord-name-text-banter tonic steps)
-         exception-part
-         ;; why does list->string not work, format seems only hope...
-         (if (and (string-match "super" (format "~s" exception-part))
-                  (or (pair? additions)
-                      (pair? subtractions)))
-             '((super "/")))
-         (chord::additions->text-jazz additions subtractions)
-         (chord::subtractions->text-jazz subtractions)
-         (chord::bass-and-inversion->text-banter bass-and-inversion)))))
+    (text-append
+     (pitch->chord-name-text-banter tonic steps)
+     exception-part
+     ;; why does list->string not work, format seems only hope...
+     (if (and (string-match "super" (format "~s" exception-part))
+             (or (pair? additions)
+                 (pair? subtractions)))
+        (list simple-super "/"))
+     
+     (list `(,simple-super)
+          (chord::additions->text-jazz additions subtractions)
+          (chord::subtractions->text-jazz subtractions))
+     (chord::bass-and-inversion->text-banter bass-and-inversion)))
 
 ;; Jazz style--basically similar to american with minor changes
 ;;
index 8f456711cb70803794da56b5d55e83edc7f9f188..084a5039bf7a0ef1cbe05fd93d1d2a62565462fe 100644 (file)
     (properties-to-font .
                        ,Font_interface::properties_to_font_name)
 
-    ;; FIXME: this is a not-so-cool idea to use ALIGN
-    ;; RAISE, LOOKUP, since they are not proper elt-properties,
-    ;; and might interfere with them.
     (markup-to-properties . ,markup-to-properties)
     (abbreviation-alist
-     . ((rows . ((align . 0)))
-       (lines . ((align . 1)))
+     . ((columns . ((axis . 0)))
+       (lines . ((axis . 1)))
        (roman . ((font-family . roman)))
        (music . ((font-family . music) (lookup . name)))
        (finger . ((font-style . finger)))
        (upright . ((font-shape . upright)))
        (italic . ((font-shape . italic)))
        (named . ((lookup . name)))
-       (super . ((raise . 1) (font-relative-size . -1)))
-       (sub . ((raise . -1) (font-relative-size . -1)))
+       (overstrike . ((extent . (0 . 0))))
+       (super . ((raise . 1) (font-relative-size . -1) (extent . (0 . 0))))
+       (sub . ((raise . -1) (font-relative-size . -1) (extent . (0 . 0))))
        (text . ((lookup . value)))
        )
      )
@@ -330,7 +328,14 @@ and warn if the selected font is not unique.
   ;; (display "'\n")
   
   (if (pair? markup)
-      (if (and (symbol? (car markup)) (not (pair? (cdr markup))))
+      ;; This is hairy.  We want to allow:
+      ;;    ((foo bar) "text")
+      ;;    ((foo (bar . 1)) "text")
+      ;;    ((foo . (0 . 1))) 
+      
+      (if (and (symbol? (car markup))
+              (or (not (pair? (cdr markup)))
+                  (number? (cadr markup))))
          (if (equal? '() (cdr markup))
              (markup-to-properties sheet (car markup))
              (list markup))
index 223ab005841f664b9c2869790e989f3d579c281a..c84eb680ea11f2eb7d4ee2e8cfb2be2fe4daa3df 100644 (file)
@@ -286,21 +286,21 @@ text: string | (head? text+)
 head: markup | (markup+)
 markup-item: property | abbrev
 property: (@var{key} . @var{value})
-abbrev: @code{rows lines roman music bold italic named super sub text}
+abbrev: @code{columns lines roman music bold italic named super sub overstrike text}
         @code{finger volta timesig mmrest mark script large Large dynamic}
 @end example
 
 
 The following abbreviations are currently defined:
 @table @samp
-@item rows
-horizontal mode: set all text on one line (default)
+@item columns
+ horizontal mode: set all text on one line (default)
 @item lines
  vertical mode: set every text on new line
 @item roman
  select roman font
 @item music
- select feta font
+ select feta font, and lookup by character name
 @item bold
  select bold series
 @item italic
@@ -313,6 +313,8 @@ horizontal mode: set all text on one line (default)
  superscript
 @item sub
  subscript
+@item overstrike
+ the next text or character overstrikes this one
 @item finger
  select fingering number fontstyle
 @item volta
index 75f2ab04e5fb8470353b09c1e022aa42a131a25b..ecf2171ffc5e3fe50551dded44885cdf459e7986 100644 (file)
            (cons (car list)  rest)
            rest))))
 
+(define (filter-out-list pred? list)
+  "return that part of LIST for which PRED is true."
+  (if (null? list) '()
+      (let* ((rest  (filter-list pred? (cdr list))))
+       (if (not (pred?  (car list)))
+           (cons (car list)  rest)
+           rest))))
+
 (define (uniqued-alist  alist acc)
   (if (null? alist) acc
       (if (assoc (caar alist) acc)
index 0f8011bf6d858406ca0f47f7f9a363c417352bb0..70a115d8c63b856d98fa44093fd1ea51ceeda823 100644 (file)
     " draw_repeat_slash"))
   
   (define (end-output)
-    "\nshowpage\n")
+    "\nend-lilypond-output\n")
   
   (define (experimental-on) "")
   
   (define (filledbox breapth width depth height) 
     (string-append (numbers->string (list breapth width depth height))
-                  " draw_box" ))
+                  " draw-box" ))
 
   ;; obsolete?
   (define (font-def i s)
 
   (define (placebox x y s) 
     (string-append 
-     (ly-number->string x) " " (ly-number->string y) " {" s "} placebox\n"))
+     (ly-number->string x) " " (ly-number->string y) " {" s "} place-box\n"))
 
   (define (bezier-sandwich l thick)
     (string-append 
      " draw_bezier_sandwich"))
 
   (define (start-line height)
-         "\nstart_line {
+         "\nstart-line {
 lilypondpaperoutputscale lilypondpaperoutputscale scale
 ")
   
   (define (stem breapth width depth height) 
     (string-append (numbers->string (list breapth width depth height))
-                  " draw_box" ))
+                  " draw-box" ))
 
   (define (stop-line)
-      "}\nstop_line\n")
+      "}\nstop-line\n")
 
   (define (text s)
     (string-append "(" s ") show  "))
index 7d35e1539f24e7138f7fe5b8996f1b9274623cf6..b0f0dd6a9d3ab203dca83310f13e141b33cb5773 100644 (file)
@@ -818,6 +818,13 @@ if 1:
                return str
        conversions.append (((1,3,147), conv, 'default-neutral-direction -> neutral-direction'))
 
+if 1:
+       def conv (str):
+               str = re.sub ('\(align', '(axis', str)
+               str = re.sub ('\(row', '(columns', str)
+               return str
+       conversions.append (((1,3,148), conv, '(align -> (axis, (row -> columns'))
+
 
 ################################
 #      END OF CONVERSIONS      
index 28e01f1a12b504531a9197026b68436d79600cc0..e0a2d5d0014c68b5d940f6546657574d3574a19e 100644 (file)
@@ -495,7 +495,6 @@ def bounding_box_dimensions(fname):
        else:
                return (0,0)
 
-
 def error (str):
        sys.stderr.write (str + "\n  Exiting ... \n\n")
        raise 'Exiting.'
@@ -980,7 +979,12 @@ def compile_all_files (chunks):
        for g in png:
                cmd = r"""gs -sDEVICE=pgm  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=- -r90 -dNOPAUSE %s -c quit | pnmcrop | pnmtopng > %s"""
                cmd = cmd % (g + '.eps', g + '.png')
-               system (cmd)
+               try:
+                       status = system (cmd)
+               except:
+                       os.unlink (g + '.png')
+                       error ("Removing output file")
+               
        os.chdir (d)
 
 
index 56a0450df1c4f31b3ead5f1637cefa34ca0b568b..26f7bd263545c309d9380a982347985c9f8ac442 100644 (file)
@@ -99,7 +99,7 @@ include_path = ['.']
 lily_p = 1
 paper_p = 1
 
-output = 0
+output_name = ''
 targets = {
        'DVI' : 0,
        'LATEX' : 0,
@@ -120,7 +120,7 @@ dependency_files = []
 
 program_version = '@TOPLEVEL_VERSION@'
 if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
-       program_version = '1.3.142'
+       program_version = '1.3.148'
 
 
 original_dir = os.getcwd ()
@@ -177,6 +177,18 @@ def warning (s):
        progress (_ ("warning: ") + s)
                
 def error (s):
+
+
+       """Report the error S.  Exit by raising an exception. Please
+       do not abuse by trying to catch this error. If you donn't want
+       a stack trace, write to the output directly.
+
+       RETURN VALUE
+
+       None
+       
+       """
+       
        progress (_ ("error: ") + s)
        raise _ ("Exiting ... ")
 
@@ -236,17 +248,18 @@ def options_help_str (opts):
        return str
 
 def help ():
-       sys.stdout.write (_ ("Usage: %s [OPTION]... FILE") % program_name)
-       sys.stdout.write ('\n\n')
-       sys.stdout.write (help_summary)
-       sys.stdout.write ('\n\n')
-       sys.stdout.write (_ ("Options:"))
-       sys.stdout.write ('\n')
-       sys.stdout.write (options_help_str (option_definitions))
-       sys.stdout.write ('\n\n')
-       sys.stdout.write (_ ("Report bugs to %s") % 'bug-gnu-music@gnu.org')
-       sys.stdout.write ('\n')
-
+       ls = [(_ ("Usage: %s [OPTION]... FILE") % program_name),
+               ('\n\n'),
+               (help_summary),
+               ('\n\n'),
+               (_ ("Options:")),
+               ('\n'),
+               (options_help_str (option_definitions)),
+               ('\n\n'),
+               (_ ("Report bugs to %s") % 'bug-gnu-music@gnu.org'),
+               ('\n')]
+       map (sys.stdout.write, ls)
+       
 def setup_temp ():
        global temp_dir
        if not keep_temp_dir_p:
@@ -259,6 +272,13 @@ def setup_temp ():
 
 
 def system (cmd, ignore_error = 0):
+       """Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero.
+
+       RETURN VALUE
+
+       Exit status of CMD
+       """
+       
        if verbose_p:
                progress (_ ("Invoking `%s\'") % cmd)
        st = os.system (cmd) >> 8
@@ -280,6 +300,7 @@ def cleanup_temp ():
                shutil.rmtree (temp_dir)
 
 
+#what a name.
 def set_setting (dict, key, val):
        try:
                val = string.atof (val)
@@ -293,6 +314,7 @@ def set_setting (dict, key, val):
                warning (_ ("no such setting: %s") % `key`)
                dict[key] = [val]
 
+
 def strip_extension (f, ext):
        (p, e) = os.path.splitext (f)
        if e == ext:
@@ -318,7 +340,8 @@ option_definitions = [
        ]
 
 def run_lilypond (files, outbase, dep_prefix):
-       opts = '--output=%s.tex' % outbase
+       opts = ''
+#      opts = opts + '--output=%s.tex' % outbase
        opts = opts + ' ' + string.join (map (lambda x : '-I ' + x,
                                              include_path))
        if paper_p:
@@ -359,6 +382,11 @@ def analyse_lilypond_output (filename, extra):
                        set_setting (extra, x, m.group (1))
 
 def find_tex_files_for_base (base, extra):
+
+       """
+       Find the \header fields dumped from BASE.
+       """
+       
        headerfiles = {}
        for f in layout_fields:
                if os.path.exists (base + '.' + f):
@@ -375,6 +403,11 @@ def find_tex_files_for_base (base, extra):
         
 
 def find_tex_files (files, extra):
+       """
+       Find all .tex files whose prefixes start with some name in FILES. 
+
+       """
+       
        tfiles = []
        
        for f in files:
@@ -393,7 +426,8 @@ def find_tex_files (files, extra):
 
                        x = x + 1
        if not x:
-               warning (_ ("no lilypond output found for %s") % `files`)
+               fstr = string.join (files, ', ')
+               warning (_ ("no lilypond output found for %s") % fstr)
        return tfiles
 
 def one_latex_definition (defn, first):
@@ -421,9 +455,9 @@ ly_paper_to_latexpaper =  {
 }
 
 def global_latex_definition (tfiles, extra):
-       '''construct preamble from EXTRA,
-       dump lily output files after that, and return result.
-       '''
+
+       '''construct preamble from EXTRA, dump Latex stuff for each
+lily output file in TFILES after that, and return the Latex file constructed.  '''
 
 
        s = ""
@@ -434,13 +468,13 @@ def global_latex_definition (tfiles, extra):
        if extra['papersize']:
                try:
                        options = '%s' % ly_paper_to_latexpaper[extra['papersize'][0]]
-               except:
+               except KeyError:
                        warning (_ ("invalid value: %s") % `extra['papersize'][0]`)
                        pass
 
        if extra['latexoptions']:
                options = options + ',' + extra['latexoptions'][-1]
-       
+
        s = s + '\\documentclass[%s]{article}\n' % options
 
        if extra['language']:
@@ -471,7 +505,7 @@ def global_latex_definition (tfiles, extra):
 
        if extra['latexoptions']:
                s = s + '\geometry{twosideshift=4mm}\n'
-               
+
        s = s + r'''
 \usepackage[latin1]{inputenc}
 \input{titledefs}
@@ -482,10 +516,8 @@ def global_latex_definition (tfiles, extra):
        
        if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no':
                s = s + r'''
-\renewcommand{\@evenhead}{\parbox{\textwidth}%
-    {\mbox{}\textbf{\thepage}\hfill\small\theheader}}
-\renewcommand{\@oddhead}{\parbox{\textwidth}%
-    {\mbox{}\small\theheader\hfill\textbf{\thepage}}}
+\renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
+\renewcommand{\@oddhead}{\hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
 '''
        else:
                s = s + '\\pagestyle{empty}\n'
@@ -511,17 +543,28 @@ def global_latex_definition (tfiles, extra):
        return s
 
 def run_latex (files, outbase, extra):
-       wfs = find_tex_files ([outbase] + files[1:], extra)
+
+       """Construct latex file, for FILES and EXTRA, dump it into
+OUTBASE.latex. Run LaTeX on it.
+
+RETURN VALUE
+
+None
+       """
+       latex_fn = outbase + '.latex'
+       
+       wfs = find_tex_files (files, extra)
        s = global_latex_definition (wfs, extra)
 
-       f = open (outbase + '.latex', 'w')
+       f = open (latex_fn, 'w')
        f.write (s)
        f.close ()
 
         if ( os.name == 'posix' ):
-               cmd = 'latex \\\\nonstopmode \\\\input %s' % outbase + '.latex'
+               cmd = 'latex \\\\nonstopmode \\\\input %s' % latex_fn
        else:
-               cmd = 'latex \\nonstopmode \\input %s' % outbase + '.latex'
+               cmd = 'latex \\nonstopmode \\input %s' % latex_fn
+
        if not verbose_p:
                progress ( _("Running %s...") % 'LaTeX')
                cmd = cmd + ' 1> /dev/null 2> /dev/null'
@@ -530,6 +573,14 @@ def run_latex (files, outbase, extra):
 
 def run_dvips (outbase, extra):
 
+
+       """Run dvips using the correct options taken from EXTRA,
+leaving a PS file in OUTBASE.ps
+
+RETURN VALUE
+
+None.
+"""
        opts = ''
        if extra['papersize']:
                opts = opts + ' -t%s' % extra['papersize'][0]
@@ -566,7 +617,8 @@ def generate_dependency_file (depfile, outname):
 (sh, long) = getopt_args (__main__.option_definitions)
 try:
        (options, files) = getopt.getopt(sys.argv[1:], sh, long)
-except:
+except getopt.error, s: 
+       errorport.write ("\nerror: getopt says `%s\'\n\n" % s)
        help ()
        sys.exit (2)
        
@@ -592,7 +644,7 @@ for opt in options:
                targets['MIDI'] = 0
                paper_p = 0
        elif o == '--output' or o == '-o':
-               output = a
+               output_name = a
        elif o == '--set' or o == '-s':
                ss = string.split (a, '=')
                set_setting (extra_init, ss[0], ss[1])
@@ -604,10 +656,10 @@ for opt in options:
                identify ()
                sys.exit (0)
        elif o == '--warranty' or o == '-w':
-               try:
-                       system ('lilypond -w')
-               except:
+               status = system ('lilypond -w', ignore_error = 1)
+               if status:
                        warranty ()
+
                sys.exit (0)
 
 
@@ -640,27 +692,27 @@ def mkdir_p (dir, mode=0777):
 
 include_path = map (abspath, include_path)
 
-original_output = output
+original_output = output_name
 
 if files and files[0] != '-':
 
        files = map (lambda x: strip_extension (x, '.ly'), files)
 
-       if not output:
-               output = os.path.basename (files[0])
+       if not output_name:
+               output_name = os.path.basename (files[0])
 
        for i in ('.dvi', '.latex', '.ly', '.ps', '.tex'):
-               output = strip_extension (output, i)
+               output_name = strip_extension (output_name, i)
 
        files = map (abspath, files) 
 
-       if os.path.dirname (output) != '.':
-               dep_prefix = os.path.dirname (output)
+       if os.path.dirname (output_name) != '.':
+               dep_prefix = os.path.dirname (output_name)
        else:
                dep_prefix = 0
 
-       reldir = os.path.dirname (output)
-       (outdir, outbase) = os.path.split (abspath (output))
+       reldir = os.path.dirname (output_name)
+       (outdir, outbase) = os.path.split (abspath (output_name))
        
        setup_environment ()
        setup_temp ()
@@ -668,33 +720,33 @@ if files and files[0] != '-':
        extra = extra_init
        
        if lily_p:
-               try:
+##             try:
                        run_lilypond (files, outbase, dep_prefix)
-               except:
-                       # TODO: friendly message about LilyPond setup/failing?
-                       #
-                       # TODO: lilypond should fail with different
-                       # error codes for:
-                       #   - guile setup/startup failure
-                       #   - font setup failure
-                       #   - init.ly setup failure
-                       #   - parse error in .ly
-                       #   - unexpected: assert/core dump
-                       targets = {}
+## #           except:
+##                     # TODO: friendly message about LilyPond setup/failing?
+##                     #
+##                     # TODO: lilypond should fail with different
+##                     # error codes for:
+##                     #   - guile setup/startup failure
+##                     #   - font setup failure
+##                     #   - init.ly setup failure
+##                     #   - parse error in .ly
+##                     #   - unexpected: assert/core dump
+## #                   targets = {}
 
        if targets.has_key ('DVI') or targets.has_key ('PS'):
-               try:
+#              try:
                        run_latex (files, outbase, extra)
                        # unless: add --tex, or --latex?
                        del targets['TEX']
                        del targets['LATEX']
-               except:
-                       # TODO: friendly message about TeX/LaTeX setup,
-                       # trying to run tex/latex by hand
-                       if targets.has_key ('DVI'):
-                               del targets['DVI']
-                       if targets.has_key ('PS'):
-                               del targets['PS']
+#              except Foobar:
+#                      # TODO: friendly message about TeX/LaTeX setup,
+#                      # trying to run tex/latex by hand
+#                      if targets.has_key ('DVI'):
+#                              del targets['DVI']
+#                      if targets.has_key ('PS'):
+#                              del targets['PS']
 
        # TODO: does dvips ever fail?
        if targets.has_key ('PS'):
@@ -728,11 +780,7 @@ if files and files[0] != '-':
 else:
        # FIXME
        help ()
-       progress ('\n')
-       try:
-               error (_ ("no FILEs specified, can't invoke as filter"))
-       except:
-               pass
+       errorport.write ("ly2dvi: error: " + _ ("no files specified on command line.\n"))
        sys.exit (2)
 
 
index 49b6c8170eb066bd3e51ca801938c5ce8f0a4504..a5656196aeeb736e7ab6e0c7809869548234b001 100644 (file)
@@ -9,21 +9,26 @@
 
 '''
 TODO:
+
+    * use urllib iso ftplib
+
     * more flexible build/ftp/patches/releases paths
-    * flexible build command
-    * show only?
+
+    
+    show only: --command='echo "latest is: %n-%v"'
 '''
 
-import os
+import ftplib
 import fnmatch
+import getopt
+import re
+import operator
+import os
+import tempfile
 import stat
 import string
-import re
-import getopt
 import sys
 import __main__
-import operator
-import tempfile
 
 try:
        import gettext
@@ -262,29 +267,22 @@ def list_file (user, passwd, host, dir, file):
 
 list_ = list_file
 
-#
-# ugh: use ftp module.
-#
 def list_ftp (user, passwd, host, dir, file):
        if user == 'None':
                user = 'anonymous'
        if passwd == 'None':
                passwd = program_name
 
-       command = '''
-open -u%s,%s -p21 %s
-set passive-mode off
-cd "%s"
-ls -1 "%s"
-''' % (user, passwd, host, dir, file)
-       temp = tempfile.mktemp (program_name)
-       f = open (temp, 'w')
-       f.write (command)
-       f.close ()
-       p = os.popen ('lftp -f %s' % temp, 'r')
-       s = p.read ()
-       status = p.close ()
-       return string.split (s[:-1], '\n')
+       ftp = ftplib.FTP (host)
+       ftp.login (user, passwd)
+       ftp.set_pasv (1)
+       ftp.cwd (dir)
+       list = ftp.nlst (file)
+       try:
+               ftp.quit ()
+       except:
+               ftp.close ()
+       return list
        
 def split_url (url):
        m = re.match ('([^:/]*)(:)?(/*([^:]*):)?(/*([^@]*)@)?(//([^/]*))?(.*)/(.*)',
@@ -334,20 +332,29 @@ def copy_ftp (user, passwd, host, dir, file):
        if passwd == 'None':
                passwd = program_name
 
-       command = '''
-open -u%s,%s -p21 %s
-set passive-mode off
-cd "%s"
-get "%s"
-''' % (user, passwd, host, dir, file)
-       temp = tempfile.mktemp (program_name)
-       f = open (temp, 'w')
-       f.write (command)
-       f.close ()
-       p = os.popen ('lftp -f %s' % temp, 'r')
-       s = p.read ()
-       status = p.close ()
+       ftp = ftplib.FTP (host)
+       ftp.login (user, passwd)
+       ftp.set_pasv (1)
+       t = tempfile.mktemp (program_name)
+       try:
+               f = open (t, 'w')
+               ftp.retrbinary ('RETR %s/%s' % (dir, file),
+                       lambda x, f=f: f.write (x))
+               f.close ()
+               # huh? Invalid cross-device link
+               # os.rename (t, file)
+               system ('mv %s %s' % (t, file))
+       except:
+               os.remove (t)
+               raise 'Foo'
+       try:
+               ftp.quit ()
+       except:
+               ftp.close ()
+       return list
        
+
+
 def copy_url (url, dir):
        os.chdir (dir)
        s = "copy_%s ('%s', '%s', '%s', '%s', '%s')" % split_url (url)
@@ -414,7 +421,8 @@ for opt in options:
 if 1:
        latest = find_latest (url)
 
-       if os.path.isdir ('%s/%s' % (build_root, latest)):
+       # if os.path.isdir ('%s/%s' % (build_root, latest)):
+       if os.path.exists ('%s/%s/index.html' % (build_root, latest)):
                progress (_ ("latest is: %s") % latest)
                progress (_ ("relax, %s is up to date" % package_name))
                sys.exit (0)
@@ -429,6 +437,7 @@ if 1:
 
        if not os.path.isdir (build_root):
                build_root = temp_dir
+               
        if not os.path.isdir (release_dir):
                release_dir = temp_dir
                setup_temp ()
@@ -447,7 +456,7 @@ if 1:
 
        progress (_ ("building %s...") % latest)
        os.chdir (build_root)
-       if build (latest):
+       if not build (latest):
                if previous and remove_previous_p:
                        system ('rm -rf %s' % os.path.join (build_root, previous))
        else:
index 698d26b7e6a4fe211c12135eeababb79b14f41b8..8a3950c51ff5a95b62a37a06fbb47d5bd733fbe9 100644 (file)
 \def\theheader
 {
   \ifx\lilypondhead\undefined\else%
-    \parbox{\textwidth}{\mbox{}\lilypondhead}\fi
+    \lilypondhead\fi
 }
 \def\thefooter
 {
   \ifx\lilypondfooter\undefined\else%
-    \parbox{\textwidth}{\mbox{}\lilypondfooter}\fi
+    \lilypondfooter\fi
 }
 \def\makelilypondtagline
 {