Thanks, Enrico,
however, I was not asking for that, but for a quick and perhaps general
(i.e. for the whole document) way to remove a path. Example:
pathX/picture1
should be turned into
picture1
same with
pathX/picture2
should be turned into
picture2
same with
pathy/picture3
should be turned into
picture3
etc
Note that I did copy all the outside pictures in question in the folder
with my lyx document.
Wolfgang
Am 12.04.2015 um 18:41 schrieb Enrico Forestieri:
Wolfgang Engelmann writes:
Is there a better way of getting all figures/tables in the same folder
so that the tar.gz has no subtrees?
I often get figures from other folders/subfolders (e.g. by a colleague)
which especially with larger documents I notice not before I have
archived (>file>export>lyx archive) the document.
If so, I copy these files in the main folder. However, lyx remembers the
former path(es) and does not find the copied one. What I do is to open
the lyx file with an editor and remove the (now wrong) paths, which is
easier than going through the individual items changing paths in lyx.
I just wonder, whether there is a lyx way of doing it (so to speak,
resetting the paths to a default - the figure only).
No, there is currently no way to do that within LyX. Note that this is
not a problem with a lyx archive only. If you have figures outside the
document dir and you try to export to latex, if a figure needs to be
converted to a format the particular latex flavor can handle, the
converted figure is placed alongside the original one. So, for example,
if you reference a figure in a directory where you don't have write
permission, the export fails. All of this could be handled by adding a
submenu entry (maybe in the "Document" menu) "Copy files to document dir"
(or something along that line). This would cause LyX to scan all used
files and copy those outside the document dir to a common subdir named
<docname>-files, updating also the internal paths. In this way, both
export and archive will produce a self-contained subtree.
Please, feel free to file an enhancement request at
http://www.lyx.org/trac/wiki/BugTrackerHome.