From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Tue, 6 May 1997 00:23:32 +0000 (+0200)
Subject: release: 0.0.60
X-Git-Tag: release/0.0.60
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d26c30dd2a0d7de66ed4d3ce5a98fed475833e54;p=lilypond.git

release: 0.0.60
---

diff --git a/.dstreamrc b/.dstreamrc
index 1607370104..7fd7b97e0a 100644
--- a/.dstreamrc
+++ b/.dstreamrc
@@ -18,8 +18,8 @@ Parser			1
 InitDeclarations	1
 Declarations		1
 # FlexLexer debug
-InitLexer		0
-Lexer			0
+InitLexer		1
+Lexer			1
 
 parse_duration		1
 parse_pitchmod		1
diff --git a/.version b/.version
index 7db091cf9c..d3c588005d 100644
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 59
+TOPLEVEL_PATCH_LEVEL = 60
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
diff --git a/AUTHORS.text b/AUTHORS.text
index 4658153098..e409a65d23 100644
--- a/AUTHORS.text
+++ b/AUTHORS.text
@@ -16,9 +16,10 @@ DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
 
        +o   Jan Nieuwenhuizen <jan@digicash.com>
 
-           lily/midi-*, mi2mu/*, flower/string.cc, make/*.make,
-           Documentation/mudela.pod lib/*source-file*,
-           lib/duration.cc, lib/source, flower/*list*
+           lily/midi-*, mi2mu/*, parts flower/string*.cc,
+           make/*.make, parts of Documentation/mudela.pod,
+           lib/*source-file*, lib/duration.cc, lib/source,
+           flower/*{list,cursor}*,
 
            and corresponding header files.
 
@@ -60,7 +61,6 @@ DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
 
 
 
-
-19/Apr/97                LilyPond 0.0.57                        1
+6/May/97                 LilyPond 0.0.60                        1
 
 
diff --git a/Documentation/AUTHORS.pod b/Documentation/AUTHORS.pod
index c11a911b6c..c7bc53d52d 100644
--- a/Documentation/AUTHORS.pod
+++ b/Documentation/AUTHORS.pod
@@ -18,8 +18,9 @@ Main author, all files files except mentioned below
 
 Jan Nieuwenhuizen <jan@digicash.com>
 
-lily/midi-*, mi2mu/*, flower/string.cc, make/*.make, Documentation/mudela.pod
-lib/*source-file*, lib/duration.cc, lib/source, flower/*list*
+lily/midi-*, mi2mu/*, parts flower/string*.cc, make/*.make,
+parts of Documentation/mudela.pod, lib/*source-file*, lib/duration.cc,
+lib/source, flower/*{list,cursor}*,  
 
 and corresponding header files.
 
diff --git a/Documentation/examples.pod b/Documentation/examples.pod
deleted file mode 100644
index 16e79ebdae..0000000000
--- a/Documentation/examples.pod
+++ /dev/null
@@ -1,88 +0,0 @@
-=head1 NAME
-
-LilyExamples - GNU LilyPond example input
-
-=head1 DESCRIPTION
-
-This file documents the example inputfiles of GNU LilyPond. Information of
-each file: 
-
-	title
-	description (composer, piece)
-	tested GNU LilyPond features.
-	copyright info
-
-Most music distributed with GNU LilyPond was composed a long time ago, and
-do not have copyrights. Any exceptions are mentioned here.
-
-=head2 F<collisions.ly>
-
-Random counterpoint to demonstrate features.
-
-Features: \multivoice, collision resolution.
-
-
-=head2 F<coriolan-alto.ly>
-
-Ludwig van Beethoven (1770-1792), Opus 62 Ouverture zu Collins
-Trauerspiel "Coriolan"
-
-a 5 bar fragment of the alto part
-
-Features: pushgroup, popgroup.
-
-=head2 F<error.ly>
-
-Features: Error messages, context errors.
-
-=head2 F<fugue1.midi.ly>
-
-
-=head2 F<kortjakje.ly>
-
-Ah, vous dirais-je, maman" (Mozart, KV 265), bare 
-bones version.
-
-Features: example with lots of newbie comment.
-
-Copyright: public domain
-
-=head2 F<midi.ly>
-
-Features: midi output.
-
-=head2 F<rhythm.ly>
-
-Features: auto beams, multiple parralel meters.
-
-=head2 F<scales.ly>
-
-Features: plets, accents, beam steepnesses, dynamics, crescendi,
-\octave command, \transpose, multiple scripts
-
-=head2 F<scsii-menuetto.ly>
-
-J. S. Bach, Solo Cello Suites. Suite II part v Menuetto I. BWV ?
-
-Features: breaking algorithm, chords, multivoice, accents
-
-=head2 F<standchen.ly> 
-
-St\"andchen (Serenade) "Leise flehen meine
-Lieder" D.957 No.4 Franz Schubert (1797-1828)
-
-Features: multivoice, accents, lyrics, chords, piano music
-
-=head2 F<twinkle.ly>
-
-Twinkle twinkle little star in three languages.
-
-Features: lyrics
-
-=head2 F<wohltemperirt.ly>
-
-JS Bach, Das Wohltemperirtes Clavier I, Fuga II (c-minor), BWV ?
-
-Features: 
-
-Copyright: public domain
diff --git a/Documentation/lilypond.pod b/Documentation/lilypond.pod
index 329fe3b5b4..1de734b053 100644
--- a/Documentation/lilypond.pod
+++ b/Documentation/lilypond.pod
@@ -112,8 +112,7 @@ clef changes, meter changes, cadenza-mode, key changes, repeat bars
 
 =back
 
-=head1
-DISCLAIMER & COPYING POLICY
+=head1 DISCLAIMER & COPYING POLICY
 
 GNU LilyPond is copyright 1996,97 by its authors. GNU LilyPond is
 distributed under the terms of the GNU General Public
@@ -153,32 +152,28 @@ At this time, GNU LilyPond output looks nice, but is not of production
 quality. If you're not discouraged; this is what I type in my xterm:
 
 	lilypond someinput.ly
-	tex test
+	tex lelie.tex
 	xdvi test&
 
 This is what the output looks like over here:
 
-	hw:~/musix/spacer$ lilypond input/kortjakje.ly
-	GNU LilyPond 0.0.52 #1/FlowerLib 1.1.12 #1
-	Parsing ... [/home/hw/share/lilypond/init//symbol.ini[
-		<lots of stuff deleted>
-	][./input/kortjakje.ly]
+	hw:~/musix/spacer$ GNU LilyPond 0.0.60 #8/FlowerLib 1.1.14 #2
+	Parsing ... [./input/kortjakje.ly[lots of stuff]]
+	Setting up requests...Processing requests ...[8][16][24][25]
+	Preprocessing elements... 
+	Calculating column positions ... [3][7][12][16][20][25]
+	Postprocessing elements...
+	TeX output to lelie.tex ...
 
-	Setting up music ...Processing music ...[8][16][24][25]
-	Preprocessing ... 
-	Calculating column positions ... [3][9][14][18][22][25]
-	Postprocessing ...
-	TeX output to lelie.out ...
-
-	hw:~/musix/spacer$ tex test
+	hw:~/musix/spacer$ tex lelie
 	This is TeX, Version 3.14159 (C version 6.1)
-	(/home/hw/lib/texmf/tex/lilypond/test.tex
-	Hyphenation patterns for english, dutch, loaded.
-	(/home/hw/lib/texmf/tex/lilypond/lilyponddefs.tex) (lelie.out) [1] )
-	Output written on test.dvi (1 page, 9180 bytes).
-	Transcript written on test.log.
+	(lelie.tex
+	Hyphenation patterns for english, dutch, german, loaded.
+	(/home/hw/lib/texmf/tex/lilypond/lilyponddefs.tex) [1] )
+	Output written on lelie.dvi (1 page, 8944 bytes).
+	Transcript written on lelie.log.
 
-	hw:~/musix/spacer$ xdvi test&
+	hw:~/musix/spacer$ xdvi lelie&
 	[1] 855
 
 Check out the input files, some of them have comments
diff --git a/INSTALL.text b/INSTALL.text
index 20bcd2e721..ac5a76790a 100644
--- a/INSTALL.text
+++ b/INSTALL.text
@@ -61,7 +61,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a
 
 
 
-2/May/97                 LilyPond 0.0.58                        1
+2/May/97                 LilyPond 0.0.60                        1
 
 
 
@@ -127,7 +127,7 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
 
-2/May/97                 LilyPond 0.0.58                        2
+2/May/97                 LilyPond 0.0.60                        2
 
 
 
@@ -193,7 +193,7 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG
 
 
 
-2/May/97                 LilyPond 0.0.58                        3
+2/May/97                 LilyPond 0.0.60                        3
 
 
 
@@ -259,6 +259,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS
 
 
 
-2/May/97                 LilyPond 0.0.58                        4
+2/May/97                 LilyPond 0.0.60                        4
 
 
diff --git a/NEWS b/NEWS
index f01134bef9..b44d208d44 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+pl 60
+	- Request_register::get_feature(), tie direction, Slur direction
+	- lilypond output is now directly texable. 
+	- make_website checks return status
+
+*******
+may 5
 pl 59
 	- Slur now into voicegroups, and take stems into account.
 	- bf: rest size in table.
diff --git a/TODO b/TODO
index ec850fd0c7..b65304f456 100644
--- a/TODO
+++ b/TODO
@@ -22,8 +22,6 @@ IMPORTANT
 
 	* use own fonts/update musixtex fonts
 
-	* check return status in make_website
-
 	* a Hands on tutorial [HKN]
 
 
@@ -36,6 +34,18 @@ PROJECT:
 	- quiet/ignore-version options
 	- logfile output
 
+
+	* elaborate Staff_side baseclass:
+	 - scripts
+	 - text
+	 - slur start/end
+
+	* Output an output format independent (ofi) typeset file; and 
+	  make ofi2 TeX, MusixTex, PostScript, Ascii... interpreters.
+	- poor man's ascii output possible?
+	- MusixTeX output possible?
+	- PostScript output (esp. Beams, Slurs, etc)
+
 PARSER
 	* Duration-> Musical_duration, typedef Rational Duration?
 
@@ -46,8 +56,6 @@ ruimte van een hele maat erachter (bij unmatching staffs)
 
 Hele rusten ook in andere maatsoort dan 4/4 (en centreren in de maat)
 
-
-
 ------------------------\
 barcheck failed in lyric mode -> assert (zie barcheck.ly) (0.0.57)
 ------------------------/
@@ -249,8 +257,6 @@ FUTURE
 
 	* bring Collision::do_pre_processing to haircutter
 
-	* slurs per voicegroup.
-
 	* slur parts as a script
 	
 	* mixed fontsizes
@@ -285,9 +291,6 @@ FUTURE
 
 IDEAS
 
-	* output an intermediate format, move backend/output routines into 
-	interpreter
-
 	* scoping in Lexer: do general id- assignments in mudela.
 
 	ID '=' EXPR;
@@ -311,7 +314,6 @@ IDEAS
 	* merge Atom and Symbol?
 
 	* merge common code of Item, Atom/Molecule
-
 	* Spacing_request for manually adjusting spacing
 
 	* Staff_group, Score_request_register.
@@ -319,15 +321,6 @@ IDEAS
 	* SHIT: meters/bars should be aligned, which is difficult if
 	we get different keychanges in different staffs.
 
-	* MusixTeX output possible?
-
-	* PostScript output (esp. Beams, Slurs, etc)
-
-	* poor man's ascii output possible?
-
-	* Output an output format independent (ofi) typeset file; and 
-	  make ofi2 TeX, MusixTex, PostScript, Ascii... interpreters.
-
 	* caching breakpoints
 
 	* #c <-> cis
@@ -337,9 +330,6 @@ IDEAS
 	* used fixedpoint arithmetic for min. energy.
 
 	* default convert mudela-file.ly -> mudela-file.tex
-	  - move test.tex: '\include lilyponddefs' -> 
-	    mudela-file.ly: '\texinclude "lilyponddefs";'
-	    (junking test.tex and latex.test)
 	  - rename {standchen,scsii-menuetto,...}.tex
 
 	* (related with above) --simple-mudela option for lily,
diff --git a/bin/lily.efence b/bin/lily.efence
old mode 100644
new mode 100755
index 9bed942de5..5924253436
--- a/bin/lily.efence
+++ b/bin/lily.efence
@@ -1,4 +1,4 @@
-# gdb script
-file bin/lilypond
-set environment  LD_PRELOAD libefence.so
+#!/bin/sh
+gdb --command=bin/efence.gdbinit
+
 
diff --git a/bin/make_website b/bin/make_website
index a6855cbe31..380a5cbca1 100755
--- a/bin/make_website
+++ b/bin/make_website
@@ -1,5 +1,20 @@
 #!/usr/bin/perl -w
-# stuff should be generated in out directory.
+
+# TODO check ret status of various stuff
+
+use FileHandle;
+
+sub my_system
+{
+    my (@cmds) = @_;
+    foreach $cmd (@cmds) {
+	my 	$ret =  ( system ($cmd))/256;
+	if ($ret) {
+	    print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
+	    exit 2;
+	}
+    }
+}
 
 sub set_hrefs
 {
@@ -29,14 +44,14 @@ local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "coll
 sub gen_html
 {
     print "generating HTML\n";
-    system "make -kC .. html";
+    my_system "make -kC .. html";
 }
 
 sub gen_examples
 {
     print "generating examples: \n";
     foreach $a (@examples) {
-	$texfile="test";
+	$texfile="lelie";
 	$tex = "tex $texfile";
 	if ($a eq "standchen" || $a eq "scsii-menuetto" ) {
 	    $tex = "latex $a";
@@ -44,18 +59,19 @@ sub gen_examples
 	}
 	
 	if ( ! -f "$a.ly.txt" ) {
-	    system "ln $depth/input/$a.ly ./$a.ly.txt";
+	    my_system "ln $depth/input/$a.ly ./$a.ly.txt";
 	}
 	if ( ! -f "$a.ps.gz" ) {
-	    system "lilypond $a;$tex;".
-		"dvips -o $a.ps $texfile;";
+	    my_system "lilypond $a;",
+	    "$tex",
+	    "dvips -o $a.ps $texfile;";
 
 	}
 	# generate the pixmap at twice the size, then rescale (for antialiasing)
 	if ( ! -f "$a.gif" ) {
-	    system "mv lelie.midi $a.midi; ";
-	    system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif";
-	    system "gzip $a.ps";
+	    my_system "mv lelie.midi $a.midi; ",
+	     "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif",
+	     "gzip $a.ps";
 	}   
     }
 }
@@ -69,8 +85,13 @@ sub gen_list
     foreach $a (@examples) {
 	$name=$a;
 	print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
-	$cmd= "head $depth/input/$a.ly | grep \^% \| sed \"s/^%/	/\"";
-	$desc = `$cmd`;
+
+	open IF, "$depth/input/$a.ly";
+	input_record_separator IF "%}";
+	
+	$desc = <IF>;
+	close IF;
+	
 	print HTMLLIST "$desc\n</XMP>";
 
 	$inputf="$a.ly.txt";
@@ -93,22 +114,23 @@ sub copy_files
 {  
     print "copying files\n";
     print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ;
-    system "cp $depth/TODO ./TODO.txt";
-    system "cp $depth/NEWS ./NEWS.txt";
-    system "cp ../lelie*gif .";
+    my_system "cp $depth/TODO ./TODO.txt",
+    "cp $depth/NEWS ./NEWS.txt",
+    "cp ../lelie*gif .";
 }
 
 sub docxx_update
 {
-    system "make -C $depth doc++";
+    my_system "make -C $depth doc++";
 }
 
 sub
     do_tar
 {
      print "tarring.\n";
-     system " tar vhcf website.tar *.html *.gif *.ps.gz *.ly.txt *.midi docxx/*;";
-system	"gzip -f9 website.tar;";
+     my_system
+	 " tar vhcf website.tar *.html *.gif *.ps.gz *.ly.txt *.midi docxx/*;",
+	 "gzip -f9 website.tar;";
 }
 
 $depth = "../../";
diff --git a/init/table_sixteen.ini b/init/table_sixteen.ini
index a205cddaff..82364493b7 100644
--- a/init/table_sixteen.ini
+++ b/init/table_sixteen.ini
@@ -6,7 +6,7 @@
 table_sixteen= 
 \symboltables {
 
-   \texid 	"\musixsixteendefs"
+   \texid 	"\input lilyponddefs \musixsixteendefs"
 
    % index TeXstring, 	xmin xmax ymin ymax
 
diff --git a/input/collisions.ly b/input/collisions.ly
index bee5e6de6f..d37dab705c 100644
--- a/input/collisions.ly
+++ b/input/collisions.ly
@@ -2,12 +2,12 @@
 
  filename: collisions.ly
  title:
- description: 
+ description:  random counterpoint to test collisions
  composer(s): HWN
  entered-by: HWN
  copyright: public domain
 
- Tested Features:%test the Collision resolution 
+ Tested Features:test the Collision resolution 
 EndMudelaHeader
 %}
 \version "0.0.57";
diff --git a/input/kortjakje.ly b/input/kortjakje.ly
index e9588b6620..6cc689c326 100644
--- a/input/kortjakje.ly
+++ b/input/kortjakje.ly
@@ -36,8 +36,8 @@ melodie = \melodic {
 		  (|		% start a slur
 				% NOTE: the slurstart should be directly after the note
 			) 	% end a slur.
-			  g r8 g8 ~ 	 a r8 a8 ~ 	 g r4 
-	  f r8 f8 ~ 	 e4 r8 e8 ~ | d4 r8 d8 ~ 	 c4 r4 
+			  g r8 g8 () 	 a r8 a8 () 	 g r4 
+	  f r8 f8 () 	 e4 r8 e8 (|)  d4 r8 d8 () 	 c4 r4 
 }
 
 				% more of this.
@@ -53,8 +53,8 @@ begeleiding = \melodic{
 	\octave  'c ;
 	e 'g	d 'g	c 'g	'b 'g	e 'g	d 'g	c 'g	'b 'g
 	%%%% var 1
-	r8 e8~  c  	r8 e8~  c  	r8 f8~ c 	r8 e8~ c
-	r8 d8~ 'b 	r8 c8~ 'a 	r8 'a8~ 'f 	r8 'e8~ 'c
+	r8 e8()  c  	r8 e8()  c  	r8 f8() c 	r8 e8() c
+	r8 d8() 'b 	r8 c8() 'a 	r8 'a8() 'f 	r8 'e8() 'c
 }
 
 \score{
diff --git a/input/rhythm.ly b/input/rhythm.ly
index 8205a45d5b..24f134baef 100644
--- a/input/rhythm.ly
+++ b/input/rhythm.ly
@@ -1,3 +1,17 @@
+%{MudelaHeader
+
+ filename:rhythm.ly
+ title:
+ description: 
+ composers:HWN
+ entered-by:HWN
+ copyright:public domain
+
+ Tested Features: multiple meters, beaming
+EndMudelaHeader
+%}
+\version "0.0.57";
+
 %
 % 	Ive' got rhythm!
 %
diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly
index 7781055764..b40697e5b6 100644
--- a/input/scsii-menuetto.ly
+++ b/input/scsii-menuetto.ly
@@ -1,17 +1,17 @@
-% scsii-menuetto.ly
-%
-% Solo Cello Suites
-% Johann Sebastian Bach (1685-1750)
-% bwv 000
-%
-% Suite II part v
-% Menuetto I
-%
-% Copyright (c) 1995,1996,1997 Jan Nieuwenhuizen <jan@digicash.com>
-% 
-% The purpose of this file is to demonstrate features of LilyPond.
-% (there is an accompanying LaTeX file, scsii-menuetto.tex)
-%
+%{MudelaHeader
+
+ filename: scsii-menuetto.ly
+ title:Solo Cello Suites,
+ description: Suite II part V, Menuetto I
+ composers: Johann Sebastian Bach (1685-1750)
+ entered-by: JCN
+ copyright: 
+
+ Tested Features:breaking algorithm, chords, multivoice, accents
+
+
+EndMudelaHeader
+%}
 \version "0.0.57";
 %% Stuff from MPP version
 % \lefttitle{Menuetto}
diff --git a/input/slurs.ly b/input/slurs.ly
index 95de0c7639..a97f5faa6c 100644
--- a/input/slurs.ly
+++ b/input/slurs.ly
@@ -16,8 +16,8 @@ EndMudelaHeader
 \score{\staff{
 	melodicregs 
 	\melodic{\octave c';
-		\duration 4;
-		c ~ c ~ g ~ c ~
+		\duration "last";
+		'c4 ~ 'c c'' ~ c'' ~ g ~ c ~
 		d ~ e ~ f ~ g ~
 		a ~ b ~ 'c ~ c
 
@@ -29,8 +29,9 @@ EndMudelaHeader
 		< { c ~ d }
 		  { e ~ f }
 		>
-
-
+	< \multivoice 
+	{ \stem 1; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
+	{ \stem -1; c (e g )c'~( [b a g )d]   	r2 } >
 
 	}
 
diff --git a/input/standchen.ly b/input/standchen.ly
index 78ca3975d1..03b8a1e7c3 100644
--- a/input/standchen.ly
+++ b/input/standchen.ly
@@ -1,18 +1,21 @@
-%{
-standchen.ly
+%{MudelaHeader
 
- St\"andchen (Serenade) "Leise flehen meine Lieder" D.957 No.4
- Franz Schubert (1797-1828)
- Text by Ludwig Rellstab (1799-1860)
+ filename: standchen.ly
+ title: St\"andchen (Serenade) "Leise flehen meine Lieder"
+ description:  D.957 No.4
+ composers: Franz Schubert (1797-1828)
+	 Text by Ludwig Rellstab (1799-1860)
+ entered-by:JCN
+ copyright:
 
- Copyright (c) 1995,1996,1997 Jan Nieuwenhuizen <jandigicash.com>
- 
- The purpose of this file is to demonstrate features of LilyPond.
- (there is an accompanying LaTeX file, standchen.tex)
+ Tested Features: multivoice, accents, lyrics, chords, piano music
 
+EndMudelaHeader
 %}
 \version "0.0.57";
 
+\version "0.0.57";
+
 commands = \melodic{
 	\skip 2.*4;
 	\bar ":|";
diff --git a/lily/.version b/lily/.version
index 81bb5a3ffc..4a6628d2a9 100644
--- a/lily/.version
+++ b/lily/.version
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 59
+PATCH_LEVEL = 60
 
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
diff --git a/lily/bar.cc b/lily/bar.cc
index f0afa9b402..96071ad385 100644
--- a/lily/bar.cc
+++ b/lily/bar.cc
@@ -1,3 +1,11 @@
+/*
+  bar.cc -- implement Bar
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "bar.hh"
 #include "string.hh"
 #include "molecule.hh"
@@ -5,8 +13,6 @@
 #include "lookup.hh"
 #include "debug.hh"
 
-
-
 Bar::Bar( String t)
 {
     type = t;
diff --git a/lily/directional-spanner.cc b/lily/directional-spanner.cc
index 0c48c80f6e..0e1c058f49 100644
--- a/lily/directional-spanner.cc
+++ b/lily/directional-spanner.cc
@@ -5,6 +5,14 @@ Directional_spanner::set_default_dir()
 {
     dir_i_ = -1;
 }
+
+void
+Directional_spanner::do_pre_processing()
+{
+    if (!dir_i_)
+	set_default_dir();
+}
+
 Directional_spanner::Directional_spanner()
 {
     dir_i_ = 0;
diff --git a/lily/include/bow.hh b/lily/include/bow.hh
index ab3908a769..903bbdb635 100644
--- a/lily/include/bow.hh
+++ b/lily/include/bow.hh
@@ -20,6 +20,7 @@ protected:
     int right_pos_i_;
     Real left_dx_f_;
     Real right_dx_f_;
+    
     Molecule*brew_molecule_p()const;
 public:
     Bow();
diff --git a/lily/include/directional-spanner.hh b/lily/include/directional-spanner.hh
index 049f28b17b..eb96e87240 100644
--- a/lily/include/directional-spanner.hh
+++ b/lily/include/directional-spanner.hh
@@ -18,6 +18,7 @@ struct Directional_spanner : Spanner{
     /// offset of "center" relative to left-column/0-pos of staff
     virtual Offset center() const=0;
     virtual void set_default_dir();
+    virtual void do_pre_processing();
     Directional_spanner();
     
 };
diff --git a/lily/include/register-group.hh b/lily/include/register-group.hh
index fc93216de0..fcfc4ba5c6 100644
--- a/lily/include/register-group.hh
+++ b/lily/include/register-group.hh
@@ -41,6 +41,7 @@ public:
     virtual Request_register * get_register_p(Request_register*reg_l);
     virtual void set_feature(Feature i);
     virtual bool acceptable_request_b(Request*)const;
+    virtual void sync_features() ;
     virtual void pre_move_processing();
     virtual void post_move_processing();
     virtual void acknowledge_element(Staff_elem_info info);
diff --git a/lily/include/register.hh b/lily/include/register.hh
index b86af3d918..5ba28600ad 100644
--- a/lily/include/register.hh
+++ b/lily/include/register.hh
@@ -86,16 +86,23 @@ protected:
       Set Feature of the register(s). Default: ignore Feature.
      */
     virtual void set_feature(Feature){}
+    /**
+      ask daddy for a feature
+     */
+    virtual Scalar get_feature(String type_str);
     /**
       Does this equal or contain a certain register?
      */
+
+    virtual void sync_features() {}
+    
     virtual bool contains_b(Request_register*reg_l)const;
     /**
       Get information on the staff. Default: ask daddy.
       */
     virtual Staff_info get_staff_info();
-    
-    
+
+
     virtual void do_print()const;  
 public:
     /** Every Request_register (except for the 'top' which is directly
diff --git a/lily/include/slur-reg.hh b/lily/include/slur-reg.hh
index e9a27a43d6..cca97e0f13 100644
--- a/lily/include/slur-reg.hh
+++ b/lily/include/slur-reg.hh
@@ -15,11 +15,12 @@ class Slur_register :public Request_register {
     Array<Slur_req*> new_slur_req_l_arr_;
     Array<Slur *> slur_l_stack_;
     Array<Slur*> end_slur_l_arr_;
-
+    int dir_i_;
     /* *************** */
 protected:
     virtual ~Slur_register();
     virtual bool try_request(Request*);
+    virtual void set_feature(Feature);
     virtual bool acceptable_request_b(Request*);
     virtual void process_requests();
     virtual void acknowledge_element(Staff_elem_info);
diff --git a/lily/include/tie-reg.hh b/lily/include/tie-reg.hh
index 34387c964d..082de4e70c 100644
--- a/lily/include/tie-reg.hh
+++ b/lily/include/tie-reg.hh
@@ -17,15 +17,19 @@ class Tie_register : public Request_register {
     Tie * tie_p_;
     Moment end_mom_;
     Tie_req * req_l_;
+    int dir_i_;
     Tie_req *end_req_l_;
+    
 protected:
     virtual ~Tie_register();
     virtual void acknowledge_element(Staff_elem_info);
     virtual bool try_request(Request*);
     virtual bool acceptable_request_b(Request*);
+    virtual void sync_features();
     virtual void process_requests();
     virtual void post_move_processing();
     virtual void pre_move_processing();
+    virtual void set_feature(Feature);
 public:
     Tie_register();
     NAME_MEMBERS(Tie_register);
diff --git a/lily/include/tie.hh b/lily/include/tie.hh
index 9247b26156..972d2cf97e 100644
--- a/lily/include/tie.hh
+++ b/lily/include/tie.hh
@@ -16,6 +16,7 @@ class Tie : public Bow {
     virtual Spanner* do_break_at(PCol*,PCol*)const;
     virtual void do_add_processing();
     virtual void do_post_processing();
+    virtual void set_default_dir();
 public:
     Notehead * left_head_l_;
     Notehead * right_head_l_;
diff --git a/lily/include/voice-group-regs.hh b/lily/include/voice-group-regs.hh
index dba96dc21a..8a0837308d 100644
--- a/lily/include/voice-group-regs.hh
+++ b/lily/include/voice-group-regs.hh
@@ -18,8 +18,12 @@
 class Voice_group_registers  : public Register_group_register {
     Moment termination_mom_;
     Input_register const *ireg_C_;
+    int dir_i_;
+
 protected:
     virtual void do_print() const;
+    virtual void set_feature(Feature);
+    virtual Scalar get_feature(String);
     virtual void post_move_processing();
     virtual bool try_request(Request*);
 public:
diff --git a/lily/p-score.cc b/lily/p-score.cc
index 37090b77db..ff3482097e 100644
--- a/lily/p-score.cc
+++ b/lily/p-score.cc
@@ -131,6 +131,7 @@ PScore::output(Tex_stream &ts)
 	if ((lic+1).ok())
 	    ts << "\\interscoreline\n";
     }	
+    ts << "\n\\EndLilyPondOutput";
 }
 
 
diff --git a/lily/paper-def.cc b/lily/paper-def.cc
index b2602dd355..256f3b8805 100644
--- a/lily/paper-def.cc
+++ b/lily/paper-def.cc
@@ -40,7 +40,7 @@ Paper_def::Paper_def(Lookup *l)
     linewidth = 15 *CM_TO_PT;		// in cm for now
     whole_width = 8 * note_width();
     geometric_ = sqrt(2);
-    outfile = "lelie.out";
+    outfile = "lelie.tex";
 }
 
 Paper_def::~Paper_def()
diff --git a/lily/register-group.cc b/lily/register-group.cc
index 2180a1bf15..6e516df21b 100644
--- a/lily/register-group.cc
+++ b/lily/register-group.cc
@@ -32,6 +32,17 @@ Register_group_register::set_feature(Feature d)
     }
 }
 
+void
+Register_group_register::sync_features()
+{
+    iter_top(reg_list_, i);
+    while (i.ok()) {
+
+	Request_register *reg_l = i++; 
+	reg_l->sync_features();
+    }
+}
+
 void
 Register_group_register::pre_move_processing()
 {
diff --git a/lily/register.cc b/lily/register.cc
index 57a030d956..08c3feaa00 100644
--- a/lily/register.cc
+++ b/lily/register.cc
@@ -16,6 +16,12 @@
 #include "register-group.hh"
 #include "debug.hh"
 
+Scalar
+Request_register::get_feature(String t)
+{
+    return daddy_reg_l_->get_feature(t);
+}
+
 bool
 Request_register::try_request(Request*)
 {
diff --git a/lily/slur-reg.cc b/lily/slur-reg.cc
index a9acf3b67b..20a3c5415e 100644
--- a/lily/slur-reg.cc
+++ b/lily/slur-reg.cc
@@ -40,9 +40,21 @@ Slur_register::acknowledge_element(Staff_elem_info info)
 	    end_slur_l_arr_[i]->add(col_l);
     }
 }
+
+void
+Slur_register::set_feature(Feature f)
+{
+    if (f.type_ == "vdir")
+	dir_i_ = f.value_ ;
+}
+
 /*
   abracadabra
   */
+Slur_register::Slur_register()
+{
+    dir_i_ =0;
+}
 void
 Slur_register::process_requests()
 {
@@ -75,6 +87,8 @@ void
 Slur_register::pre_move_processing()
 {
     for (int i = 0; i < end_slur_l_arr_.size(); i++) {
+	if (dir_i_)
+	    end_slur_l_arr_[i]->dir_i_ = dir_i_;
 	typeset_element(end_slur_l_arr_[i]);
     }
     end_slur_l_arr_.set_size(0);
diff --git a/lily/slur.cc b/lily/slur.cc
index a47679a3f4..7de562215a 100644
--- a/lily/slur.cc
+++ b/lily/slur.cc
@@ -76,5 +76,8 @@ Slur::do_post_processing()
     Real inter_f = paper()->internote();
     left_pos_i_ = encompass_arr_[0]->stem_l_->height()[dir_i_]/inter_f;
     right_pos_i_ = encompass_arr_.top()->stem_l_->height()[dir_i_]/inter_f;
+
+    left_pos_i_ += dir_i_;
+    right_pos_i_ += dir_i_;
 }
 IMPLEMENT_STATIC_NAME(Slur);
diff --git a/lily/staff-regs.cc b/lily/staff-regs.cc
index 9f5cc9cd81..b6dc1165b7 100644
--- a/lily/staff-regs.cc
+++ b/lily/staff-regs.cc
@@ -62,7 +62,7 @@ Staff_registers::change_group(Group_change_req * greq_l,
     }
     Voice_group_registers * new_group_l = get_group(new_str);
     new_group_l->add(regs_p);
-    
+    regs_p->sync_features(); 
     mtor << "processed change_group " << get_staff_info().when()<<"\n";
     print();
 }
diff --git a/lily/tie-reg.cc b/lily/tie-reg.cc
index fd2df29a86..af9c539803 100644
--- a/lily/tie-reg.cc
+++ b/lily/tie-reg.cc
@@ -21,10 +21,17 @@ Tie_register::Tie_register()
     end_mom_ = -1;
 }
 
+void
+Tie_register::sync_features()
+{
+    dir_i_ = get_feature("vdir");
+}
+    
+
 void
 Tie_register::post_move_processing()
 {
-     if (tie_p_ && get_staff_info().when() == end_mom_) {
+    if (tie_p_ && get_staff_info().when() == end_mom_) {
 	end_tie_p_ = tie_p_;
 	end_req_l_ = req_l_;
 	tie_p_ =0;
@@ -78,6 +85,9 @@ void
 Tie_register::pre_move_processing()
 {
     if (end_tie_p_) {
+	if (dir_i_)
+	    end_tie_p_->dir_i_ =  dir_i_;
+	
 	typeset_element(end_tie_p_);
 	end_tie_p_ =0;
 	end_req_l_ =0;
@@ -93,5 +103,12 @@ Tie_register::~Tie_register()
     }
 }
 
+void
+Tie_register::set_feature(Feature f)
+{
+    if (f.type_ == "vdir")
+	dir_i_ = f.value_;
+}
+
 IMPLEMENT_STATIC_NAME(Tie_register);
 ADD_THIS_REGISTER(Tie_register);
diff --git a/lily/tie.cc b/lily/tie.cc
index eff99f4600..06c09a3b82 100644
--- a/lily/tie.cc
+++ b/lily/tie.cc
@@ -6,6 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
+#include "paper-def.hh"
 #include "tie.hh"
 #include "notehead.hh"
 #include "p-col.hh"
@@ -13,12 +14,12 @@
 Spanner*
 Tie::do_break_at(PCol*l, PCol*r) const
 {
-    Tie * tie_p = new Tie;
+    Tie * tie_p = new Tie(*this);
     Line_of_score const  *line_C=l->line_l_;
-    if (left_head_l_->line_l()== line_C)
-	tie_p->left_head_l_ = left_head_l_;
-    if (right_head_l_->line_l() == line_C)
-	tie_p->right_head_l_  = right_head_l_;
+    tie_p->left_head_l_ = (left_head_l_->line_l()== line_C) ?
+	left_head_l_ : 0;
+    tie_p->right_head_l_  = (right_head_l_->line_l() == line_C)?
+	right_head_l_ : 0;
     
     return tie_p;
 }
@@ -42,6 +43,14 @@ Tie::Tie()
     left_head_l_ =0;
 }
 
+void
+Tie::set_default_dir()
+{
+    int m= (left_head_l_->position_i_ + right_head_l_->position_i_) /2 ;
+    dir_i_ =  (m < 5)? -1:1;			// ugh
+}
+    
+
 void
 Tie::do_add_processing()
 {
@@ -58,6 +67,18 @@ Tie::do_post_processing()
 	left_head_l_->position_i_ : right_head_l_->position_i_;
     right_pos_i_ = (right_head_l_) ? 
 	right_head_l_->position_i_ : left_head_l_->position_i_;
+ 
+    if ( right_head_l_ && right_head_l_->extremal_i_) {
+	right_pos_i_ += 2*dir_i_;
+	right_dx_f_ -= 0.25;
+    } else
+	right_dx_f_ -= 0.5;
+
+    if (left_head_l_ && left_head_l_->extremal_i_) {
+	left_pos_i_ += 2*dir_i_;
+	left_dx_f_ += 0.25;
+    } else
+	left_dx_f_ += 0.5;
 }
 
 
diff --git a/lily/voice-group-regs.cc b/lily/voice-group-regs.cc
index 053e2dc74b..8bc2491681 100644
--- a/lily/voice-group-regs.cc
+++ b/lily/voice-group-regs.cc
@@ -22,6 +22,7 @@ static int temp_id_count;
 Voice_group_registers::Voice_group_registers(String id,
 					     Input_register const *ireg_C)
 {
+    dir_i_ =0;
     ireg_C_ =ireg_C;
     Register_group_register::add(ireg_C->get_nongroup_p_arr());
     if (id=="")			// ugh
@@ -113,3 +114,18 @@ Voice_group_registers::OK() const
 }
 	     
 	     
+void
+Voice_group_registers::set_feature(Feature f)
+{
+    if (f.type_ == "vdir")
+	dir_i_ = f.value_;
+    Register_group_register::set_feature(f);
+}
+
+Scalar
+Voice_group_registers::get_feature(String f)
+{
+    if (f == "vdir")
+	return dir_i_;
+    Register_group_register::get_feature(f);
+}
diff --git a/make/lilypond.lsm b/make/lilypond.lsm
index 7c675336f2..789c602b6d 100644
--- a/make/lilypond.lsm
+++ b/make/lilypond.lsm
@@ -2,7 +2,7 @@
 
 Begin3
 Title: LilyPond
-Version: 0.0.59
+Version: 0.0.60
 Entered-date: 05/05/97
 Description: LilyPond is a program which converts a music-script (mudela) into
 TeX output, or MIDI to produce multi-staff scores. Features include multiple
@@ -13,7 +13,7 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
 	jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: pcnov095.win.tue.nl /pub/lilypond/  
-	300k lilypond-0.0.59.tar.gz
+	300k lilypond-0.0.60.tar.gz
 Alternate-site: 
 Original-site: 
 Platform: unix/win32, GNU C++
diff --git a/make/lilypond.spec b/make/lilypond.spec
index 4fa3667bc0..fb892b56f9 100644
--- a/make/lilypond.spec
+++ b/make/lilypond.spec
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.0.59
+Version: 0.0.60
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.59.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.60.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex
index 2851557010..4725230860 100644
--- a/tex/lilyponddefs.tex
+++ b/tex/lilyponddefs.tex
@@ -3,7 +3,18 @@
 %%
 %% this file defines various macros to accomodate lilypond output
 
-\def\mdef#1#2{\def#1{\mchar{#2}}}
+% TeXbook ex 7.7
+\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
+
+\def\SkipLilydefs{\endinput}
+\ifundefined{EndLilyPondOutput}
+        \def\EndLilyPondOutput{\csname bye\endcsname}
+        \def\SkipLilydefs{}
+\fi
+\SkipLilydefs
+% should use \endinput
+
+        \def\mdef#1#2{\def#1{\mchar{#2}}}
 \def\mchar#1{\musicfnt\char#1}
 \def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3}
 \def\maccentraise#1#2{\dimen0=\noteheight
@@ -49,7 +60,7 @@
         \font\musicdraw=musixsps
         \font\italicfont=cmti10
         \font\dynfont=cmbxti10 scaled \magstep1
-	\font\mathfont=cmsy10
+        \font\mathfont=cmsy10
         \balkhoog=20pt
         \notewidth=6pt
         \noteheight=5pt
@@ -71,7 +82,7 @@
         \font\musicfnt=musix16
         \font\dynfont=cmbxti12
         \font\musicdraw=musixsps
-	\font\mathfont=cmsy8
+        \font\mathfont=cmsy8
         \balkhoog=16pt
         \staffrulethickness=0.4pt
         \notewidth=5pt
@@ -279,3 +290,6 @@
 \def\settext#1{\textfont #1}
 \def\setitalic#1{\italicfont #1}
 \def\setdynamic#1{\dynfont #1}
+
+        
+
diff --git a/tex/test.tex b/tex/test.tex
deleted file mode 100644
index b55575709d..0000000000
--- a/tex/test.tex
+++ /dev/null
@@ -1,3 +0,0 @@
-\input lilyponddefs
-\input lelie.out
-\vfil\bye
\ No newline at end of file
diff --git a/tex/titledefs.tex b/tex/titledefs.tex
index cbf88bf422..314d675968 100644
--- a/tex/titledefs.tex
+++ b/tex/titledefs.tex
@@ -2,7 +2,8 @@
 % ideally, we should create a LaTeX/TeX class
 % for setting music in different sizes.
 %
-
+\input lilyponddefs
+\def\EndLilyPondOutput{\endinput}
 \def\thetitle{}
 \def\thecomposer{}
 \def\theinstrument{}