2004-03-21 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/staff-symbol.cc (print): span staff-symbol on column
+ extents for non-broken columns.
+
+ * ly/engraver-init.ly (breakAlignOrder): put staff-bar behind key-signature.
+
+ * tex/titledefs.tex: don't use smallcaps for piece.
+
* lily/system.cc (uniquify_list): bugfix. This fixes spuriously
translated stencils in the output.
My_lily_lexer::My_lily_lexer ()
{
- // yy_flex_debug = 1;
-
keytable_ = new Keyword_table (the_key_tab);
chordmodifier_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
void
My_lily_lexer::start_main_input ()
-{
+{
+ // yy_flex_debug = 1;
+
new_input (main_input_name_, &global_input_file->sources_);
/* Do not allow \include in --safe-mode */
allow_includes_b_ = allow_includes_b_ && ! safe_global_b;
do {
if (!s->get_bound (d))
{
- s->set_bound (d, command_column_);
+ Grob * cc
+ = unsmob_grob (get_property ("currentCommandColumn"));
+ s->set_bound (d, cc);
/* don't warn for empty/suicided spanners,
it makes real warningsinvisible.
maybe should be junked earlier? */
- if (!elem->live ())
- ; // gdb hook
- else
+ if (elem->live ())
elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ()));
}
}
Grob * common
= sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
- Real width = 0.0;
+ Interval span_points (0,0);
+
/*
For raggedright without ragged staffs, simply set width to the linewidth.
--hwn.
*/
- SCM width_scm = me->get_property ("width");
- if (gh_number_p (width_scm))
- {
-
- /*
- don't multiply by Staff_symbol_referencer::staff_space (me),
- since that would make aligning staff symbols of different sizes to
- one right margin hell.
- */
- width = gh_scm2double (width_scm);
- }
- else
+ Direction d = LEFT;
+ do
{
- width = sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS);
+ SCM width_scm = me->get_property ("width");
+ if (d == RIGHT && gh_number_p (width_scm))
+ {
+ /*
+ don't multiply by Staff_symbol_referencer::staff_space (me),
+ since that would make aligning staff symbols of different sizes to
+ one right margin hell.
+ */
+ span_points[RIGHT] = gh_scm2double (width_scm);
+ }
+ else
+ {
+ 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];
+ }
}
+ while (flip (&d) !=LEFT);
- // 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->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
t *= robust_scm2double (me->get_property ("thickness"), 1.0);
int l = Staff_symbol::line_count (me);
Real height = (l-1) * staff_space (me) /2;
+ Stencil a =
+ Lookup::horizontal_line (span_points
+ -me->relative_coordinate (common, X_AXIS),
+ t);
+
Stencil m;
for (int i=0; i < l; i++)
{
- Stencil a =
- Lookup::horizontal_line (Interval (0,width), t);
-
- a.translate_axis (height - i * staff_space (me), Y_AXIS);
- m.add_stencil (a);
+ Stencil b(a);
+ b.translate_axis (height - i * staff_space (me), Y_AXIS);
+ m.add_stencil (b);
}
-
return m.smobbed_copy ();
}
(6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
(3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
)
+
+ %{
+
+ this order is more complex, see wansek p254 and further.
+
+ for instance, order of clef and :|: depends on function of the clef
+
+ (clef of start-repeat) :|: (change-clef)
+
+ is the proper order.
+
+ %}
breakAlignOrder = #'(
instrument-name
left-edge
ambitus
breathing-sign
clef
- rehearsal-mark
- staff-bar
key-signature
+ staff-bar
time-signature
custos
)