]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/changing-defaults.itely (Determining the grob
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 28 Mar 2004 19:55:48 +0000 (19:55 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 28 Mar 2004 19:55:48 +0000 (19:55 +0000)
property): fix references.

* lily/staff-symbol.cc (print): only add extent if non empty.
This fixes staff-container.ly.

* lily/timing-engraver.cc (initialize): init whichBar, so a score
starting with a mmrest also works.

ChangeLog
Documentation/user/changing-defaults.itely
input/test/gregorian-scripts.ly
input/test/script-priority.ly
input/test/slur-dash.ly
input/test/slur-manual.ly
input/test/staff-container.ly
lily/staff-symbol.cc
lily/timing-engraver.cc

index 7dcd7b9fba5ef8e1110f9625c44de2c7d2eee47f..40637530c0d7215c32682db929b5c6c8de24e118 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2004-03-28  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * Documentation/user/changing-defaults.itely (Determining the grob
+       property): fix references.
+
+       * lily/staff-symbol.cc (print): only add extent if non empty.
+       This fixes staff-container.ly.
+
+       * lily/timing-engraver.cc (initialize): init whichBar, so a score
+       starting with a mmrest also works.
+
        * scripts/lilypond-book.py (Lilypond_snippet.is_outdated): require
        PNG for texinfo too.
 
index 1e3a0575c268ca48a383ff64fab8b5e26e58586c..9653f281a97527a9417a372fc4c64125d7bd6e53 100644 (file)
@@ -139,7 +139,7 @@ be used for another calculation.
    @result{} #13
 @end lisp
 
-These calculations are examples of evaluations: an expression (like
+These calculations are examples of evaluations: an expression like
 @code{(* 3 4)} is replaced by its value @code{12}. A similar thing
 happens with variables. After defining a variable  
 
@@ -213,8 +213,10 @@ a quote. For example,
 
 We have been using lists all along.  A calculation, like @code{(+ 1
 2)} is also a list (containing the symbol @code{+} and the numbers 1
-and 2). For entering lists, use a quote @code{'} and for
-calculations, do not use a quote. 
+and 2). Normally lists are interpreted as calculations, and the Scheme
+interpreter substitutes the outcome of the calculation. To enter a
+list, we stop evaluation. This is done by quoting the list with a
+quote @code{'} symbol.  For calculations, do not use a quote.
 
 Inside a quoted list or pair, there is no need to quote anymore.  The
 following is a pair of symbols, a list of symbols and a list of lists
@@ -262,7 +264,7 @@ reference, see
 Translation @arrow{} Context.
 @end ifnothtml
 
-[TODO: describe propagation]
+@c [TODO: describe propagation]
 
 
 @menu
@@ -530,9 +532,10 @@ example which removes @code{Time_signature_engraver} and
 @end lilypond
 
 In the second stave there are no time signature or clef symbols.  This
-is a rather crude method of making objects disappear, it will affect the
-entire staff. The spacing will be adversely influenced too. More
-sophisticated methods of blanking objects are shown in (TODO).
+is a rather crude method of making objects disappear, it will affect
+the entire staff. The spacing will be adversely influenced too. A more
+sophisticated methods of blanking objects is shown in @ref{Common
+tweaks}.
 
 The next example shows a practical application.  Bar lines and time
 signatures are normally synchronized across the score.  This is done
@@ -581,9 +584,9 @@ The syntax for this is
 Here @var{name} is the name of a graphical object, like @code{Stem} or
 @code{NoteHead}.  @var{property} is an internal variable of the
 formatting system (`grob property' or `layout property'). It is a
-symbol, so it must be quoted. The subsection refTODO explains what to
-fill in for @var{name}, @var{property} and @var{value}. Here we only
-discuss functionality of this command.
+symbol, so it must be quoted. The subsection @ref{Constructing a
+tweak} explains what to fill in for @var{name}, @var{property} and
+@var{value}. Here we only discuss functionality of this command.
 
 The command
 
@@ -1092,9 +1095,6 @@ If you have them, use the local HTML files.  They will load faster,
 and they are exactly matched to LilyPond version installed.
  
 
-
-@c  [TODO: revise for new site.]
-
 @node Navigating the program reference
 @subsection Navigating the program reference
 
index 9e4b8d8c2682339b0adcd67dbad01689928629e1..05b7b238ae7344218497984245d05947d3d9dc36 100644 (file)
@@ -7,6 +7,10 @@ Here is demonstrated a preliminary support of Gregorian Scripts:
 
 ictus, circulus, semicirculus, accentus, episem.
 
+"}
+
+%{
+
 TODO: augmentum.  Syntax: either as bracket (\augmentumInitium,
 \augmentumFinis), or as head prefix with subsequently collecting all
 dots and putting them behind the ligature in a vertical row.
@@ -19,7 +23,7 @@ FIXME: padding/minimum-distance is fragile.
 
 FIXME: episem stops one notehead too early.
 
-"}
+%}
 
 \include "gregorian-init.ly"
 
index d7085c49f47b0d1808b655743fb4d14f99af5523..917ce847ff7c71ad8fc901bf6af4a83121d48a9a 100644 (file)
@@ -3,7 +3,12 @@
 
 \header { texidoc = "@cindex Script Priority
 Relative placements of different script types can be controlled
-by overriding @code{script-priority}. "
+by overriding @code{script-priority}.
+
+In this example, accidentals are put either below or above other
+script symbols.
+
+"
 }
 
 
@@ -11,13 +16,13 @@ by overriding @code{script-priority}. "
     \context Staff \notes \relative g''{
        
        \override Score.TextScript  #'script-priority = #-100
-       a4^\prall^\markup \fontsize #-2 \semisharp
+       a4^\prall^\markup { \sharp }
 
        
        \override Score.Script  #'script-priority = #-100
        \revert Score.TextScript #'script-priority
        
-       a4^\prall^\markup \fontsize  #-2 \semisharp
+       a4^\prall^\markup { \sharp }
     }
        \paper { raggedright = ##t} 
 }
index c428b7ba58099e190bc3777e9ff6f8b055ce500d..208fb09731f4f515218ed9660a5dabdd279655b0 100644 (file)
@@ -4,7 +4,7 @@ The appearance of slurs may be changed from solid to dotted or dashed.
 "
 } 
 \score{
-       \notes{
+       \notes\relative c'{
                c( d e  c) |
                \slurDotted
                c( d e  c) |
@@ -16,10 +16,6 @@ The appearance of slurs may be changed from solid to dotted or dashed.
                c( d e  c) |
        }
        \paper{ raggedright=##t }
-%            indent = 0.0\pt
-               %for broken!
-               % linewidth= 30.\mm
-%      }
 }
 
 
index 9576ad0f9624d5f25c45a96f4fb6944f97bf8afd..cf84ae8278f2d5a6be07fe2012664edaed38d743 100644 (file)
  
     }
 
-%% This slur does not look good. Looks like there have not been a line 
-%% break at some point, it is then added, but the slur does not break 
-%% in the case of a line break. -HJJ
+\score {
+    \notes \new PianoStaff
+    <<
+       \context Staff = up {
+           \clef bass
+           s1 * 4
+       } 
+       \context Staff = down \relative c <<
+           s1*4
+           {
+           \clef bass
+           r4 r8
+           \once\override Slur  #'extra-offset = #'(0 . -8)
+           \once\override Slur  #'control-points =
+           #'((0 . -4) (2 . 0) (60 . 0) (63 . 4))
+           c8( as' f c' as
+
+           % line breaks will mess up this example  
+           \noBreak
+           f c as' f
+           \change Staff = up
+           \clef treble
+           c' as f' c
+           \noBreak
+           as' f c' as
+           f' c as' f c'4)
+       }>>
+    >>
+    \paper { raggedright = ##t }
+}
 
-\score {\notes \new PianoStaff  <<
-    \context Staff = up { \clef bass s1 * 6 } 
-    \context Staff = down \relative c {
-       \clef bass
-       r4 r8
-       \once\override Slur  #'extra-offset = #'(0 . -8)
-       \once\override Slur  #'control-points =
-       #'((0 . -4) (2 . 0) (60 . 0) (63 . 4))
-                          c8( as' f c' as f c as' f
-                          \change Staff = up
-                          \clef treble
-                          c' as f' c as' f c' as
-                          f' c as' f c'4)
-                          }>>
-\paper { raggedright = ##t }
-    }
index 30775bf0f7e66bf4f43099641e05cf229b436fce..694858a47e3c3d03c47a11e802a5090962324254 100644 (file)
@@ -20,7 +20,7 @@ what you would expect.)
 
 
 \score  {
- \notes \relative c'' <<
   \notes \relative c'' <<
        \new StaffContainer {
 
            %% need << >>, otherwise we descend to the voice inside SA  
@@ -34,33 +34,33 @@ what you would expect.)
            << \context Staff { e d f \bar ":|" } >>
            \skip 4
        }
- >>
   >>
 
-\paper {
+    \paper {
        \context {
-               \ScoreContext
-               \accepts StaffContainer
-               \denies Staff
+           \ScoreContext
+           \accepts StaffContainer
+           \denies Staff
        }
        \context {
-               \type Engraver_group_engraver
-               \consists Clef_engraver
-               \consists Time_signature_engraver
-               \consists Separating_line_group_engraver
-               \consistsend "Axis_group_engraver"
-               \accepts "Staff"
-               
-               \name StaffContainer
+           \type Engraver_group_engraver
+           \consists Clef_engraver
+           \consists Time_signature_engraver
+           \consists Separating_line_group_engraver
+           \consistsend "Axis_group_engraver"
+           \accepts "Staff"
+           
+           \name StaffContainer
        }
        \context {
-               \StaffContext
-               \remove Axis_group_engraver
-               \remove Separating_line_group_engraver
-               \remove Clef_engraver
-               \remove Time_signature_engraver
+           \StaffContext
+           \remove Axis_group_engraver
+           \remove Separating_line_group_engraver
+           \remove Clef_engraver
+           \remove Time_signature_engraver
        }
        raggedright=##t
-}
+    }
 }
 
 
index a3b02ef731b596b748fd74b745d6c38c6ff26f82..616cf613e90b6f07a313b4ae14c7a7825bb46b15 100644 (file)
@@ -55,10 +55,10 @@ Staff_symbol::print (SCM smob)
        {
          Item * x = sp->get_bound (d);
 
-         if (x->break_status_dir ())
-           span_points[d] = x->relative_coordinate (common , X_AXIS);
-         else
-           span_points[d] = x->extent (common, X_AXIS)[d];
+         span_points[d] = x->relative_coordinate (common , X_AXIS);
+         if (!x->break_status_dir ()
+             && !x->extent (x, X_AXIS).is_empty ())
+           span_points[d] += x->extent (x, X_AXIS)[d];
        }
     }
   while (flip (&d) !=LEFT);
index 2bf0e5f6527184024817b542340b1d7e03aa22d2..78b56d44a927c5486dd328352fa8c35ef3fd04ec 100644 (file)
@@ -22,6 +22,7 @@ protected:
   Moment last_moment_;
   
   virtual void start_translation_timestep ();
+  virtual void initialize ();
   virtual void stop_translation_timestep ();
 
 public:
@@ -35,6 +36,22 @@ Timing_engraver::Timing_engraver ()
 }
 
 
+void
+Timing_engraver::initialize ()
+{
+  Timing_translator::initialize ();
+  
+  SCM which = get_property ("whichBar");
+  Moment now = now_mom ();
+  
+  /* Set the first bar of the score? */
+  if (!gh_string_p (which))
+    which = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
+      ? SCM_EOL : scm_makfrom0str ("|");
+
+  daddy_context_->set_property ("whichBar", which);
+}
+
 
 void
 Timing_engraver::start_translation_timestep ()
@@ -47,9 +64,7 @@ Timing_engraver::start_translation_timestep ()
 
   /* Set the first bar of the score? */
   if (!gh_string_p (which))
-    which
-      = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
-      ? SCM_EOL : scm_makfrom0str ("|");
+    which = SCM_EOL;
 
   Moment mp = measure_position ();
   bool start_of_measure = (last_moment_.main_part_ != now.main_part_