Hi all,As you might know, LyX graphics dialog has an "Edit" button intended to open figures in an editor which may be selected by the system depending on their file format. But figures included in LyX using the graphics dialog are almost always made with external editors using their own file format (xfig, graffle, svg, etc.) and then exported to pdf, png, etc. The problem is that LyX can't take into account the fact that when one clicks the "Edit" button to edit a file 'figure.pdf', one intends to open the original file, e.g. 'figure.graffle' with its corresponding editor (e.g. OmniGraffle).
To solve this problem, I wrote lyxfigedit, a little bash script (see attached file) that allows to edit a figure by opening the appropriate file in its editor. This trick only works on Mac OS. [To developpers: For sure, a better solution would be to integrate the concept directly into LyX.]
To use the shell, make it executable (and accessible in your path) and then you'll be able to use it through 'Preferences > File formats' for each file format you wish to specify.
For example,'LyX preferences > File formats > PDF (ps2pdf)' > Editor: lyxfigedit $ $i .pdf .graffle
will open 'example.graffle' in OmniGraffle (if installed) when clicking the Edit" button in LyX graphics dialog for 'example.pdf'. If no editor nor file 'example.graffle' is found, the PDF file will just be shown in the Finder.
This shell is released under the GNU GPL (http://www.gnu.org/licenses/ gpl.html). I hope that it will be usefull to some LyX users on Mac OS...
Kind regards, Mael. PS: perhaps this file could be made available in the LyX Wiki, no? -- Mael Hilléreau http://mael.hillereau.free.fr
lyxfigedit
Description: Binary data
