[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rehearsalMarkFormatter => markFormatter in 2.24.0
From: |
Richard Shann |
Subject: |
Re: rehearsalMarkFormatter => markFormatter in 2.24.0 |
Date: |
Fri, 10 Mar 2023 14:35:48 +0000 |
User-agent: |
Evolution 3.38.3-1 |
On Fri, 2023-03-10 at 14:12 +0100, Jean Abou Samra wrote:
>
>
> > Le 10 mars 2023 à 13:47, Richard Shann <richard@rshann.plus.com> a
> > écrit :
> >
> > I've noticed a name change in 2.24 where
> > rehearsalMarkFormatter has become markFormatter.
>
>
> (You mean the other way around.)
sorry, yes, I just assumed it had been shortened not lengthened.
>
>
> > I want to make scores that can be compiled under either 2.22 or
> > 2.24 so
> > I tried this:
> >
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > \version "2.24.0"
> > xxx = rehearsalMarkFormatter
> >
> > %\version "2.22.0"
> > %xxx = markFormatter
> >
> > \relative c'' {
> > \set Score.\xxx = #format-mark-box-alphabet
> > c1 \mark \default
> > c1 \mark \default
> > c1 \mark #8
> > c1 \mark \default
> > c1 \mark \default
> > }
> >
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > If the commenting out is switched round this continues to work.
> > (The definition of xxx would be in an include file in a versioned
> > directory).
>
> You can also do
>
> xxx = #(if (ly:version? >= '(2 23 6) 'rehearsalMarkFormatter
> 'markFormatter)
for anyone listening in that needs an extra ")" i.e.
xxx = #(if (ly:version? >= '(2 23 6)) 'rehearsalMarkFormatter'markFormatter)
This ly:version is new to me I'm ashamed to say. Does it raise the
possibility of writing chunks of LilyPond that are conditional on the
version I wonder? I would perhaps need to phrase that as a specific
question about some particular construct ...
>
> to have it picked automatically based on the current LilyPond
> version.
>
> >
> > My question is, is this a reasonable approach?
> > Specifically is it reliable to use variables in this way, as
> > components
> > of a property?
>
> Yes.
That's good to hear.
Thank you so much for the speedy help.
Richard