| I've added the missing text with a sidebar: On Wed 11 Jan 2017 at 05:03:21 (-0700), ptoye wrote: > Thanks all for putting me right. I have to say that the documentation is very > confusing as to the syntax. From the Learning manual:
| A variable is assigned as follows: | namedMusic = { ... } So "..." is typically a sequence of notes or a sequence of music expressions. The {} indicate a seqeunce rather than simultaneous expressions << >>. > which implies that the brackets are needed, but it's followed by: | violin = \new Staff { | \relative { | a'4 b c b | } | } Here { a'4 b c b } is a music expression, \relative is a command that controls how LP interprets the notes' octavation, and \new is a command that wraps one expression in the Staff context. You could write violin = \new Staff \relative { a'4 b c b } just as you could write cello = \new Staff d' because d' is one expression. > and later by: | width = 4.5\cm Here you should read up the Notation Reference ยง3.1.5. width is not a music expression, so you couldn't write, say, { \namedMusic \width } So \width needs to be interpreted in something like \paper { \width and other things }. What you set a variable to (ie the right hand side) determines where you can later use it. > which don't have the brackets. > > How does the parser know when the variable definition has finished if it can > be on multiple lines? If there are no braces (or equivalent), then it'll be a single item, but that item could be a command with its own argument following it. compiler = \markup Rutter I hope some of that makes sense. Cheers, David. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user