Hi developers,
I wrote an applescript to enable converters for OmniGraffle graphics
format (see "A shell for launching figure editor under Mac OS" thread
in lyx-users list, or the LyX Mac wiki). However, I found that LyX
doesn't support graphics if they are stored as Mac OS X packages. Mac
OS X packages are unix folders disguised to look like single files.
When LyX converts graphics, a test for checking that the input file
exists is performed (perhaps something like a "test -f $$i" but in C
language...). The problem is that when this file is a Mac OS package
(which is the case of '.graffle' figures only if they include images;
see example below), it is actually a unix folder, and thus isn't
recognized as a file! This results in a "File not found" error
message, and no converter call. However, the file may really exist as
a folder (a package).
Would it be possible to enable the MacOS version of LyX to work with
graphics stored as MacOS packages? I mean would it be possible to
replace the kind of "test -f $$i" by a kind of "test -r $$i" in order
to check for folders too?
Note that this problem may occur with other programs that Omnigraffle.
An example is available here: http://mael.hillereau.free.fr/public/
Test.zip. It's a lyx document with two graphics inserted
('test1.graffle' including an image and so being a package, and
'test2.graffle' not including images and thus being a regular file).
You'll need to setup the 'og-export' applescript I wrote (available
in the LyX wiki : http://wiki.lyx.org/Mac/Mac) as well as Omnigraffle
(an evaluation version is downloadable on the omnigroup site) in
order to compile the lyx document.
Mael.
--
Mael Hilléreau
http://mael.hillereau.free.fr