[Top][All Lists]

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

\epsfile relative file locations

From: Jay Anderson
Subject: \epsfile relative file locations
Date: Thu, 28 Nov 2013 22:34:11 -0700

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") ...


reply via email to

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