Hi David,
thanks for the response.
Am 21.07.2015 um 22:17 schrieb David Nalesnik:
Hi Simon,
On Tue, Jul 21, 2015 at 12:26 PM, Simon Albrecht
<[email protected] <mailto:[email protected]>> wrote:
Hello,
while developing a workaround (or solution?) for issue 4316
<https://code.google.com/p/lilypond/issues/detail?id=4316>, I
encountered the following problem: \offset cannot be used on X and
Y offset properties, apparently because these are mutable, and as
the doc string for (offsetter) in scm/music-functions.scm states,
\offset is limited to work only on immutable properties. (I
haven’t really gotten behind the distinction of mutable/immutable
properties…)
Now, I don’t really know how to circumvent this, and it seems like
a really important usecase for \offset. Do you have any ideas here?
The issue of mutable properties is actually only a problem with
Hairpin.X-offset in your example.
So a ‘mutable property’ would be one that is unset by default?
You'll note that each of the other properties you offset has a
default value in scm/define-grobs.scm
As a side note: I find it confusing that these are not to be found in
the IR.
to calculate a displacement against.
The problem with these other properties is that "unpure-pure
containers" are involved, and the current implementation of \offset
has no provision for dealing with this situation. If it could, a
number of use cases would be opened up--some very handy ones at that.
It is straightforward to redefine \offset to extract the unpure
component in such cases and use that to offset against. (See
attached.) I haven't noticed any problems, but I do wonder if a
problem might occur, say, if the change to the property should
properly result in a different line break.
Now, whether it would be feasible to offset against mutable properties
I'm not sure. I've never had success getting changes to values stored
there to have any effect on output. Too late in the game?
I added issue 4516
<https://code.google.com/p/lilypond/issues/detail?id=4516> for improving
\offset and referenced your first suggestions there.
Yours, Simon
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user