From: hanwen Date: Mon, 15 Jul 2002 18:24:57 +0000 (+0000) Subject: * lily/side-position-interface.cc (general_side_position): X-Git-Tag: release/1.5.71~144 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a47edaa96780b567d1229757b1e3d3d8b0716393;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 34cb2665ff..40221f33ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2002-07-15 Han-Wen Nienhuys + + * 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 * lily/paper-column.cc (before_line_breaking): urg. bugfix. diff --git a/Documentation/index.texi b/Documentation/index.texi index d626d01d59..6bdfede5f9 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -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 diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index f9db585b58..2eab4bdaa1 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -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. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index dce5be137f..7f7f7007a3 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -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 diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 61329cb14f..9b9575f599 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -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 diff --git a/input/regression/clefs.ly b/input/regression/clefs.ly index e14a7b18d0..d89370cb16 100644 --- a/input/regression/clefs.ly +++ b/input/regression/clefs.ly @@ -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 "||" diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index edefc20fb2..9a0ab1fec3 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -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") diff --git a/lily/beam.cc b/lily/beam.cc index 09f25efa83..7c40e0758f 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -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) { diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 75de5c144c..b45775ff78 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -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; } diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index ecc90465cc..5457c66638 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -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 (); diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 1c9b34e4a3..7117d64e2f 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -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)) { diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index b3f76b243d..d46715e8b5 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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" diff --git a/mf/GNUmakefile b/mf/GNUmakefile index f8cbfc0f6a..c5f0567b9a 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -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)/ diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 606a61a079..34ab83d280 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -570,6 +570,8 @@ (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 )))) )) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index b40542f215..ed886a4486 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -482,6 +482,10 @@ output_dict= { 'output-verbatim': r'''
 %s
 
''', + 'output-small-verbatim': r'''
+%s
+
''', + ## Ugh we need to differentiate on origin: ## lilypond-block origin wants an extra

, 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 ('&', '&', body) body = re.sub ('>', '>', body) body = re.sub ('<', '<', 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)