[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting context properties with \with
From: |
Werner LEMBERG |
Subject: |
Re: Setting context properties with \with |
Date: |
Sun, 29 Dec 2024 22:06:41 +0000 (UTC) |
> https://lilypond.org/doc/v2.24/Documentation/learning/modifying-context-properties
>
> Under the heading "Setting context properties with \with", there are
> these statements:
>
> Properties set in this way may still be changed
> dynamically using \set and returned to the default
> value set in the \with block with \unset.
>
> So if the fontSize property is set in a \with
> clause it sets the default value of the font size.
> If it is later changed with \set, this new default
> value may be restored with the \unset fontSize command.
>
> This is not the behavior that I see. I see that \unset clears the
> value of a property that was established by \with just as if it had
> been established with \set. For example, this does _not_ print a
> gigantic note.
>
> ```
> \new Voice \with { fontSize = 20 } {
> \unset fontSize
> c''
> }
> ```
>
> Is this a documentation problem, or is LilyPond broken and I'm the
> first person to notice?
Hmm, for me the second paragraph you cite describes a three-step
situation:
1. Set a context property in the `\with` block to value 'foo'.
2. Change the value with `\set` to value 'bar'.
3. Call `\unset`.
Your test code omits the `\set` command, which is slightly different.
Anyway, both situations don't work; I would call it a bug.
Werner