Shane Brandes <sh...@grayskies.net> writes:

> o.k. back to the include with book part problem. Here is my almost
> minimal code example, which consists of files a.ly, b.ly and test.ly.
> The two files compile alone correctly but when stuck in the bookpart
> they go to pieces.

Sigh.  Your original complaint was:

    O.k. having gone in circles trying to figure out the whole bookpart
    apparatus I discovered that the documentations statement that using
    include is the same as copying and pasting the include into a document
    is false if the include consists of a complete lilypond file. Is there
    a way around that?

This has _nothing_ whatsoever to do with \include, it has to do with
putting complete documents inside of a \bookpart .  Which does not allow
for assignments, for example.

> %---- bookpart test.ly
>
> \bookpart {\include "a.ly"}
> \bookpart {\include "b.ly"}

The problem is that bookparts (and books) don't have their own local
variable scopes so you cannot do local assignments in them.  The
expectation would be that they don't generally bleed through to outside,
and indeed your usage pattern sort of demonstrates the expectation of
such scoping.

Of course, doing the same in Scheme just works in the global scope and
thus bypasses this consideration anyway.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to