Hans,
Thank you for your advice.
That format is not what is given in the manual.
\bookpart {
\header { … }
\score { … }
}.
An what is the advantage of being able to code separate files (for individual
movements) if the variables for each must be copied into the book part?
If in the future I wanted to change anything in an individual movement I would
need to compile all of the bookparts.
The only option, that I can see, is to not use variables and insert all pitches
within \score.
Your guidance is appreciated.
M
From: Hans Aikema [mailto:[email protected]]
Sent: Sunday, March 12, 2023 3:51 PM
To: Mark Stephen Mrotek <[email protected]>
Cc: lilypond-user mailinglist <[email protected]>
Subject: Re: Variables and Bookpart
On 12 Mar 2023, at 20:38, Mark Stephen Mrotek <[email protected]
<mailto:[email protected]> > wrote:
Jean Abou Samra,
Thank you.
Yes variables must (and are) placed before the \score in each individual
movement. That is why each complies perfectly when done individually.
The error appears when the code for the movement (that compiles) is copied and
pasted into the \bookpart.
Your kind attention is appreciated.’
Mark
[…]
Mark,
Based on your response I think you did not get the nuances of what Jean tried
to tell you.
The copying/pasting of your working score INSIDE \bookpart means that you are
copying your variable definition (which is already properly outside the \score)
INSIDE the \bookpart, while it should be outside both the \bookpart and the
\score
So you should
{copy variables to here}
\bookpart {
{copy rest of the score here}
}
When using copy/paste of your score into a file with a \bookpart
HTH
Hans
\version "2.22.2"
ArightOne = \relative c'' {c1}
ArightTwo = \relative c'' {c,1}
AleftOne = \relative c' {c1}
AleftTwo = \relative c' {c,1}
\score {
\new PianoStaff
<<
\new Staff = "right" << \ArightOne \\ \ArightTwo >>
\new Staff = "left" { \clef bass << \AleftOne \\ \AleftTwo >> }
>>
}
\version "2.22.2"
\bookpart {
ArightOne = \relative c'' {c'1}
ArightTwo = \relative c'' {c,1}
AleftOne = \relative c' {c'1}
AleftTwo = \relative c' {c,1}
\score {
\new PianoStaff
<<
\new Staff = "right" << \ArightOne \\ \ArightTwo >>
\new Staff = "left" { \clef bass << \AleftOne \\ \AleftTwo >> }
>>
}
}