[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot use \layout in a variable
From: |
David Wright |
Subject: |
Re: Cannot use \layout in a variable |
Date: |
Wed, 11 Jan 2017 22:07:18 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
| 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.
- Re: Cannot use \layout in a variable, (continued)
- Re: Cannot use \layout in a variable, SoundsFromSound, 2017/01/10
- Re: Cannot use \layout in a variable, Timothy Lanfear, 2017/01/10
- Re: Cannot use \layout in a variable, Urs Liska, 2017/01/10
- Re: Cannot use \layout in a variable, ptoye, 2017/01/11
- Re: Cannot use \layout in a variable, SoundsFromSound, 2017/01/11
- Re: Cannot use \layout in a variable, SoundsFromSound, 2017/01/11
- Re: Cannot use \layout in a variable, David Wright, 2017/01/11
- Re: Cannot use \layout in a variable, Peter Toye, 2017/01/11
- Re: Cannot use \layout in a variable,
David Wright <=
- Re: Cannot use \layout in a variable, Simon Albrecht, 2017/01/12
- Re: Cannot use \layout in a variable, Peter Toye, 2017/01/12