On 08/10/2026 18:19, Pierre-Luc Gauthier wrote:
Yes of course! setOfRulesA = {}, etc, works fine and I should have mentioned it first.But I was wondering why nesting works *for only one* \layout bloc and not more ?
This is explained in the Notation documentation, section 27.1 “The \layout block” <https://lilypond.org/doc/v2.26/Documentation/notation/the-layout-block>, in the part starting with the sentence:
|\layout| blocks may be assigned to variables for reuse later, but the way this works is slightly but significantly different from writing them literally.
In short, putting a \layout block into a variable does not store the set of specified overrides; it stores the entire set of all layout properties, but with the overrides applied. Creating a new \layout variable from an old one just overrides more of its properties and then stores the new whole set of all layout properties. There is no meaningful way to start from two full sets of all layout properties.
This behaviour is certainly unintuitive, but it is fully documented. Timwi
