[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New grob-stencil needs to look at Beam-dimensions

From: David Kastrup
Subject: Re: New grob-stencil needs to look at Beam-dimensions
Date: Sat, 01 Jun 2019 14:33:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Hi,
> currently I continue my work to create a Slash-grob for automatic slashed 
> Beams.
> The Slash-stencil needs to know Beam-properties (X-positions,
> positions) to be adjusted. If I call those beam-properties directly
> the Beam collopses, because this call is done before the Beam is
> ready.
> But if I wrap the Slash-stencil in another procedure like
> (define slash-stil (lambda (grob) (lambda (grob) ...)))
> all works.
> Questions:
> - Why does it work? (it seems the outer procedure is called
> before-line-breaking, the inner after-line-breaking)
> - Is this something I can rely on (I'm thinking of patch) or am I
> doing bug-using?

Depends on whether someone asks for your stencil prematurely.  We have a
lot of those implicit dependencies though.

> - Is there a better/different method?

An unpure/pure container has somewhat more defined semantics when its
respective callbacks are exercised.  But if it works without, go for it.
If it doesn't and the Beam uses unpure-pure-containers, you can also use
an unpure-pure-container and work with ly:pure-call and ly:unpure-call
in your respective callbacks: those work even when the definition of
Beam changes significantly.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]