]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.23
authorfred <fred>
Wed, 27 Mar 2002 02:04:16 +0000 (02:04 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:04:16 +0000 (02:04 +0000)
Documentation/header.html.in
lily/lookup.cc
lily/my-lily-parser.cc
lily/parser.yy
lilypond-mode.el
scripts/lilypond-book.py
stepmake/stepmake/metafont-rules.make

index bd4b1165934037407acadeac316128e683dcdef8..f5a7104cacd2a6650c196fb0b1cf70b3a5c16b2b 100644 (file)
@@ -50,7 +50,7 @@ which substitutes some @AT_VARIABLES@ as well.
       </td></tr>
       <tr><td><font size="-1">
        <a href="@TOP@Documentation/topdocs/out-www/INSTALL.html#download-binaries">GNU/Linux binaries</a><br>
-       <a href="@TOP@Documentation/windows/out-www/installing.html">GNU/Windows binaries</a><br>
+       <a href="@TOP@Documentation/windows/out-www/installing.html">Windows binaries</a><br>
        <a href="@TOP@Documentation/topdocs/out-www/INSTALL.html#download-source">Source code</a><br>
       </font></td></tr>
       <tr><td bgcolor="#e8e8ff">
index 036ba8895944abbbd2dd12bed515371f0d2aa64b..40af656ee39e06c0b55361966a02d799a869e349 100644 (file)
@@ -125,11 +125,14 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
 {
   Real alpha = (curve.control_[3] - curve.control_[0]).arg ();
   Bezier back = curve;
-
+  Offset perp = curvethick * complex_exp (Offset (0, alpha + M_PI/2)) * 0.5;
   back.reverse ();
-  back.control_[1] += curvethick * complex_exp (Offset (0, alpha + M_PI/2));
-  back.control_[2] += curvethick * complex_exp (Offset (0, alpha + M_PI/2));  
+  back.control_[1] += perp;
+  back.control_[2] += perp;
 
+  curve.control_[1] -= perp;
+  curve.control_[2] -= perp;
+  
   SCM scontrols[8];
 
   for (int i=4; i--;)
@@ -152,8 +155,12 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
                     ly_quote_scm (list),
                     gh_double2scm (linethick),
                     SCM_UNDEFINED));
+  Box b(curve.extent (X_AXIS),
+       curve.extent (Y_AXIS));
+
+  b[X_AXIS].unite (back.extent (X_AXIS));
+  b[Y_AXIS].unite (back.extent (Y_AXIS));
 
-  Box b (curve.extent (X_AXIS), curve.extent (Y_AXIS));
   return Molecule (b, at);
 }
 
index c850a721041932d89cc7c333790a7af35de60fc7..937c0f338aaaa337dbc59d899e4b57fbecaebb7f 100644 (file)
@@ -83,11 +83,6 @@ My_lily_parser::parser_error (String s)
   exit_status_global = 1;
 }
 
-void
-My_lily_parser::set_last_duration (Duration const *d)
-{
-  default_duration_ = *d;
-}
 
 
 Input
index 21943567633c2675e88ad215841effc835a845f8..022451ca8d30bf4bafb66a4f0a0fd245daaf756a 100644 (file)
@@ -1615,9 +1615,11 @@ optional_notemode_duration:
        }
        | multiplied_duration   {
                $$ = $1;
+               THIS->default_duration_ = *unsmob_duration ($$);
        }
        | explicit_duration {
                $$ = $1;
+               THIS->default_duration_ = *unsmob_duration ($$);
        }       
        ;
 
@@ -1630,15 +1632,11 @@ steno_duration:
                        l =  intlog2 ($1);
 
                $$ = Duration (l, $2).smobbed_copy ();
-
-               THIS->set_last_duration (unsmob_duration ($$));
        }
        | DURATION_IDENTIFIER dots      {
                Duration *d =unsmob_duration ($1);
                Duration k (d->duration_log (),d->dot_count () + $2);
                $$ = k.smobbed_copy ();
-
-               THIS->set_last_duration (unsmob_duration ($$));
        }
        ;
 
index 60e1a9c2cf502ad09b3c72201faaab8be6b22970..647f03862af862e22fc398817584cd5971e7a08e 100644 (file)
@@ -149,6 +149,18 @@ in LilyPond-include-path."
   :group 'LilyPond
   :type 'string)
 
+(defcustom LilyPond-gv-command "gv -watch"
+  "Command used to display PS files."
+
+  :group 'LilyPond
+  :type 'string)
+
+(defcustom LilyPond-midi-command "timidity"
+  "Command used to play MIDI files."
+
+  :group 'LilyPond
+  :type 'string)
+
 ;; This is the major configuration variable.
 (defcustom LilyPond-command-alist
   `(
@@ -311,6 +323,42 @@ Must be the car of an entry in `LilyPond-command-alist'."
   (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file)
 )
 
+(defun LilyPond-command-formatdvi ()
+  "Format the dvi output of the current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-formatps ()
+  "Format the ps output of the current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-smartview ()
+  "View the dvi output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-view ()
+  "View the dvi output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-viewps ()
+  "View the ps output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-midi ()
+  "View the ps output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file)
+)
+
 ;; FIXME, this is broken
 (defun LilyPond-region-file (begin end)
   (let (
index 1686b60c6c29f0ceecc1325e410c239e19b2382a..efd48214a34096cda1404358694c4b12cbfc28a1 100644 (file)
 #       geometry.sty and article.cls. Give me a hint, and I'll
 #       fix it.)
 
+#
+# TODO: magnification support should also work for texinfo -> html: eg. add as option to dvips. 
+# 
+
 # This is was the idea for handling of comments:
 #      Multiline comments, @ignore .. @end ignore is scanned for
 #      in read_doc_file, and the chunks are marked as 'ignore', so
@@ -31,6 +35,8 @@
 #      The the rest of the rexeces are searched for. They don't have to test
 #      if they are on a commented out line.
 
+
+
 import os
 import stat
 import string
@@ -927,16 +933,6 @@ def process_lilypond_blocks(outname, chunks):#ugh rename
        return newchunks
 
 
-def find_eps_dims (match):
-       "Fill in dimensions of EPS files."
-       
-       fn =match.group (1)
-       dims = bounding_box_dimensions (fn)
-       if g_outdir:
-               fn = os.path.join(g_outdir, fn)
-       
-       return '%ipt' % dims[0]
-
 
 def system (cmd):
        sys.stderr.write ("invoking `%s'\n" % cmd)
@@ -955,19 +951,20 @@ def get_bbox (filename):
                if m:
                        gr = map (string.atoi, m.groups ())
                        break
-
+       
        return gr
 
 def make_pixmap (name):
        bbox = get_bbox (name + '.eps')
-
+       margin = 3
        fo = open (name + '.trans.eps' , 'w')
-       fo.write ('%d %d translate\n' % (-bbox[0], -bbox[1]))
+       fo.write ('%d %d translate\n' % (-bbox[0]+margin, -bbox[1]+margin))
        fo.close ()
        
        res = 90
-       x = (bbox[2] - bbox[0]) * res / 72.
-       y = (bbox[3] - bbox[1]) * res / 72.
+
+       x = (2* margin + bbox[2] - bbox[0]) * res / 72.
+       y = (2* margin + bbox[3] - bbox[1]) * res / 72.
 
        cmd = r"""gs -g%dx%d -sDEVICE=pgm  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit | pnmtopng > %s"""
        
@@ -1187,14 +1184,31 @@ def check_texidoc (chunks):
                n.append (c)
        return n
 
+
+## what's this? Docme --hwn
+##
 def fix_epswidth (chunks):
        newchunks = []
        for c in chunks:
-               if c[0] == 'lilypond' and 'eps' in c[2]:
-                       body = re.sub (r"""\\lilypondepswidth{(.*?)}""", find_eps_dims, c[1])
-                       newchunks.append(('lilypond', body, c[2], c[3], c[4]))
-               else:
+               if c[0] <> 'lilypond' or 'eps' not in c[2]:
                        newchunks.append (c)
+                       continue
+
+               mag = 1.0
+               for o in c[2]:
+                       m  = re.match ('magnification=([0-9.]+)', o)
+                       if m:
+                               mag = string.atof (m.group (1))
+
+               def replace_eps_dim (match, lmag = mag):
+                       filename = match.group (1)
+                       dims = bounding_box_dimensions (filename)
+
+                       return '%fpt' % (dims[0] *lmag)
+       
+               body = re.sub (r"""\\lilypondepswidth{(.*?)}""", replace_eps_dim, c[1])
+               newchunks.append(('lilypond', body, c[2], c[3], c[4]))
+                       
        return newchunks
 
 
index b8d78cf76f178689d6ac4a1b00bb8a5482d790a7..eb2e55b1ab55b2e87d4659eadb287cee56c32b8f 100644 (file)
@@ -33,6 +33,12 @@ $(outdir)/%.pfb:
 
 
 
+
+
+$(outdir)/%.pfb: 
+       pktrace  $(basename $(@F))
+       mv $(basename $(@F)).pfb $(outdir)
+
 #%.afm:
 #      $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
 #      mv $@ $@.in