lilypond-user
[Top][All Lists]
Advanced

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

Re: Box around system


From: Jean Abou Samra
Subject: Re: Box around system
Date: Wed, 18 May 2022 18:41:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Le 18/05/2022 à 17:56, Valentin Petzel a écrit :
Jean is correct in telling you why your approach does not work. The system is
not something that is created in a certain timestep, but rather as a single
grob at the begin of translation and then broken down afterward, basically
copying the properties of the original System grob.

However while it is correct that we cannot use \override on already created
grobs we can still change such values as long as we can get a reference to the
grob. In this case this is quite easy. The System grob is X parent to the
PaperColumn and Y parent to VerticalAlignment and thus an ancestor of pretty
much any grob on the page. This means we can use the after-line-breaking
callback of a grob to modify the System grob this particular grob is a
descendant of.

Have a look at the appended file for details.



Yes, that works too. FYI, you don't need to code
find-parent-system yourself, it's available as ly:grob-system.
Also, by design, not pretty much all but absolutely all
grobs have a System as ultimate parent on both axes (and
it's the same on both axes for each grob). Of course, this
doesn't apply during translation, where the parents are
in the process of being assigned for each grob. There
is also a caveat: ly:grob-system may occasionally fail to
give you the system in some cases even though it is there.
This mostly applies to the unbroken original grobs. There are
also edge cases with those paper columns that are killed
because they are unused. Yes, this is suboptimal. (I want
to change that eventually but it's part of a larger piece
of work on break substitution, which has stalled lately.)

Jean




reply via email to

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