lilypond-user
[Top][All Lists]
Advanced

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

Nested \includes in different subdirectories?


From: Valentin Villenave
Subject: Nested \includes in different subdirectories?
Date: Thu, 5 Jul 2007 19:43:47 +0200

Hello everybody,

Is it possible (and is it a good idea) to include a fileXXXX.ly by
specifying its path, then in the fileXXXX.ly include another
fileZZZZ.ly with a different path, and so on?

a few days ago, I downloaded Nicolas Sceaux's amazing editions of
French baroque operas, (by the way, here's the link:
http://nicolas.sceaux.free.fr/index.php )

Nicolas has done a wonderful job, extremely well organized. Instead of
using the \include command to put together the different sections,
he's written a whole bunch of Scheme functions, which (if i understand
well) browse the directories and pick every \score block they find,
one by one.

Since I'm not comfortable with Scheme, I tried to use a similar
organization in my own score. But it is acting a bit surprisingely...

Example: FileA is in the root directory, FileB in /subdir, and FileC
in /subdir/subsubdir

If you try:

in FileA.ly
\include "./subdir/FileB.ly"

in FileB.ly
\include "./subsubdir/FileC.ly

in FileC.ly
\score { a b c2 }


...it doesn't work!

You have to do

FileB.ly
\include "./subdir/subsubdir/FileC.ly

...like if you still were in FileA; so the absolute path you specify
in FileB has nothing to do with FileB's *actual* location!

(Which is not necessarily wrong; it's just a bit confusing when you're
used to HTML-style linking.)

I can't imagine I am the first one to ask this question; however I
couldn't find anything anywhere.

Regards,
Valentin




reply via email to

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