[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strange behaviour of \layout block variable
From: |
Urs Liska |
Subject: |
strange behaviour of \layout block variable |
Date: |
Sun, 20 May 2012 22:04:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Hi list and Gurus,
I encountered a strange behaviour with a layout block assigned to a
variable.
As advised on lilypond-user I write
% Definition of \layout block in variable
% overrides a property
layoutVariable = \layout {
\context {
\Score
\override Hairpin #'style = #'dashed-line
}
}
which I can then reference with
\layout { \layoutVariable }
This seems to work but it interacts strangely with other \layout blocks
written literally (or in include files).
Normally, multiple \context definitions get merged so they all apply. If
there are overrides of the same properties the last one will apply.
But if I also have a \context definition in a variable this one doesn't
get merged but (partially) hides the other contexts.
Take the attached file and move the definition and the call of the
variable around to see that
-> all context definitions that are parsed between the definition and
the call of the variable are ignored.
I know that the order in which LilyPond encounters things is important.
But this one is beyond my proper understanding.
So could someone please tell me if that's correct behaviour or a bug?
And if it's correct then how should one properly deal with it? Should
this be made more clear in the docs?
Thanks
Urs
layoutVariable.ly
Description: Text Data
- strange behaviour of \layout block variable,
Urs Liska <=
- Re: strange behaviour of \layout block variable, David Kastrup, 2012/05/20
- Re: strange behaviour of \layout block variable, Urs Liska, 2012/05/20
- Re: strange behaviour of \layout block variable, David Kastrup, 2012/05/21
- Re: strange behaviour of \layout block variable, Urs Liska, 2012/05/21
- Re: strange behaviour of \layout block variable, David Kastrup, 2012/05/21
- Re: strange behaviour of \layout block variable, Urs Liska, 2012/05/21
- Documentation suggestion (was: strange behaviour of \layout block variable), Urs Liska, 2012/05/21
- Re: Documentation suggestion (was: strange behaviour of \layout block variable), Marek Klein, 2012/05/23
- Re: strange behaviour of \layout block variable, Janek WarchoĊ, 2012/05/21
- Re: strange behaviour of \layout block variable, David Kastrup, 2012/05/21