[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 09:46:16 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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:
>
> which implies that the brackets are needed, but it's followed by:
>
> and later by:
>
> which don't have the brackets.
>
> How does the parser know when the variable definition has finished if it can
> be on multiple lines?
Without the quotations, it's tricky to guess what you've seen.
Some hints:
{ c' } is a valid input file: a music expression.
<< c' >> too because << >> indicates that the expression(s) contained
are simultaneous. In this example, there's just one.
\absolute c' is a valid input file: the command is a music expression,
and the command's argument is a music expression composed of a single item.
If you write more than one item, you need { } or << >> to show whether
the expressions are sequential or simultaneous.
The same applies to defining variables. Normally you will see
something = { a' b' c'' } but something = a'
is also allowed because there's only a single item after the =.
A lot of the examples have just \relative { ... }
which is a valid input file.
Finally, if you put several of the above into a file, each will give
you a separate score. That's because LP wraps the individual expressions
in a great deal of context stuff automatically; voice, staff and score.
Cheers,
David.