[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: let \layout accept several \layouts stored in varia
From: |
Thomas Morley |
Subject: |
Re: Feature request: let \layout accept several \layouts stored in variables |
Date: |
Sun, 15 Jul 2018 09:38:48 +0200 |
2018-07-15 9:24 GMT+02:00 Malte Meyn <address@hidden>:
> Hi list,
>
> it’s possible to write something like
>
> %%%%%%%%%%%%%%%%%%%%%%%%%
> ambitus = \layout {
> \context {
> \Voice
> \consists Ambitus_engraver
> }
> }
>
> \score {
> \relative { c' d e f g a b c }
> \ambitus
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%
>
> or put the \layout variable in a \layout block:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%
> \score {
> \relative { c' d e f g a b c }
> \layout { \ambitus }
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%
>
> Now it would be nice if \layout could accept several such \layout variables:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%
> musicaFicta = \layout {
> \context {
> \Voice
> suggestAccidentals = ##t
> }
> }
>
> \score {
> \relative { c' d e f g a b c }
> \layout {
> \ambitus
> \musicaFicta
> }
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%
>
> Currently, that gives an “error: bad expression type” for \musicaFicta. If
> not putting \ambitus and \musicaFicta in another \layout layer, that will
> give two scores, one with Ambitus_engraver and one with suggestAccidentals.
>
> Would it be possible to implement this?
>
> Cheers,
> Malte
Hi Malte,
not exactly what you're asking for, but we can already do:
\version "2.19.82"
ambitus = \with { \consists Ambitus_engraver }
musicaFicta = \with { suggestAccidentals = ##t }
\score {
\relative { c' d e fis g a b c }
\layout {
\context {
\Voice
\ambitus
\musicaFicta
}
}
}
Cheers,
Harm