[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting context properties with \with
From: |
Knute Snortum |
Subject: |
Re: Setting context properties with \with |
Date: |
Fri, 27 Dec 2024 14:06:31 -0800 |
On Fri, Dec 27, 2024 at 1:46 PM Dan Eble <dan@lyric.works> wrote:
>
> 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?
> --
> Dan
>
Interesting. this doesn't work with Voice, as you point out, but it does
work with Staff:
%%%
\version "2.24.4"
\new Staff \with { fontSize = 20 } {
\new Voice {
\set fontSize = 10
c''
\unset fontSize
c''
}
}
%%%
--
Knute Snortum