lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: layout of markup text (Peter Gentry)


From: Simon Albrecht
Subject: Re: layout of markup text (Peter Gentry)
Date: Thu, 2 Aug 2018 14:09:48 +0200

On 02.08.2018 10:43, Peter wrote:
Thanks Simon yes sometimes I am not sure what environment the interpreter is in, especially when it is expecting a music Element or not. It's obvious in the simple case but can be confusing in a more (unessessaryily?) complex file.

With variable definitions it is a little simpler because they are only allowed at toplevel [1], so you just have to make sure that every single {} or <<>> or #() has been closed before you include the file with the variable assignment.

Best, Simon

[1] Well, except for \paper, \layout and \header, which have their own scope IIUC.


Thanks.

On 2 August 2018 00:59:09 BST, Simon Albrecht <address@hidden> wrote:

    On 23.07.2018 16:22, Peter Gentry wrote:

        It looks as though in this case the compiler is treating each
"addTextSpannerText.ly" in the parts as music rather than scheme.

    \include acts in a way that is completely indistinguishable from just
    pasting the content of the file instead of the include. So you need to
    organise your input files in a way that allows for this, and that’s
    nearly always just a matter of thinking it all the way through and
    finding the right setup.
    If the variable definition in your include file throws a mistake, then
    apparently at the point where you write \include you’re still in an
    environment where variable definitions aren’t possible.
    Since it’s superfluous to include a file multiple times, you might also
    look at the openlilylib/oll-core module, which implements a function to
    only include a file if it hasn’t been included yet.

    Best, Simon


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]