]> git.donarmstrong.com Git - lilypond.git/commitdiff
juergen, heikki, chris patch.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Apr 2002 11:58:59 +0000 (11:58 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Apr 2002 11:58:59 +0000 (11:58 +0000)
14 files changed:
ChangeLog
VERSION
input/mozart-hrn-3.ly
input/mozart-hrn3-romanze.ly
lily/include/my-lily-parser.hh
lily/lexer.ll
lily/parser.yy
lily/staff-symbol.cc
lilypond-indent.el
lilypond-mode.el
ly/engraver-init.ly
make/lilypond-vars.make
scm/grob-description.scm
scm/grob-property-description.scm

index ca396a11e759d1098c573d1a8968cdc8e5c1fd33..5c3b9694396b06d6ce434e827ce82215e8d66739 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2002-04-16  Heikki Junes <hjunes@cc.hut.fi>
+
+       * lilypond-mode.el: "C-c f" does font-lock-fontify-buffer.
+
+2002-04-15  Juergen Reuter  <reuter@ipd.uka.de>
+
+       * scm/grob-description.scm, lily/staff-symbol.cc: added properties
+       to control width of staff symbol in ragged-right mode (by request
+       of Han-Wen)
+
+       * ly/engraver-init.ly, lily/include/my-lily-parser.hh,
+       lily/include/ligature-bracket.hh, lily/lexer.ll, lily/parser.yy,
+       lily/ligature-bracket.cc, lily/ligature-bracket-engraver.cc:
+       added support for ligature brackets (needed when transcribing
+       mensural music)
+
 2002-04-15  Heikki Junes <hjunes@cc.hut.fi>
 
        * lilypond-font-lock.el: Handle scheme-slurs up to seventh level.
diff --git a/VERSION b/VERSION
index e0fc8089cc9b76c21815ea97ec105b23bc641fa7..c6813374c0f6c1fb9703ff9009d29595a65fa354 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=52
-MY_PATCH_LEVEL=hjj3
+MY_PATCH_LEVEL=hjj4
 
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index 044c5b6c9a16ba735fd4d288a23f60ee2e1586b6..f55d7d328b82b77be763335956a44b68a9a8527e 100644 (file)
@@ -30,56 +30,6 @@ virtuoso that taught in Geneva.
 %}
 
 
-% #(set! point-and-click line-column-location)
-
-longgrace = \property Voice.Stem \override #'flag-style = #'()
-endlonggrace = \property Voice.Stem \revert #'flag-style
-ritenuto = \textscript #'(italic  "rit.")
-
-\version "1.5.47"
-
-#(define italic-bf '((font-shape . italic) (font-series . bold)))
-
-%% burp
-%% the very idea of a style sheet, is that it's easy to override
-#(define (set-style! sheet name style)
-  (set-cdr! (assoc 'mark-letter (cdr (assoc 'style-alist sheet))) style))
-
-#(define my-sheet (make-style-sheet 'paper20))
-#(set-style! my-sheet 'mark-letter '((font-family . roman)
-                                    (font-series . bold)
-                                    (font-shape . upright)
-                                    (font-relative-size . 3)))
-  
-cresc = \notes {
-    \commandspanrequest \start "crescendo" 
-    \property Voice.crescendoText = #`(,italic-bf "cresc.")
-    \property Voice.crescendoSpanner = #'dashed-line
-}
-
-\paper{
-    \stylesheet #my-sheet
-    \translator {
-       \ScoreContext
-       skipBars = ##t
-       midiInstrument = #"french horn"
-       %% try to mimic Breitkopf
-       RehearsalMark \override #'padding = #1
-       MultiMeasureRest \override #'padding = #0.5
-       MultiMeasureRest \override #'number-threshold = #1
-       
-       Beam \override #'thickness = #0.6
-       Beam \override #'beam-space = #0.8
-       Slur \override #'beautiful = #0.3
-    }
-    \translator {
-       \StaffContext
-       MinimumVerticalExtent = #'(-4.5 . 4.5)
-    }
-    indent = 10. \mm
-    linewidth = 189. \mm
-}
-
 \include "mozart-hrn3-allegro.ly"
 \include "mozart-hrn3-romanze.ly"
 \include "mozart-hrn3-rondo.ly"
index c6dccf0f548a5b363d64a9ddc1ba2cd6a2aba229..43491a17df425d59e880c1a2e22b93911a137786 100644 (file)
@@ -1,5 +1,6 @@
 
 \version "1.3.146"
+\include  "mozart-hrn3-defs.ly"
 
 romanze = \notes \relative c' {
        \key f \major
index 47b85c5799d64e5a52cee7212a55e557a01c7777..979fd0bfe1b24a3ed4b58c2abf354667666a4471 100644 (file)
@@ -51,7 +51,9 @@ public:
 
   SCM last_beam_start_;
   void beam_check (SCM); 
-  
+
+  SCM last_ligature_start_;
+
   Input here_input () const;
   void push_spot ();
   Input pop_spot ();
index 423e437b20340db07d1069cbe41325d6a13ddff4..fef2c28b82c61676b074722906a3ddd5dc155a18 100644 (file)
@@ -460,6 +460,10 @@ HYPHEN             --
        return E_OPEN;
     case ')':
        return E_CLOSE;
+    case '[':
+       return E_LEFTSQUARE;
+    case ']':
+       return E_RIGHTSQUARE;
     case '~':
        return E_TILDE;
     case '\\':
index ae165c9c218afdb04f7fa771f6a1b7efaf991662..cc0c23b87f8f2bff6aefd1e789bffa0553c4ad74 100644 (file)
@@ -244,7 +244,8 @@ yylex (YYSTYPE *s,  void * v_l)
 %token REST
 
 /* escaped */
-%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE E_TILDE
+%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
+%token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE
 %token E_BACKSLASH
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET
 %token FIGURE_SPACE
@@ -1238,6 +1239,19 @@ shorthand_command_req:
                b->set_mus_property ("span-type", ly_str02scm ("beam"));
                $$ = b;
        }
+       | E_LEFTSQUARE {
+               Span_req *b = new Span_req;
+               b->set_span_dir (START);
+               b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+               $$ = b;
+               THIS->last_ligature_start_ = b->self_scm ();
+       }
+       | E_RIGHTSQUARE {
+               Span_req *b = new Span_req;
+               b->set_span_dir (STOP);
+               b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+               $$ = b;
+       }
        | BREATHE {
                $$ = new Breathing_sign_req;
        }
index 75bb907c140514249a99f57a561e2f84b9d3d714..5f5d916118b6771ac1c5db0d18f5987abcfa68e0 100644 (file)
@@ -13,6 +13,7 @@
 #include "debug.hh"
 #include "item.hh"
 #include "staff-symbol.hh"
+#include "staff-symbol-referencer.hh"
 #include "spanner.hh"
 
 
@@ -27,23 +28,38 @@ Staff_symbol::brew_molecule (SCM smob)
   Grob * common
     = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
   
-  bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+  bool paper_raggedright = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+  bool grob_raggedright = to_boolean (me->get_grob_property ("ragged-right"));
   Real width;
-  if (ragged)
+
+  SCM width_scm = me->get_grob_property ("width");
+  if (gh_number_p (width_scm)) // user-defined width
     {
-      // *prevent* staff symbol from being ragged right
       width =
-       me->paper_l ()->get_var ("linewidth")
-       - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
-       ;
+       gh_scm2double (width_scm) *
+       Staff_symbol_referencer::staff_space (me);
     }
-  else
+  else // determine width automatically
     {
-      width =
-       // right_shift     - left_shift
-       + sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS)
-       - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
-       ;
+      if (paper_raggedright && !grob_raggedright)
+       {
+         // *prevent* staff symbol from being ragged right; instead, use
+         // paper variable "linewidth"
+         width = me->paper_l ()->get_var ("linewidth");
+       }
+      else // determine width from my own bounds
+       {
+         width = sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS);
+       }
+    }
+
+  // respect indentation, if any
+  width -= sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS);
+
+  if (width < 0)
+    {
+      warning (_f ("staff symbol: indentation yields beyond end of line"));
+      width = 0;
     }
 
   Real t = me->paper_l ()->get_var ("linethickness");
index 06cfd50e3a4ec55b5cd29d9059db1876ed37b5f8..4e11faae60d050b74098481dec23e210a7de4d6e 100644 (file)
@@ -255,7 +255,7 @@ Argument LIM limit."
 ;; are handled by the syntax table
 
 (defconst LilyPond-parens-regexp-alist
-  `( ( ?>  .  ("[^\\]<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
+  `( ( ?>  .  ("\\([^\\]\\|^\\)<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
      ;; a b c->, a b c^> and a b c_> are not close-angle-brackets, they're accents
      ;; but a b c^-> and a b c^^> are close brackets with tenuto/marcato before them
      ;; also \> and \< are hairpins
index 1e93d4cbcdbd0b9726b6b8810fd68b5f41682b87..54efc565dcdcd740cba1b04db791eed7b8180946 100644 (file)
@@ -509,6 +509,7 @@ command."
   (define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view)
   (define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps)
   (define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-next-midi)
+  (define-key LilyPond-mode-map "\C-cf" 'font-lock-fontify-buffer)
   (define-key LilyPond-mode-map "\C-cn" 'LilyPond-insert-tag-notes)
   (define-key LilyPond-mode-map "\C-cs" 'LilyPond-insert-tag-score)
   (define-key LilyPond-mode-map "\C-c:" 'LilyPond-un-comment-region)
@@ -604,7 +605,8 @@ command."
          '(("Miscellaneous"
             ["Uncomment Region" LilyPond-un-comment-region t]
             ["Comment Region" comment-region t]
-            ))
+            ["Refontify buffer" font-lock-fontify-buffer t]
+            ))
          ))
 
 (defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *="
index 08bc3fd78055835d4ce455075733874ed4ec933e..60c6bd9725400e669c13c04ce94830ba0bf02c4d 100644 (file)
@@ -131,7 +131,8 @@ VoiceContext = \translator {
        \consists "Arpeggio_engraver"
        \consists "Multi_measure_rest_engraver"
        \consists "Text_spanner_engraver"
-       
+
+       \consists "Ligature_bracket_engraver"
        \consists "Breathing_sign_engraver"
        % \consists "Rest_engraver"
        \consists "Stem_engraver"
index b7ddebfa75bde44071a103398d23fab908348630..d4af8034254559c685b889b2efeb9a263f7f0edd 100644 (file)
@@ -37,7 +37,7 @@ ABC2LY = $(script-dir)/abc2ly.py
 CONVERT_LY = $(script-dir)/convert-ly.py
 LILYPOND = $(depth)/$(builddir)/lily/$(outconfbase)/lilypond
 LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/out
+LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/out -I $(topdir)/mf/$(outdir)/
 LY2DVI = $(script-dir)/ly2dvi.py
 LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py
 PS_TO_GIFS = $(buildscript-dir)/ps-to-gifs.sh
index 2e848c7cdc3f67ece6948f895d4caf7c88ee9774..7bcdb1182fe45b5e1d0005e8709da5c80adbf5fd 100644 (file)
        (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface))))
        ))
 
+    (LigatureBracket
+     . (
+       (width . 0.75)
+       (height . 0.5)
+       (molecule-callback . ,Ligature_bracket::brew_molecule)
+       (meta . ((interfaces . (ligature-bracket-interface))))
+       ))
 
     (LyricHyphen
      . (
      . (
        (molecule-callback . ,Staff_symbol::brew_molecule)
        (line-count . 5)
+       (ragged-right . #f)
        (layer . 0)
        (meta . ((interfaces . (staff-symbol-interface))))
        ))
index b44ba232d515b0748966f67f3bb3d942f21480ce..98ef948989114b733e2cb2e48b4f332101e87f10 100644 (file)
@@ -271,6 +271,7 @@ as a real penalty.")
 
 (grob-property-description 'pitches list? "list of musical-pitch.")
 (grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
+(grob-property-description 'ragged-right boolean? "In ragged alignment mode (i.e. if paper variable @code{raggedright} is set), rag staff symbols only if this staff symbol grob property is also set.")
 (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
 (grob-property-description 'right-padding number? "space right of accs.")
 (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")