With the normal \include command and #(ly:set-option
'relative-includes #t) relative includes work. However \epsfile
doesn't follow relative includes. For instance if you have a.ly which
uses b.eps and compile it from a different directory (e.g. 'lilypond
../a.ly') it will fail.

Here's a workaround:

% Guile 1.8. This makes a bad assumption that filename is second option on the
% command line. It could be somewhere else or not on the command line at all if
% it is included from another file.
%
% What's the right way to do this? It looks like 2.0 has a (current-filename)
% function which might be a better option, but I'm not sure how that interacts
% with lilypond files.
#(define (relative filename)
  (string-append (dirname (cadr (command-line))) "/" filename))

... \epsfile #X #50 #(relative "file.eps") ...

-----Jay

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

Reply via email to