On 25/01/2014 7:13 a.m., Wolfgang Engelmann wrote:
Dear Lyx Users,
I have exported my lyx file as a lyx archive, which contains as a tar.gz
file the lyx file, the used bib file and the figures used. This is quite
handy, because only the used figures, bib are saved.
However, I have this problem:
The path to the figures should be ./Kalanchoe-closed.jpg
as an example and not e.g.:
\begin_inset Graphics
filename BluFloClockTar/AAAflowerclock20130909/Kalanchoe-closed.jpg
since I would like to move the lyx file to another folder or send it away.
There are many figures, therefore I would prefer NOT to select each
figure path anew.
What would you recommend?
Using the tex file and, in an editor, replace the path, to end up with
./figureFile? Or is there a way in Lyx? (Which would be handy)
Wolfgang
Hullo Wolfgang,
This is the kind of thing that can be done with the find-&-replace
script of the pLyX scripting system (on the wiki under Examples/pLyX
system) which allows you to work from within the LyX gui. In fact I was
faced with a similar task a couple of weeks ago (and found a bug in the
script which I've since corrected). The system takes a little setting up
(two file formats and two converters to be defined, plus some files to
be distributed around your personal LyX folders), and some practice to
get a feel for how it works.
If you do go this way, then you would need to insert a .find-&-replace
inset containing
-i -r
to specify a regular expression inset search, followed by two .argument
insets, the first (the find regular expression) containing
filename .+/([\w\d\-]+)\.jpg
and the second (the replace expression) containing
filename ./\1.jpg
Then click the View other formats button and select pLyX.
This assumes that all your graphics are .jpg format, and that the names
of your images (like 'Kalanchoe-closed') are made up only from letters,
digits, hyphens and underscores.
Andrew
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com