Hmm. Interesting.

But I still prefer properly scoped variables!

Peter



-------------------------
Monday, November 4, 2019, 6:46:05 PM, Timothy Lanfear wrote:

I was surprised to find that provided there is no explicit \book statement, 
variables can be redefined between bookparts and behave as desired.
\version "2.19.83"

I.Violin.1 = { \clef "treble" b'1 }
I.Violin.2 = { \clef "treble" g' }
I.Viola = { \clef "alto" d' }
I.Cello = { \clef "bass" g1 }

\bookpart {
  \score {
  <<
    \new Staff { \I.Violin.1 }
    \new Staff { \I.Violin.2 }
    \new Staff { \I.Viola }
    \new Staff { \I.Cello }
  >>
  }
}

I.Violin.1 = { \clef "treble" \key d\major cis''1 }
I.Violin.2 = { \clef "treble" \key d\major a' }
I.Viola = { \clef "alto" \key d\major e' }
I.Cello = { \clef "bass" \key d\major a1 }

\bookpart {
  \score {
  <<
    \new Staff { \I.Violin.1 }
    \new Staff { \I.Violin.2 }
    \new Staff { \I.Viola }
    \new Staff { \I.Cello }
  >>
  }
}

-- 
Timothy Lanfear, Bristol, UK.

Reply via email to