]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/side-position-interface.cc (general_side_position):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Jul 2002 18:24:57 +0000 (18:24 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Jul 2002 18:24:57 +0000 (18:24 +0000)
Subtract parent offset iso. adding it. (Huh? How could this have
worked?)

* lily/clef-engraver.cc (stop_translation_timestep): add staff to
OctavateEight support.

* scripts/lilypond-book.py: add smallverbatim option.

* lily/beam.cc (quanting): bugfix. Behave sanely when no visible
stems.

* lily/accidental-placement.cc (position_accidentals): add padding
property. Increase default setting to 0.2.

15 files changed:
ChangeLog
Documentation/index.texi
Documentation/user/lilypond-book.itely
Documentation/user/refman.itely
Documentation/user/tutorial.itely
input/regression/clefs.ly
lily/accidental-placement.cc
lily/beam.cc
lily/clef-engraver.cc
lily/include/spanner.hh
lily/side-position-interface.cc
ly/engraver-init.ly
mf/GNUmakefile
scm/grob-description.scm
scripts/lilypond-book.py

index 34cb2665ff88c26fc83501e85e1c50a859bccbeb..40221f33ad2fc0b19e98e38adc957c281a5e6465 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2002-07-15  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/side-position-interface.cc (general_side_position):
+       Subtract parent offset iso. adding it. (Huh? How could this have
+       worked?)
+
+       * lily/clef-engraver.cc (stop_translation_timestep): add staff to
+       OctavateEight support.
+
+       * scripts/lilypond-book.py: add smallverbatim option.
+
+       * lily/beam.cc (quanting): bugfix. Behave sanely when no visible
+       stems.
+
+       * lily/accidental-placement.cc (position_accidentals): add padding
+       property. Increase default setting to 0.2. 
+
 2002-07-15  Han-Wen  <hanwen@cs.uu.nl>
 
        * lily/paper-column.cc (before_line_breaking): urg. bugfix.
index d626d01d59db6d3de058551b4a775c98e08b8aca..6bdfede5f91aa30f7209426956271b8714cd333f 100644 (file)
@@ -95,8 +95,9 @@ The reference manual.
 
 @item @uref{../user/out-www/lilypond/lilypond.html,lilypond} The complete
 user manual, (in @uref{../user/out-www/lilypond.ps.gz,PostScript} and
-@uref{../user/out-www/lilypond.pdf,PDF}). This
-manual contains among others the tutorial, the reference manual.
+@uref{../user/out-www/lilypond.pdf,PDF}). This manual contains among
+others the tutorial, the reference manual.  The HTML version is also
+available as @uref{../user/out-www/lilypond.html,one big page}.
 
 @c glossary maybe for new users?
 @item @uref{../user/out-www/glossary.html,glossary} A glossary of musical
index f9db585b58cc576b5cf9a74e5c7752dd3f58e743..2eab4bdaa15dc1344bc34a5c080a2df2187948e0 100644 (file)
@@ -168,7 +168,10 @@ smaller music font size (eg. 11 pt or 13 pt)
     the short version of the lilypond blocks:
 
     @code{ @@lilypond@{ CONTENTS @} } and @code{ \lilypond@{ CONTENTS @} }
-    
+
+@item smallverbatim
+      like @code{verbatim}, but in a smaller font.
+
 @item intertext="@var{text}"
     Used in conjunction with @code{verbatim} option: this puts
 @var{text} between the code and the music.
index dce5be137f9acb346eb8daa20d9e0427958e8da6..7f7f7007a30c317a8e83af01a4f824733269cd0c 100644 (file)
@@ -1774,8 +1774,8 @@ example is shown here with timing tuples.
 
 @lilypond[]
 \score { \notes \relative c''{ 
-  c4^"(0,0)"  \grace c16_"(1/4,-1/16)"  c4^"(1/4,0)"  \grace {
-  [c16_"(2/4,-1/8)"  d16^"(2/4,-1/16)" ] } c4_"(2/4,0)"
+  c4^"(0,0)"  \grace c16_" "_"(1/4,-1/16)"  c4^"(1/4,0)"  \grace {
+  [c16_"(2/4,-1/8)"  d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
   }
 \paper {  linewidth = 8.\cm }
 }
@@ -1793,8 +1793,8 @@ The placement of these grace notes is synchronized between different
 staffs, using this grace timing.
 
 @lilypond[relative=2,verbatim,fragment] 
-\context Staff = SA { e4 \grace { c16 d e f } e4 }
-\context Staff = SB { c4 \grace { g8 b } c4 }
+\context Staff = SA { e4 \grace { c16 d e f } e4 }
+  \context Staff = SB { c4 \grace { g8 b } c4 } >
 @end lilypond
 
 
@@ -1823,7 +1823,7 @@ Grace note synchronization can also lead to surprises. Staff notation,
 such as key signatures, barlines, etc. are also synchronized. Take
 care when you mix staffs with grace notes and staffs without.
 
-@lilypond[relative=2,fragment]
+@lilypond[relative=2,verbatim,fragment]
 < \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
   \context Staff = SB { c4 \bar "|:"  d4 } >
 @end lilypond
@@ -2790,7 +2790,7 @@ the standard staff.
   \score{
     \context StaffGroup <
       \context Staff <
-        % Hide fingering number (used for string number) for the "normal" staff
+        % Hide fingering number
         \property Staff.Fingering \override #'transparent = ##t
 
         \part
index 61329cb14f478a6b29b5c80726fe4ed6c302c78f..9b9575f59920dcd27590a777d9e82056a02f20b5 100644 (file)
@@ -1664,7 +1664,7 @@ input file is a piano reduction of the G major Sinfonia by Giovanni
 Battista Sammartini.  It was composed around 1740.  It's in the source
 package under the name @file{input/tutorial/sammartini.ly}.
 
-@lilypondfile[verbatim]{sammartini.ly}
+@lilypondfile[smallverbatim]{sammartini.ly}
 
 As you can see, this example features multiple voices on one staff.  To
 make room for those voices, their notes have to be stemmed in opposite
index e14a7b18d03c53c30436d62fc5e6ef329111938b..d89370cb16c42fc7ec9b84f620c16650b633b383 100644 (file)
@@ -24,6 +24,7 @@ way, so this is fragile as well.
          \clef "baritone"c'1^"{baritone}" \bar "||"
          \clef "varbaritone"c'1^"{varbaritone}" \bar "||"
          \clef "G_8"c'1^"{sub 8?}" c'1 \bar "||"
+         \clef "F_8"c'1^"{sub 8?}" c'1 \bar "||"        
          \clef "G^8"c'1^"{sup 8?}" c'1 \bar "||"
          \clef "bass"c'1^"{bass}" \bar "||"
          \clef "subbass"c'1^"{subbass}" \bar "||"
index edefc20fb221a5584c580ba5406a3c95b138d0b3..9a0ab1fec317539dbc79556be67644ce3f892c02 100644 (file)
@@ -230,8 +230,8 @@ Accidental_placement::position_accidentals (Grob * me)
   for (int i= apes.size (); i--;)
     {
       Accidental_placement_entry * ape = apes[i];
-      ape->left_skyline_ = empty_skyline ( LEFT);
-      ape->right_skyline_ = empty_skyline ( RIGHT);
+      ape->left_skyline_ = empty_skyline (LEFT);
+      ape->right_skyline_ = empty_skyline (RIGHT);
    
       for (int j = apes[i]->grobs_.size(); j--;)
        {
@@ -286,7 +286,12 @@ Accidental_placement::position_accidentals (Grob * me)
   if (gh_number_p (rs))
     head_ape->offset_ -= gh_scm2double (rs);
 
-  Real padding = 0.1;
+  
+  Real padding = 0.2;
+  SCM spad = me->get_grob_property ("padding");
+  if (gh_number_p (spad))
+    padding = gh_scm2double (spad);
+  
   apes.push (head_ape);
   for (int i= apes.size () -1 ; i-- > 0;)
     {
@@ -351,4 +356,4 @@ Accidental_placement::position_accidentals (Grob * me)
 ADD_INTERFACE(Accidental_placement,
              "accidental-placement-interface",
              "Take care of complex accidental collisions.",
-             "left-padding right-padding accidentals alignment-done")
+             "left-padding padding right-padding accidentals alignment-done")
index 09f25efa8346ab1a2569aa15e19c68b0cf9ee278..7c40e0758f3b6a21343ab3197acffea0a5b79758 100644 (file)
@@ -759,9 +759,13 @@ Beam::quanting (SCM smob)
   Grob *fvs  = first_visible_stem (me);
   Grob *lvs  = last_visible_stem (me);
 
-  Grob *commony = fvs->common_refpoint (lvs, Y_AXIS);
-  bool xstaff=  (Align_interface::has_interface (commony));
-      
+  bool xstaff= false;
+  if (lvs && fvs)
+    {
+      Grob *commony = fvs->common_refpoint (lvs, Y_AXIS);
+      xstaff = Align_interface::has_interface (commony);
+    }
+
   for (int i = qscores.size (); i--;)
     if (qscores[i].demerits < 100)
       {
index 75de5c144c9044535bf86a6f348335c93f12d9a1..b45775ff78c7f073bc8257f728bf69a3c2f6f0c5 100644 (file)
@@ -171,14 +171,20 @@ Clef_engraver::stop_translation_timestep ()
        {
          clef_p_->set_grob_property ("break-visibility", vis);
          if (octavate_p_)
-           octavate_p_->set_grob_property ("break-visibility", vis);
+           {
+             octavate_p_->set_grob_property ("break-visibility", vis);
+
+           }
        }
       
       typeset_grob (clef_p_);
       clef_p_ =0;
 
       if (octavate_p_)
-       typeset_grob (octavate_p_);
+       {
+         Side_position_interface::add_staff_support (octavate_p_);       
+         typeset_grob (octavate_p_);
+       }
 
       octavate_p_ = 0;
     }
index ecc90465cccff35b996e0faf3735a694fa9ad3d4..5457c666381f3e71f636ffd8a0cb99d5bd396bd0 100644 (file)
@@ -54,7 +54,7 @@ public:
   static int compare (Spanner * const &,Spanner * const &);
   virtual Grob* find_broken_piece (System*) const;
   virtual SCM do_derived_mark ();
-    static bool has_interface (Grob*);
+  static bool has_interface (Grob*);
 protected:
   void set_my_columns ();
 
index 1c9b34e4a33f54f754bde5d7669e31da21f80e28..7117d64e2f1441d8c1b4ccc336131e7e14e97794 100644 (file)
@@ -105,7 +105,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Real off =  me->get_parent (a)->relative_coordinate (common, a);
   SCM minimum = me->remove_grob_property ("minimum-space");
 
-  Real total_off = dim.linear_combination (dir) + off;
+  Real total_off = dim.linear_combination (dir) - off;
   SCM padding = me->remove_grob_property ("padding");
   if (gh_number_p (padding))
     {
index b3f76b243d06a2e4f6cb540e5c121f8cfdfa8c71..d46715e8b5e22d31233b80ec635aba6e8927a53a 100644 (file)
@@ -106,7 +106,9 @@ RhythmicStaffContext=\translator{
        VoltaBracket \override #'minimum-space =  #15  % urg, in \pt
        VoltaBracket \override #'padding =  #5  % urg, in \pt
        StaffSymbol \override #'line-count = #1 
-       Stem \override #'neutral-direction = #1 
+
+       Stem \override #'neutral-direction = #1
+       Beam \override #'neutral-direction = #1         
 %      \consists "Repeat_engraver"
        \consists "Dot_column_engraver"
        \consists "Volta_engraver"
index f8cbfc0f6acd8b219d968e0dcecdbd9baf4e7a4c..c5f0567b9aa337f05d10ca467d150db38287c94a 100644 (file)
@@ -56,7 +56,7 @@ INSTALLATION_OUT_FILES3=$(TFM_FILES)
 # making pfas takes a lot of CPU time. Let's skip it for now.
 #MAKE_PFA_FILES=1
 
-PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) $(outdir)/cmbxti8.pfa
 
 ifdef MAKE_PFA_FILES
 ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale
@@ -91,3 +91,7 @@ local-clean:
 
 pfa: $(PFA_FILES)  
 
+# needed for web documentation
+$(outdir)/cmbxti8.pfa:
+       $(PKTRACE)  -I $(outdir)/ --pfa --simplify --keep-trying cmbxti8
+       mv cmbxti8.pfa $(outdir)/
index 606a61a0795ad86948013fae430bd45ab8cccc92..34ab83d2800b50da293a4ad02ae893d39fb86d54 100644 (file)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (molecule-callback . ,Text_item::brew_molecule)
        (font-shape . italic)
+       (padding . 0.4)
+       (font-relative-size . -2)
        (font-family . roman)
        (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
        ))
index b40542f215116b2a8e3319e457ada2a5d452e869..ed886a4486dfd40c68b6eef547b89f39fef4f84d 100644 (file)
@@ -482,6 +482,10 @@ output_dict= {
                  'output-verbatim': r'''<pre>
 %s
 </pre>''',
+                 'output-small-verbatim': r'''<font size=-1><pre>
+%s
+</pre></font>''',
+
                  ## Ugh we need to differentiate on origin:
                  ## lilypond-block origin wants an extra <p>, but
                  ## inline music doesn't.
@@ -508,6 +512,7 @@ output_dict= {
 ''',
                'output-verbatim': r'''\begin{verbatim}%s\end{verbatim}%%
 ''',
+               'output-small-verbatim': r'''{\small\begin{verbatim}%s\end{verbatim}}%%''',
                'output-default-post': "\\def\postLilypondExample{}\n",
                'output-default-pre': "\\def\preLilypondExample{}\n",
                'usepackage-graphics': '\\usepackage{graphics}\n',
@@ -533,6 +538,10 @@ output_dict= {
 @c generated: %(fn)s.png                 
 ''',
                  'pagebreak': None,
+                 'output-small-verbatim': r'''@smallexample
+%s
+@end smallexample
+''',
                  'output-verbatim': r'''@example
 %s
 @end example
@@ -566,14 +575,19 @@ output_dict= {
        
        }
 
-def output_verbatim (body):
+def output_verbatim (body, small):
        if __main__.format == 'html':
                body = re.sub ('&', '&amp;', body)
                body = re.sub ('>', '&gt;', body)
                body = re.sub ('<', '&lt;', body)
        elif __main__.format == 'texi':
                body = re.sub ('([@{}])', '@\\1', body)
-       return get_output ('output-verbatim') % body
+
+       if small:
+               key = 'output-small-verbatim'
+       else:
+               key = 'output-verbatim'
+       return get_output (key) % body
 
 
 #warning: this uses extended regular expressions. Tread with care.
@@ -1136,9 +1150,11 @@ def schedule_lilypond_block (chunk):
                                newbody = newbody + get_output ("output-filename") % m.group(1)
                                break
                
-       
-       if 'verbatim' in opts:
-               newbody = output_verbatim (body)
+
+       if 'smallverbatim' in opts:
+               newbody = output_verbatim (body, 1)
+       elif 'verbatim' in opts:
+               newbody = output_verbatim (body, 0)
 
        for o in opts:
                m = re.search ('intertext="(.*?)"', o)