On 11/26/2010 01:08 PM, JuJu wrote:
> 
> Hi,
> 
> I was wondering if there is any possibility to make Lyx know where I moved
> the files (like pictures f.e.) that I am referring to in my Lyx-document.
> 
> For example:
> I save a STATA result called output.tex in my folder "Work" on the desktop.
> I open a new Lyx-Document -> then i use the menu "insert->file" to include
> my file. I use the option browse to tell Lyx where the document is stored.
> Lyx now shows the following path /Desktop/Work/output.tex.
> Up to here everything is fine.
> But now i decide to sort all of my files in folder "Work" and create a
> subfolder "STATA_Outputs".
> Now the path for Lyx to find the document has to be
> /Desktop/Work/STATA_Outputs/output.tex.
> But Lyx did not recognize that i moved the file and still shows
> /Desktop/Work/output.tex in the Browse-field.
> That of course does not work anymore now, because the file is not there.
> Same problem with graphs and pdfs...
> 
> So my question is now: Is there a possibility to make Lyx automatically
> adjust the paths of inserted pictures, pdfs, files, etc. when i move them.
> 
> To make that clear: for just one file it would not be a problem to manually
> change the path. But i am working with uge datasets over a long period of
> time. So I add a lot of files to my Lyx document continually and when i
> start working in one project i never know in the beginning how the folder
> structure will look in the end. I basically have to re-sort the files all
> the time in new folders because the folder-structure evolves over time. And
> I need to sort the files in that way, because i also want to excess them
> outside of Lyx in a structured way.

This is not automatic, but since .lyx files are text, couldn't you open
them in a text editor and do a find and replace (or use regular
expressions, depending on complexity) to change the paths for all your
images in one go? The images in the .lyx file will look something like

\begin_inset Graphics
        filename path/to/image.png

Fareed

Reply via email to