[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing functions for large-scale layout
From: |
David Kastrup |
Subject: |
Re: Writing functions for large-scale layout |
Date: |
Fri, 26 Oct 2012 00:01:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Christopher Smith <address@hidden> writes:
>
>>> Assign the result to a variable xxx and use \xxx.
>>
>> The assignment works, but then Lilypond 2.16.0 throws "error: unknown
>> escaped string `\xxx'" and finally fails, expecting '='. I think it
>> may be having trouble figuring out what to do with the resulting
>> value, which is (currently) a score.
>
> Score variables can be used only as a score body, like
> \score { \xxx \layout { } }
> or similar.
>
>> (I'm happy to change that if something else will work better; I'm just
>> trying to write a function that takes individual part excerpts and
>> lays them out in a complex but stereotyped way.)
>>
>>> Oh, and what should also work is writing
>>> $#{ \schemefunctioncall ... #}
>>
>> This produces "error: syntax error, unexpected SCORE_IDENTIFIER <the
>> entire text of the function call, including the leading $ and trailing
>> }>".
>
> Again, score identifiers can't be used at top level, but have to be
> placed _inside_ of a \score again. This is similar to book variables
> (which also need to get placed inside of \book).
>
> I actually just found out that obliterating the assignment for score
> identifiers is dead easy, so it will likely be unnecessary in about a
> week. However, you will still have to heed writing \score { ... }
> around any scheme function call even then.
<URL:http://code.google.com/p/lilypond/issues/detail?id=2928> should
take care of the scheme function call issue, obliterating the need for
either $#{ ... #} or an assignment. You will still need \score { ... }
around the call.
--
David Kastrup