]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/parser.yy (sup_quotes): use '\'' for sup_quotes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 11 Oct 2002 23:02:55 +0000 (23:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 11 Oct 2002 23:02:55 +0000 (23:02 +0000)
* lily/break-align-interface.cc (do_alignment): right-edge spacing
key adds space at the end of line.

ChangeLog
Documentation/user/invoking.itexi
Documentation/user/refman.itely
Documentation/user/tutorial.itely
lily/break-align-interface.cc
lily/lexer.ll
lily/parser.yy
scm/grob-description.scm
scm/translator-property-description.scm

index 7c4bd76ae0ef5932496a0f7f391f508a4fabff1b..43ce9539733c95792001122861b239e3e1c8a322 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-12  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/parser.yy (sup_quotes): use '\'' for sup_quotes.
+
+       * lily/break-align-interface.cc (do_alignment): right-edge spacing
+       key adds space at the end of line. 
+
 2002-10-11  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/sketch.scm: Fix beams.
@@ -26,7 +33,7 @@
        cloning from lexer.
 
        * scm/music-functions.scm (make-multi-measure-rest): move mmrest
-       logic out of the parser.
+       logic out of the parser. Add bar checks on both ends.
 
        * Documentation/user/refman.itely (Multi measure rests): add more
        notes about mm rests.
index eeba2e1737a3d95a077bbb5374f1ff2153c213c7..b6d34c0a33af2f5a5b0aff81f660ff68e4e4feff 100644 (file)
@@ -297,7 +297,8 @@ Show the warranty with which GNU LilyPond comes. (It comes with
 @subsection Titling layout
 
 Ly2dvi extracts the following header fields from the LY files to
-generate titling:
+generate titling. An example demonstrating all these fields is in
+@file{input/test/ly2dvi-testpage.ly}.
 
 @table @code
 @item title
index 9e05bb9b1e785276623a823fd8f7283365c35cd7..787d21dcd416310cd4e654cdc0aadc4653cdd420 100644 (file)
@@ -4472,6 +4472,8 @@ example of those is in @file{input/test/cue-notes.ly}.
 @cindex cue notes
 @cindex font size
 @cindex size
+@cindex symbol size
+@cindex glyph size
 
 The font used for printing a object can be selected by setting
 @code{font-name}, e.g.
@@ -4715,6 +4717,8 @@ are chosen whenever the page gets full.
 @cindex distance between staves
 @cindex staff distance
 @cindex between staves, distance
+@cindex staffs per page
+
 
 The height of each system is determined automatically by lilypond, to
 keep systems from bumping into each other, some minimum distances are
index 36540af6d52e17fcf11cc60938f1483bc532bed6..00754151b41a82a911badc07878fa972a1017ef5 100644 (file)
@@ -1691,6 +1691,16 @@ will be at the left.
 @}
 @end example
 
+TODO:
+@example
+
+scoreA = \score @{ \deelA  @}
+scoreB = \score @{ \deelA  @}
+
+% \score @{ \scoreA @}
+\score @{ \scoreB @}
+
+@end example
 
 @separate
 @example 
index 9bf4e4503a22ce4e6eb0f0fd818bf2ee5a27020b..edcc77c730193e9476e4ad4c1b5b3c653d43e07f 100644 (file)
@@ -76,14 +76,16 @@ Break_align_interface::do_alignment (Grob *me)
     = Pointer_group_interface__extract_grobs (me, (Grob*)0,
                                                 "elements");
   Array<Interval> extents;
-  
+
+  int last_nonempty = -1; 
   for (int i=0; i < elems.size (); i++) 
     {
       Interval y = elems[i]->extent (elems[i], X_AXIS);
       extents.push (y);
+      if (!y.empty_b())
+       last_nonempty = i; 
     }
 
-
   int idx  = 0;
   while (idx < extents.size  () && extents[idx].empty_b ())
     idx++;
@@ -94,27 +96,36 @@ Break_align_interface::do_alignment (Grob *me)
     offsets[i] = 0.0;
 
 
+  Real extra_right_space = 0.0;
   int edge_idx = -1;
-  while (idx < elems.size() - 1)
+  while (idx < elems.size())
     {
       int next_idx = idx+1;
       while (next_idx < elems.size() &&
             extents[next_idx].empty_b()
-            && next_idx != elems.size() -1 )
+           )
        next_idx++;
       
       Grob *l = elems[idx];
-      Grob *r = elems[next_idx];
+      Grob *r = 0;
+
+      if (next_idx < elems.size())
+       r = elems[next_idx];
 
       SCM alist = SCM_EOL;
 
+
+      /*
+       Find the first grob with a space-alist entry.
+       */
       for (SCM s= l->get_grob_property ("elements");
           gh_pair_p (s) ; s = gh_cdr (s))
          {
            Grob *elt = unsmob_grob (gh_car (s));
 
            if (edge_idx < 0
-               && elt->get_grob_property ("break-align-symbol") == ly_symbol2scm( "left-edge"))
+               && elt->get_grob_property ("break-align-symbol")
+               == ly_symbol2scm( "left-edge"))
              edge_idx = idx;
            
            SCM l =elt->get_grob_property ("space-alist");
@@ -125,25 +136,21 @@ Break_align_interface::do_alignment (Grob *me)
              }
          }
 
-      SCM rsym = SCM_EOL;
+      SCM rsym = r ? SCM_EOL : ly_symbol2scm ("right-edge");
 
       /*
        We used to use #'cause to find out the symbol and the spacing
        table, but that gets icky when that grob is suicided for some
        reason.
       */
-       for (SCM s = r->get_grob_property ("elements");
-            gh_pair_p (s); s = gh_cdr (s))
-         {
-           Grob * elt =unsmob_grob(gh_car (s));
+      for (SCM s = r ? r->get_grob_property ("elements") : SCM_EOL;
+          !gh_symbol_p (rsym) && gh_pair_p (s); s = gh_cdr (s))
+       {
+         Grob * elt =unsmob_grob(gh_car (s));
 
-           SCM sym = elt->get_grob_property ("break-align-symbol");
-           if (gh_symbol_p (sym))
-             {
-               rsym = sym;
-               break;
-             }
-         }
+         rsym = elt->get_grob_property ("break-align-symbol");
+       }
+       
       if (rsym  == ly_symbol2scm("left-edge"))
        edge_idx = next_idx;
 
@@ -178,15 +185,21 @@ Break_align_interface::do_alignment (Grob *me)
          type = gh_car (entry) ;
        }
 
-      if (type == ly_symbol2scm ("extra-space"))
-       offsets[next_idx] = extents[idx][RIGHT] + distance;
-      else if (type == ly_symbol2scm("minimum-space"))
-       offsets[next_idx] = extents[idx][RIGHT] >? distance;
+      if (r)
+       {
+         if (type == ly_symbol2scm ("extra-space"))
+           offsets[next_idx] = extents[idx][RIGHT] + distance;
+         else if (type == ly_symbol2scm("minimum-space"))
+           offsets[next_idx] = extents[idx][RIGHT] >? distance;
+       }
+      else
+       {
+         extra_right_space = distance;   
+       }
       
       idx = next_idx;
     }
 
-
   Real here = 0.0;
   Interval total_extent;
 
@@ -201,7 +214,9 @@ Break_align_interface::do_alignment (Grob *me)
 
 
   if (item->break_status_dir () == LEFT)
-    alignment_off = -total_extent[RIGHT];
+    {
+      alignment_off = - total_extent[RIGHT] - extra_right_space;
+    }
   else if (edge_idx < 0)
     alignment_off = -total_extent[LEFT];
 
index ab2f85714f186f315dedabfcd4be9f8bbb2794fe..88dd1a9ac18363d4aee366c046fddae51939f9fa 100644 (file)
@@ -154,7 +154,7 @@ HYPHEN              --
 }
 <version>\"[^"]*\"     { /* got the version number */
        String s (YYText ()+1);
-       s = s.left_string (s.index_last ('"'));
+       s = s.left_string (s.index_last ('\"'));
 
        yy_pop_state ();
        if (!valid_version_b (s))
@@ -701,7 +701,7 @@ scan_fraction (String frac)
        int d = String_convert::dec2int (right);
        return gh_cons (gh_int2scm (n), gh_int2scm (d));
 }
-               
+#if 0          
 /* avoid silly flex induced gcc warnings */
 static void yy_push_state (int) {;}
 static void yy_pop_state () {;}
@@ -718,3 +718,4 @@ avoid_silly_flex_induced_gcc_warnings ()
        yy_top_state ();
        avoid_silly_flex_induced_gcc_warnings ();
 }
+#endif
index f65f42816242cb51305682c9563e12943628cd7c..9bb82de2711f40d18ac2745dfa248a3d575da7a0 100644 (file)
@@ -1436,10 +1436,10 @@ verbose_event:
        ;
 
 sup_quotes:
-       "'" {
+       '\'' {
                $$ = 1;
        }
-       | sup_quotes "'" {
+       | sup_quotes '\'' {
                $$ ++;
        }
        ;
@@ -2146,7 +2146,7 @@ void
 My_lily_parser::set_yydebug (bool )
 {
 #if 0
-       yydebug = b;
+       yydebug = 1;
 #endif
 }
 
@@ -2155,7 +2155,6 @@ extern My_lily_parser * current_parser;
 void
 My_lily_parser::do_yyparse ()
 {
-
        current_parser = this;;
        yyparse ((void*)this);
 }
index 3a3672897106d11e200a2bf4d6b2fbfc230d4ba5..0c45295e217f4f254f5fc393b9f8d79783e34031 100644 (file)
@@ -78,6 +78,7 @@
                        (custos . (minimum-space . 2.0))
                        (clef .   (minimum-space . 1.0))
                        (first-note . (extra-space . 1.3))
+                       (right-edge . (extra-space . 0.0))
                        ))
 
        ;;
        (font-family . ancient)
        (space-alist . (
                        (first-note . (minimum-space . 0.0))
+                       (right-edge . (extra-space . 0.1))
                        ))
        (meta . ((interfaces
                  . (custos-interface staff-symbol-referencer-interface
                        (breathing-sign . (minimum-space  . 0.0))
                        (clef . (extra-space . 1.0))
                        (first-note . (extra-space . 1.0))
+                       (right-edge . (extra-space . 0.0))
                        (key-signature . (extra-space . 0.0))
                        ))
        (meta . ((interfaces . (break-aligned-interface item-interface ))))
        (break-visibility . ,all-visible)
        (space-alist . (
                        (first-note . (extra-space . 2.0))
+                       (right-edge . (extra-space . 0.8))
                        (staff-bar .  (minimum-space . 2.0))
                        ))
        (breakable . #t)
index 9d55aa3ce779628b98c41ff3f78086c2dae567dc..51798c329ab79f1a9477e83421f10db40fd04a8d 100644 (file)
@@ -114,7 +114,7 @@ file @file{lyrics-multi-stanza.ly}.
 ")
 
 (translator-property-description 'automaticMelismata boolean? " If
-set, \addlyrics will assume that beams, slurs and ties signal
+set, \\addlyrics will assume that beams, slurs and ties signal
 melismata, and align lyrics accordingly.
 ")
 
@@ -188,7 +188,7 @@ Staff.defaultBarType will have no effect.
 @table @samp
 @item (), or unset
 Behave in normal way: remove one set of grobs when in unisolo.
-@item allways:
+@item always:
 Remove any grob that comes along.
 @item never:
 Do nothing.
@@ -198,7 +198,7 @@ Do nothing.
 @table @samp
 @item (), or unset
 Behave in normal way: remove spanners when in unisolo.
-@item allways:
+@item always:
 Remove any spanners that come along.
 @item never:
 Do nothing.