On Fri, Feb 24, 2012 at 3:04 PM, Pavel Roskin <pro...@gnu.org> wrote:

> Hello!
>
> I'm moving the thread to lilypond-devel and changing the subject.  I
> hope it's OK.
>
> On Thu, 23 Feb 2012 15:37:02 +0000
> Neil Puttock <n.putt...@gmail.com> wrote:
>
> > On 23 February 2012 15:18, Pavel Roskin <pro...@gnu.org> wrote:
> >
> > > I actually wanted to make a stopgap solution in Scheme.  I wrote
> > > some code that looks for other stems and sets the stem length so it
> > > would touch the stem above (attached).  But the code is unreliable.
> > >  Some stems are not calculated yet.
> >
> > I'd love to be proven wrong, but I don't think you'll have much
> > success with this approach.  At the very least, you'll need a Scheme
> > engraver at the correct context level to collect the stems at the
> > right time.  If a simple length override were possible with the
> > current infrastructure, we wouldn't need a Span_arpeggio_engraver to
> > typeset cross-staff arpeggios.
>
> I tried writing an engraver that could be added to the StaffGroup
> context.  Collecting stems is not a problem.  The problem is that even
> the finalize handler is called to early.  I'm getting a warning:
>
> programming error: vertical alignment called before line breaking
> continuing, cross fingers
>

It's a little hard to guess what's going wrong without knowing exactly what
you've tried. Are you trying to do layout logic in the engraver (ie. by
collecting stems, reading their properties, doing calculations and then
setting more properties)? If you are, the first step is to move the layout
logic into grob callbacks.

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

Reply via email to