lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variables and Bookpart


From: Jean Abou Samra
Subject: Re: Variables and Bookpart
Date: Sun, 12 Mar 2023 19:23:29 +0100
User-agent: Evolution 3.46.4 (3.46.4-1.fc37)

Le dimanche 12 mars 2023 à 11:16 -0700, Mark Stephen Mrotek a écrit :

Hello,
 
Each movement of a piano piece has a separate file. In each movement the various voices are identified by a variable, e.g., ArightOne, BleftTwo. Each file compiles perfectly individually.
When the file is copied into
\bookpart {
  \header {
}
  Copied here
}
It does not compile correctly and the error:
syntax error, unexpected SYMBOL
appears repeatedly followed by one of the variable names, e.g. ArightOne = \relative c'' {
 
What is my error?

Amusingly, the same question was asked on the French-speaking list (lilypond-user-fr) yesterday. (OK, not exact same question since it was about \book. Still.)

You apparently have assignments inside your \bookpart, like

\bookpart {
  ArightOne = \relative c'' { c }
  \score { \ArightOne }
}

which is not valid. Just like you cannot do

\score {
  ArightOne = \relative c'' { c }
  \ArightOne
}

but need to do

ArightOne = \relative c'' { c }
\score {
  \ArightOne
}

you cannot do

\bookpart {
  ArightOne = \relative c'' { c }
  \score { \ArightOne }
}

but you can do

ArightOne = \relative c'' { c }
\bookpart {
  \score { \ArightOne }
}

Syntactically, \bookpart encloses several elements and those are grouped into a book part. An assignment is not an "element" (it does not have a value), so it cannot be placed inside \bookpart, but must be outside.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]