From 3471866d047b2e22f6d42eedb936d5eddcb5a06a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 7 Aug 2002 22:45:41 +0000 Subject: [PATCH] * scm/grob-description.scm (all-grob-descriptions): set X-offset-callbacks for TextScript * lily/stem.cc (invisible_b): don't use support_head(), since it sets stem direction. * lily/beam.cc (struct Int_set): don't get stuck inserting interval segments of length 0.0. * scripts/convert-ly.py: break-align conversion. --- ChangeLog | 17 ++++++++++++++ Documentation/user/invoking.itexi | 10 +++++--- lily/a2-engraver.cc | 4 ++-- lily/accidental-engraver.cc | 16 ++++++------- lily/accidental-placement.cc | 4 ++-- lily/accidental.cc | 2 +- lily/afm.cc | 2 +- lily/ambitus.cc | 8 +++---- lily/auto-beam-engraver.cc | 6 ++--- lily/axis-group-interface.cc | 4 ++-- lily/bar-line.cc | 4 ++-- lily/beam-engraver.cc | 2 +- lily/beam-quanting.cc | 2 +- lily/beam.cc | 34 +++++++++++++-------------- lily/break-align-interface.cc | 2 +- lily/break-substitution.cc | 2 +- lily/chord-tremolo-engraver.cc | 2 +- lily/chord.cc | 18 +++++++-------- lily/clef-engraver.cc | 2 +- lily/command-request.cc | 10 ++++---- lily/stem.cc | 11 ++++++--- scm/grob-description.scm | 6 ++++- scripts/convert-ly.py | 38 +++++++++++++++++++++++++++++++ scripts/ly2dvi.py | 11 +++++++-- 24 files changed, 146 insertions(+), 71 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4143e6c1c6..3912f4f24c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2002-08-08 Han-Wen Nienhuys + + * scm/grob-description.scm (all-grob-descriptions): set + X-offset-callbacks for TextScript + + * lily/stem.cc (invisible_b): don't use support_head(), since it + sets stem direction. + + * lily/beam.cc (struct Int_set): don't get stuck inserting + interval segments of length 0.0. + + * scripts/convert-ly.py: break-align conversion. + +2002-08-06 Han-Wen Nienhuys + + * lily/*.cc (process_music): gh_int2scm -> scm_int2num + 2002-08-06 Heikki Junes * lilypond-mode.el: Also "C-xC-s" sets default command to LilyPond. diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 12937161ff..e8b7699644 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -361,7 +361,11 @@ so you can add multiple packages using multiple @code{-s=latexpackages} options. @code{geometry}. @item latexoptions - Specify additional options for the La@TeX{} @code{\documentclass}. You can put any valid value here. This was designed to allow ly2dvi to produce output for double-sided paper, with balanced margins and pagenumbers on alternating sides. To achieve this specify @code{twoside} + Specify additional options for the La@TeX{} +@code{\documentclass}. You can put any valid value here. This was +designed to allow ly2dvi to produce output for double-sided paper, +with balanced margins and pagenumbers on alternating sides. To achieve +this specify @code{twoside} @item orientation Set orientation. Choices are @code{portrait} or @code{landscape}. Is @@ -380,8 +384,8 @@ block. the @code{\paper} block. @item pagenumber - If set to @code{no}, no page numbers will be printed. - + If set to @code{no}, no page numbers will be printed. If set to a +positive integer, start with this value as the first page number. @item fontenc diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index ec3ecf9161..ac7177ba91 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -174,7 +174,7 @@ A2_engraver::acknowledge_grob (Grob_info i) { /* Blunt axe method: every grob gets a propertysetting. */ - i.grob_->set_grob_property ("direction", gh_int2scm (d)); + i.grob_->set_grob_property ("direction", scm_int2num (d)); } } @@ -184,7 +184,7 @@ A2_engraver::acknowledge_grob (Grob_info i) if (state_ == UNIRHYTHM && unisilence != SCM_BOOL_T) { - i.grob_->set_grob_property ("staff-position", gh_int2scm (d * 6)); + i.grob_->set_grob_property ("staff-position", scm_int2num (d * 6)); } } diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index f4c07abbcf..0c00497d09 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -136,9 +136,9 @@ number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM l SCM prev; if (ignore_octave_b) - prev = ly_assoc_cdr (gh_int2scm (n), sig); + prev = ly_assoc_cdr (scm_int2num (n), sig); else - prev = gh_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig); + prev = gh_assoc (gh_cons (scm_int2num (o), scm_int2num (n)), sig); /* should really be true unless prev == SCM_BOOL_F */ if (gh_pair_p (prev) && gh_pair_p (ly_cdr (prev))) @@ -150,10 +150,10 @@ number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM l /* If an accidental was not found or the accidental was too old */ if (prev == SCM_BOOL_F || (gh_number_p (lazyness) && curbarnum_i > accbarnum_i + gh_scm2int (lazyness))) - prev = gh_assoc (gh_int2scm (n), sig); + prev = gh_assoc (scm_int2num (n), sig); - SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev); + SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev); int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0; @@ -301,9 +301,9 @@ Accidental_engraver::process_acknowledged_grobs () announce_grob (a, SCM_EOL); - SCM accs = gh_cons (gh_int2scm (pitch->alteration_), SCM_EOL); + SCM accs = gh_cons (scm_int2num (pitch->alteration_), SCM_EOL); if (num == 2 && extra_natural_b) - accs = gh_cons (gh_int2scm (0), accs); + accs = gh_cons (scm_int2num (0), accs); /* TODO: @@ -348,7 +348,7 @@ Accidental_engraver::process_acknowledged_grobs () int n = pitch->notename_; int o = pitch->octave_; int a = pitch->alteration_; - SCM on_s = gh_cons (gh_int2scm (o), gh_int2scm (n)); + SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n)); /* TODO: Speed this up! @@ -387,7 +387,7 @@ Accidental_engraver::process_acknowledged_grobs () noteheads with the same notename. */ localsig = ly_assoc_front_x - (localsig, on_s, gh_cons (gh_int2scm (a), barnum)); + (localsig, on_s, gh_cons (scm_int2num (a), barnum)); } origin->set_property ("localKeySignature", localsig); origin = origin->daddy_trans_; diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index d7c4e866be..03d7ac60c6 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -33,7 +33,7 @@ Accidental_placement::alignment_callback(SCM s, SCM ) position_accidentals (par); } - return gh_int2scm (0); + return scm_int2num (0); } @@ -57,7 +57,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) int n = p->notename_; SCM accs = me->get_grob_property ("accidental-grobs"); - SCM key = gh_int2scm (n); + SCM key = scm_int2num (n); SCM entry = scm_assq (key, accs); if (entry == SCM_BOOL_F) { diff --git a/lily/accidental.cc b/lily/accidental.cc index 658be717d5..9d1ad1a34e 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -132,7 +132,7 @@ Accidental_interface::brew_molecule (SCM smob) SCM ac = Font_interface::font_alist_chain (me); ac = gh_cons (gh_cons (gh_cons (ly_symbol2scm ("font-relative-size"), - gh_int2scm (-1)), SCM_EOL), + scm_int2num (-1)), SCM_EOL), ac); fm = Font_interface::get_font (me, ac); } diff --git a/lily/afm.cc b/lily/afm.cc index e9d770e46d..51dbba8224 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -169,7 +169,7 @@ Adobe_font_metric::find_by_name (String s) const } SCM at = (scm_list_n (ly_symbol2scm ("char"), - gh_int2scm (cm->code), + scm_int2num (cm->code), SCM_UNDEFINED)); // at= fontify_atom ((Font_metric*)this, at); diff --git a/lily/ambitus.cc b/lily/ambitus.cc index 8b5cf38395..37eb5b9617 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -65,9 +65,9 @@ number_accidentals (SCM key_signature, Pitch *pitch, SCM prev; if (ignore_octave_b) - prev = ly_assoc_cdr (gh_int2scm (notename), key_signature); + prev = ly_assoc_cdr (scm_int2num (notename), key_signature); else - prev = gh_assoc (gh_cons (gh_int2scm (octave), gh_int2scm (notename)), + prev = gh_assoc (gh_cons (scm_int2num (octave), scm_int2num (notename)), key_signature); /* should really be true unless prev == SCM_BOOL_F */ @@ -78,9 +78,9 @@ number_accidentals (SCM key_signature, Pitch *pitch, /* If an accidental was not found */ if (prev == SCM_BOOL_F) - prev = gh_assoc (gh_int2scm (notename), key_signature); + prev = gh_assoc (scm_int2num (notename), key_signature); - SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev); + SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev); int sig_alteration = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0; if (alteration == sig_alteration) // no accidental at all needed diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 55d8ab3e66..35706dde6b 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -129,10 +129,10 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom) Moment one_beat = *unsmob_moment (get_property ("beatLength")); int num = int ((*unsmob_moment (get_property ("measureLength")) / one_beat).main_part_); int den = one_beat.den (); - SCM time = scm_list_n (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED); + SCM time = scm_list_n (scm_int2num (num), scm_int2num (den), SCM_UNDEFINED); - SCM type = scm_list_n (gh_int2scm (test_mom.num ()), - gh_int2scm (test_mom.den ()), SCM_UNDEFINED); + SCM type = scm_list_n (scm_int2num (test_mom.num ()), + scm_int2num (test_mom.den ()), SCM_UNDEFINED); SCM settings = get_property ("autoBeamSettings"); diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 51e8c2f82e..ec4e202303 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -69,8 +69,8 @@ Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis) void Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2) { - SCM sa1= gh_int2scm (a1); - SCM sa2 = gh_int2scm (a2); + SCM sa1= scm_int2num (a1); + SCM sa2 = scm_int2num (a2); SCM axes = me->get_grob_property ("axes"); diff --git a/lily/bar-line.cc b/lily/bar-line.cc index f54d33c961..d897133e21 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -146,7 +146,7 @@ Bar_line::before_line_breaking (SCM smob) if (gh_string_p (g) && bsd) { SCM proc = me->get_grob_property ("break-glyph-function"); - g = gh_call2 (proc, g, gh_int2scm (bsd)); + g = gh_call2 (proc, g, scm_int2num (bsd)); } @@ -185,7 +185,7 @@ Bar_line::get_staff_bar_size (SCM smob) return gh_double2scm ((Staff_symbol_referencer::line_count (me) -1) * ss); } else - return gh_int2scm (0); + return scm_int2num (0); } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 85fc234a92..9b3be1c573 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -288,7 +288,7 @@ Beam_engraver::acknowledge_grob (Grob_info info) } stem->set_grob_property ("duration-log", - gh_int2scm (durlog)); + scm_int2num (durlog)); Moment stem_location = now - beam_start_mom_ + beam_start_location_; beam_info_->add_stem (stem_location, (durlog- 2) >? 0); diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index ba6fcf3f9c..e9f992c774 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -235,7 +235,7 @@ Beam::quanting (SCM smob) // debug quanting me->set_grob_property ("quant-score", gh_double2scm (qscores[best_idx].demerits)); - me->set_grob_property ("best-idx", gh_int2scm (best_idx)); + me->set_grob_property ("best-idx", scm_int2num (best_idx)); #endif return SCM_UNSPECIFIED; diff --git a/lily/beam.cc b/lily/beam.cc index 9d86ab4157..b4a98a36a7 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -77,7 +77,7 @@ Real Beam::get_beam_translation (Grob *me) { SCM func = me->get_grob_property ("space-function"); - SCM s = gh_call2 (func, me->self_scm (), gh_int2scm (get_beam_count (me))); + SCM s = gh_call2 (func, me->self_scm (), scm_int2num (get_beam_count (me))); return gh_scm2double (s); } @@ -203,7 +203,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming, for ( SCM s = gh_car (right_beaming); gh_pair_p (s); s = gh_cdr (s)) { int k = - right_dir * gh_scm2int (gh_car (s)) + i; - if (scm_memq (gh_int2scm (k), left_beaming) != SCM_BOOL_F) + if (scm_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F) count ++; } @@ -254,7 +254,7 @@ Beam::connect_beams (Grob *me) start_point - this_dir * gh_scm2int (gh_car (s)); new_slice.add_point (new_beam_pos); - gh_set_car_x (s, gh_int2scm (new_beam_pos)); + gh_set_car_x (s, scm_int2num (new_beam_pos)); } @@ -271,7 +271,7 @@ Beam::connect_beams (Grob *me) for (; gh_pair_p (s); s = gh_cdr (s)) { int np = - this_dir * gh_scm2int (gh_car(s)); - gh_set_car_x (s, gh_int2scm (np)); + gh_set_car_x (s, scm_int2num (np)); last_int.add_point (np); } } @@ -417,7 +417,7 @@ Beam::brew_molecule (SCM grob) int t = Stem::duration_log (st); SCM proc = me->get_grob_property ("flag-width-function"); - SCM result = gh_call1 (proc, gh_int2scm (t)); + SCM result = gh_call1 (proc, scm_int2num (t)); nw_f = gh_scm2double (result); } @@ -494,8 +494,8 @@ Beam::get_default_dir (Grob *me) count[UP] = count[DOWN] = 0; Direction d = DOWN; - Link_array stems= - Pointer_group_interface__extract_grobs (me, (Item*)0, "stems"); + Link_array stems= + Pointer_group_interface__extract_grobs (me, (Grob*)0, "stems"); for (int i=0; i get_grob_property ("dir-function"); SCM s = gh_call2 (func, - gh_cons (gh_int2scm (count[UP]), - gh_int2scm (count[DOWN])), - gh_cons (gh_int2scm (total[UP]), - gh_int2scm (total[DOWN]))); + gh_cons (scm_int2num (count[UP]), + scm_int2num (count[DOWN])), + gh_cons (scm_int2num (total[UP]), + scm_int2num (total[DOWN]))); if (gh_number_p (s) && gh_scm2int (s)) return to_dir (s); @@ -533,8 +533,8 @@ Beam::get_default_dir (Grob *me) void Beam::set_stem_directions (Grob *me, Direction d) { - Link_array stems - =Pointer_group_interface__extract_grobs (me, (Item*) 0, "stems"); + Link_array stems + =Pointer_group_interface__extract_grobs (me, (Grob*) 0, "stems"); for (int i=0; i 0.0) { allowed_regions_.insert (before, i); i++; } allowed_regions_.del (i); - if (!after.empty_b ()) + if (!after.empty_b () && after.length () > 0.0) { allowed_regions_.insert (after, i); i++; @@ -707,7 +707,7 @@ Beam::consider_auto_knees (Grob* me, Direction d) Direction d = (hps.center () < max_gap.center()) ? UP : DOWN ; - stem->set_grob_property ("direction", gh_int2scm (d)); + stem->set_grob_property ("direction", scm_int2num (d)); /* UGH. Check why we still need dir-forced; I think we can @@ -754,7 +754,7 @@ Beam::set_stem_shorten (Grob *me) Real staff_space = Staff_symbol_referencer::staff_space (me); SCM shorten_elt = scm_list_ref (shorten, - gh_int2scm (beam_count break_status_dir (); if (bsd == LEFT) { - me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT)); + me->set_grob_property ("self-alignment-X", scm_int2num (RIGHT)); } /* diff --git a/lily/break-substitution.cc b/lily/break-substitution.cc index 0a2876c92c..78a90b9519 100644 --- a/lily/break-substitution.cc +++ b/lily/break-substitution.cc @@ -106,7 +106,7 @@ do_break_substitution (SCM src) for (int i =0 ; i< l ; i++) { - SCM si = gh_int2scm (i); + SCM si = scm_int2num (i); scm_vector_set_x (nv, si, do_break_substitution (scm_vector_ref (src, si))); } } diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index b677471bd8..4f0a920dca 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -122,7 +122,7 @@ Chord_tremolo_engraver::process_music () stem_tremolo_ = new Item (get_property ("StemTremolo")); announce_grob(stem_tremolo_, repeat_->self_scm()); stem_tremolo_->set_grob_property ("flag-count", - gh_int2scm (flags_)); + scm_int2num (flags_)); } } diff --git a/lily/chord.cc b/lily/chord.cc index 5150bb0b3c..45f7e6781d 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -130,7 +130,7 @@ Chord::step_scm (SCM tonic, SCM p) while (i < 0) i += 7; i++; - return gh_int2scm (i); + return scm_int2num (i); } /* @@ -169,7 +169,7 @@ Chord::missing_thirds (SCM pitches) { int third = (unsmob_pitch (last)->notename_ - unsmob_pitch (tonic)-> notename_ + 7) % 7; - last = ly_pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third))); + last = ly_pitch_transpose (last, scm_vector_ref (thirds, scm_int2num (third))); } if (step > gh_scm2int (step_scm (tonic, last))) @@ -180,7 +180,7 @@ Chord::missing_thirds (SCM pitches) int third = (unsmob_pitch (last)->notename_ - unsmob_pitch (tonic)->notename_ + 7) % 7; last = ly_pitch_transpose (last, scm_vector_ref (thirds, - gh_int2scm (third))); + scm_int2num (third))); } } else @@ -189,7 +189,7 @@ Chord::missing_thirds (SCM pitches) } } - return lower_step (tonic, missing, gh_int2scm (7)); + return lower_step (tonic, missing, scm_int2num (7)); } /* Return PITCHES with PITCH added not as lowest note */ @@ -246,12 +246,12 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) } } add = transpose_pitches (tonic, add); - add = lower_step (tonic, add, gh_int2scm (7)); + add = lower_step (tonic, add, scm_int2num (7)); add = scm_sort_list (add, Pitch::less_p_proc); add = ly_unique (add); sub = transpose_pitches (tonic, sub); - sub = lower_step (tonic, sub, gh_int2scm (7)); + sub = lower_step (tonic, sub, scm_int2num (7)); sub = scm_sort_list (sub, Pitch::less_p_proc); /* default chord includes upto 5: <1, 3, 5> */ @@ -264,8 +264,8 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) tmp = ly_snoc (fifth, tmp); else if (dim_b) { - add = lower_step (tonic, add, gh_int2scm (5)); - add = lower_step (tonic, add, gh_int2scm (7)); + add = lower_step (tonic, add, scm_int2num (5)); + add = lower_step (tonic, add, scm_int2num (7)); } /* find missing thirds */ @@ -275,7 +275,7 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) /* if dim modifier is given: lower all missing */ if (dim_b) - missing = lower_step (tonic, missing, gh_int2scm (0)); + missing = lower_step (tonic, missing, scm_int2num (0)); /* if additions include any 3, don't add third */ SCM third = ly_cadr (base_pitches (tonic)); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index b36fc2dc8a..e7b4dfa94e 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -111,7 +111,7 @@ Clef_engraver::create_clef () g->set_parent (clef_, Y_AXIS); g->set_parent (clef_, X_AXIS); - g->set_grob_property ("direction", gh_int2scm (sign (gh_scm2int (oct)))); + g->set_grob_property ("direction", scm_int2num (sign (gh_scm2int (oct)))); octavate_ = g; announce_grob(octavate_, SCM_EOL); } diff --git a/lily/command-request.cc b/lily/command-request.cc index 9bcd708a06..9e2e0970ca 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -32,10 +32,10 @@ Key_change_req::transpose (Pitch p) orig.transpose (p); - SCM key = gh_cons (gh_int2scm (orig.get_octave ()), - gh_int2scm (orig.notename_)); + SCM key = gh_cons (scm_int2num (orig.get_octave ()), + scm_int2num (orig.notename_)); - newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_)), + newlist = gh_cons (gh_cons (key, scm_int2num (orig.alteration_)), newlist); } else if (gh_number_p (key)) @@ -43,8 +43,8 @@ Key_change_req::transpose (Pitch p) Pitch orig (0, gh_scm2int (key), gh_scm2int (alter)); orig.transpose (p); - key =gh_int2scm (orig.notename_); - alter = gh_int2scm (orig.alteration_); + key =scm_int2num (orig.notename_); + alter = scm_int2num (orig.alteration_); newlist = gh_cons (gh_cons (key, alter), newlist); } } diff --git a/lily/stem.cc b/lily/stem.cc index ceefac9709..20c5bc79e8 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -123,7 +123,9 @@ Stem::set_stemend (Grob*me, Real se) /* Note head that determines hshift for upstems - */ + + WARNING: triggers direction +*/ Grob* Stem::support_head (Grob*me) { @@ -152,7 +154,9 @@ Stem::head_count (Grob*me) /* The note head which forms one end of the stem. - */ + + WARNING: triggers direction +*/ Grob* Stem::first_head (Grob*me) { @@ -246,7 +250,8 @@ Stem::add_head (Grob*me, Grob *n) bool Stem::invisible_b (Grob*me) { - return ! (head_count (me) && Note_head::get_balltype (support_head (me)) >= 1); + return ! (head_count (me) + && gh_scm2int (me->get_grob_property ("duration-log")) >= 1); } Direction diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 3b9790090c..4425102e63 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -24,7 +24,10 @@ . ( (X-extent-callback . ,Axis_group_interface::group_extent_callback) (left-padding . 0.3) - (right-padding . 0.3) + + ;; this is quite small, but it is very ugly to have + ;; accs closer to the previous note than to the next one. + (right-padding . 0.15) (meta . ((interfaces . (item-interface accidental-placement-interface)))) )) @@ -934,6 +937,7 @@ . ( (molecule-callback . ,Text_item::brew_molecule) (no-spacing-rods . #t) + (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (direction . -1) (padding . 0.5) (script-priority . 200) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index e7789b0fa5..14049d621f 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -893,6 +893,18 @@ if 1: conversions.append (((1,5,62), conv, 'visibility-lambda -> break-visibility')) + +if 1: + def conv (str): + if re.search (r'\addlyrics',str) \ + and re.search ('automaticMelismata', str) == None: + sys.stderr.write ('automaticMelismata is turned on by default since 1.5.67. Please fix this by hand.') + raise FatalConversionError() + return str + + conversions.append (((1,5,67), conv, + 'automaticMelismata turned on by default')) + if 1: def conv (str): str = re.sub ('ly-set-grob-property', 'ly-set-grob-property!', str) @@ -901,6 +913,32 @@ if 1: conversions.append (((1,5,68), conv, 'ly-set-X-property -> ly-set-X-property!')) +if 1: + def conv (str): + break_dict = { + "Instrument_name": "instrument-name", + "Left_edge_item": "left-edge", + "Span_bar": "span-bar", + "Breathing_sign": "breathing-sign", + "Staff_bar": "staff-bar", + "Clef_item": "clef", + "Key_item": "key-signature", + "Time_signature": "time-signature", + "Custos": "custos" + } + def func(match): + props = m.group (1) + for (k,v) in break_dict.items(): + props = re.sub (k, v, props) + + + return "breakAlignOrder = #'( %s )" % props + str = re.sub (r"breakAlignOrder *= *#'\(([a-z_A-Z ]+)\)", func, str) + return str + + # 40 ? + conversions.append (((1,5,40), conv, 'breakAlignOrder property names')) + ################################ # END OF CONVERSIONS diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 9009214e7e..d15fd4452a 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -422,11 +422,18 @@ def setup_environment (): #what a name. def set_setting (dict, key, val): try: - val = string.atof (val) + val = string.atoi (val) except ValueError: #warning (_ ("invalid value: %s") % `val`) pass + if type(val) == type ('hoi'): + try: + val = string.atof (val) + except ValueError: + #warning (_ ("invalid value: %s") % `val`) + pass + try: dict[key].append (val) except KeyError: @@ -638,7 +645,7 @@ def global_latex_preamble (extra): ''' if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no': - s = s + '\setcounter{page}{%s}\n' % (extra['pagenumber'][-1]) + s = s + '\setcounter{page}{%d}\n' % (extra['pagenumber'][-1]) s = s + '\\pagestyle{plain}\n' else: s = s + '\\pagestyle{empty}\n' -- 2.39.2