+2002-10-12 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/parser.yy (sup_quotes): use '\'' for sup_quotes.
+
+ * lily/break-align-interface.cc (do_alignment): right-edge spacing
+ key adds space at the end of line.
+
2002-10-11 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/sketch.scm: Fix beams.
cloning from lexer.
* scm/music-functions.scm (make-multi-measure-rest): move mmrest
- logic out of the parser.
+ logic out of the parser. Add bar checks on both ends.
* Documentation/user/refman.itely (Multi measure rests): add more
notes about mm rests.
@subsection Titling layout
Ly2dvi extracts the following header fields from the LY files to
-generate titling:
+generate titling. An example demonstrating all these fields is in
+@file{input/test/ly2dvi-testpage.ly}.
@table @code
@item title
@cindex cue notes
@cindex font size
@cindex size
+@cindex symbol size
+@cindex glyph size
The font used for printing a object can be selected by setting
@code{font-name}, e.g.
@cindex distance between staves
@cindex staff distance
@cindex between staves, distance
+@cindex staffs per page
+
The height of each system is determined automatically by lilypond, to
keep systems from bumping into each other, some minimum distances are
@}
@end example
+TODO:
+@example
+
+scoreA = \score @{ \deelA @}
+scoreB = \score @{ \deelA @}
+
+% \score @{ \scoreA @}
+\score @{ \scoreB @}
+
+@end example
@separate
@example
= Pointer_group_interface__extract_grobs (me, (Grob*)0,
"elements");
Array<Interval> extents;
-
+
+ int last_nonempty = -1;
for (int i=0; i < elems.size (); i++)
{
Interval y = elems[i]->extent (elems[i], X_AXIS);
extents.push (y);
+ if (!y.empty_b())
+ last_nonempty = i;
}
-
int idx = 0;
while (idx < extents.size () && extents[idx].empty_b ())
idx++;
offsets[i] = 0.0;
+ Real extra_right_space = 0.0;
int edge_idx = -1;
- while (idx < elems.size() - 1)
+ while (idx < elems.size())
{
int next_idx = idx+1;
while (next_idx < elems.size() &&
extents[next_idx].empty_b()
- && next_idx != elems.size() -1 )
+ )
next_idx++;
Grob *l = elems[idx];
- Grob *r = elems[next_idx];
+ Grob *r = 0;
+
+ if (next_idx < elems.size())
+ r = elems[next_idx];
SCM alist = SCM_EOL;
+
+ /*
+ Find the first grob with a space-alist entry.
+ */
for (SCM s= l->get_grob_property ("elements");
gh_pair_p (s) ; s = gh_cdr (s))
{
Grob *elt = unsmob_grob (gh_car (s));
if (edge_idx < 0
- && elt->get_grob_property ("break-align-symbol") == ly_symbol2scm( "left-edge"))
+ && elt->get_grob_property ("break-align-symbol")
+ == ly_symbol2scm( "left-edge"))
edge_idx = idx;
SCM l =elt->get_grob_property ("space-alist");
}
}
- SCM rsym = SCM_EOL;
+ SCM rsym = r ? SCM_EOL : ly_symbol2scm ("right-edge");
/*
We used to use #'cause to find out the symbol and the spacing
table, but that gets icky when that grob is suicided for some
reason.
*/
- for (SCM s = r->get_grob_property ("elements");
- gh_pair_p (s); s = gh_cdr (s))
- {
- Grob * elt =unsmob_grob(gh_car (s));
+ for (SCM s = r ? r->get_grob_property ("elements") : SCM_EOL;
+ !gh_symbol_p (rsym) && gh_pair_p (s); s = gh_cdr (s))
+ {
+ Grob * elt =unsmob_grob(gh_car (s));
- SCM sym = elt->get_grob_property ("break-align-symbol");
- if (gh_symbol_p (sym))
- {
- rsym = sym;
- break;
- }
- }
+ rsym = elt->get_grob_property ("break-align-symbol");
+ }
+
if (rsym == ly_symbol2scm("left-edge"))
edge_idx = next_idx;
type = gh_car (entry) ;
}
- if (type == ly_symbol2scm ("extra-space"))
- offsets[next_idx] = extents[idx][RIGHT] + distance;
- else if (type == ly_symbol2scm("minimum-space"))
- offsets[next_idx] = extents[idx][RIGHT] >? distance;
+ if (r)
+ {
+ if (type == ly_symbol2scm ("extra-space"))
+ offsets[next_idx] = extents[idx][RIGHT] + distance;
+ else if (type == ly_symbol2scm("minimum-space"))
+ offsets[next_idx] = extents[idx][RIGHT] >? distance;
+ }
+ else
+ {
+ extra_right_space = distance;
+ }
idx = next_idx;
}
-
Real here = 0.0;
Interval total_extent;
if (item->break_status_dir () == LEFT)
- alignment_off = -total_extent[RIGHT];
+ {
+ alignment_off = - total_extent[RIGHT] - extra_right_space;
+ }
else if (edge_idx < 0)
alignment_off = -total_extent[LEFT];
}
<version>\"[^"]*\" { /* got the version number */
String s (YYText ()+1);
- s = s.left_string (s.index_last ('"'));
+ s = s.left_string (s.index_last ('\"'));
yy_pop_state ();
if (!valid_version_b (s))
int d = String_convert::dec2int (right);
return gh_cons (gh_int2scm (n), gh_int2scm (d));
}
-
+#if 0
/* avoid silly flex induced gcc warnings */
static void yy_push_state (int) {;}
static void yy_pop_state () {;}
yy_top_state ();
avoid_silly_flex_induced_gcc_warnings ();
}
+#endif
;
sup_quotes:
- "'" {
+ '\'' {
$$ = 1;
}
- | sup_quotes "'" {
+ | sup_quotes '\'' {
$$ ++;
}
;
My_lily_parser::set_yydebug (bool )
{
#if 0
- yydebug = b;
+ yydebug = 1;
#endif
}
void
My_lily_parser::do_yyparse ()
{
-
current_parser = this;;
yyparse ((void*)this);
}
(custos . (minimum-space . 2.0))
(clef . (minimum-space . 1.0))
(first-note . (extra-space . 1.3))
+ (right-edge . (extra-space . 0.0))
))
;;
(font-family . ancient)
(space-alist . (
(first-note . (minimum-space . 0.0))
+ (right-edge . (extra-space . 0.1))
))
(meta . ((interfaces
. (custos-interface staff-symbol-referencer-interface
(breathing-sign . (minimum-space . 0.0))
(clef . (extra-space . 1.0))
(first-note . (extra-space . 1.0))
+ (right-edge . (extra-space . 0.0))
(key-signature . (extra-space . 0.0))
))
(meta . ((interfaces . (break-aligned-interface item-interface ))))
(break-visibility . ,all-visible)
(space-alist . (
(first-note . (extra-space . 2.0))
+ (right-edge . (extra-space . 0.8))
(staff-bar . (minimum-space . 2.0))
))
(breakable . #t)
")
(translator-property-description 'automaticMelismata boolean? " If
-set, \addlyrics will assume that beams, slurs and ties signal
+set, \\addlyrics will assume that beams, slurs and ties signal
melismata, and align lyrics accordingly.
")
@table @samp
@item (), or unset
Behave in normal way: remove one set of grobs when in unisolo.
-@item allways:
+@item always:
Remove any grob that comes along.
@item never:
Do nothing.
@table @samp
@item (), or unset
Behave in normal way: remove spanners when in unisolo.
-@item allways:
+@item always:
Remove any spanners that come along.
@item never:
Do nothing.