On Sat, Oct 21, 2017 at 3:54 AM, David Kastrup <d...@gnu.org> wrote:

> Thomas Morley <thomasmorle...@gmail.com> writes:
>
> > 2017-10-19 16:15 GMT+02:00 Pierre-Luc Gauthier <p.luc.gauth...@gmail.com
> >:
> >> Hi there,
> >>
> >> I'm trying to move the "Mark_engraver" from the \Score context to the
> >> \StaffGroup context so as to have \mark \default be displayed at the
> >> top of every new \StaffGroup.
>
> +
> +  // Only move this grob if it is a direct child of the system.  We
> +  // are not interested in moving marks from other staves to the top
> +  // staff; we only want to move marks from the system to the top
> +  // staff.
> +  if (sys != me->get_parent (Y_AXIS))
> +    return SCM_BOOL_F;
> +
> +  me->set_parent (top_staff, Y_AXIS);
> +  me->flush_extent_cache (Y_AXIS);
> +  Axis_group_interface::add_element (top_staff, me);
> +  return SCM_BOOL_T;
> +}
>
> In particular, read that comment.  That sounds very much like what the
> code is supposed to do doesn't work.  It may have worked at the time of
> writing?
>
> Joe, any idea?


I have a hunch: once upon a time (IIRC), the staves of each StaffGroup were
contained in some container grob (maybe VerticalAxisGroup?). The vertical
spacing was done heirarchically, so the VerticalAxisGroup was in charge of
spacing the staves of a StaffGroup, and then the System would space those
groups. This led to poor vertical spacing, and so the intermediate
VerticalAxisGroups were scrapped.

So what does this have to do with Mark_engraver? Well my hunch is that a
long time ago, if you had moved Mark_engraver to the \StaffGroup context
then those marks would have ended up living inside the VerticalAxisGroup
belonging to those staves, so it would have shown up in the right place.
With the intermediate VerticalAxisGroup gone, there's no intermediate grob
to take parentage of the mark, and so it bubbles all the way up to the
System.

I'll try to find some time this weekend to investigate this hunch...

Best,
Joe
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to