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.
signature.asc
Description: This is a digitally signed message part
