Alex Fernandez wrote: > On Thu, Jun 11, 2009 at 12:01 PM, Jürgen Spitzmüller<[email protected]> wrote: > > The whole point is that the pictures are _not_ copied to the tmp dir. > > They are still (only) in /home/work/. > > That would be in-place conversion: /home/work/doc.lyx becomes > /home/work/doc.html, and references the same images. But that is not > what other LyX developers want: they prefer an output folder > /home/work/docHtml/ and place everything there: doc.html and images. > So copying files to /tmp is necessary.
But it does not happen. At least not for the images here. (I might have misunderstood the --directory option, though). > > If you use LaTeX as an intermediate step, LyX copies the pictures, but it > > mangles the filename. /home/work/pic.eps will become something like > > tmp/home_work_pic.eps. This is to allow a document to include to > > different files with the same name from different directories, e.g. > > /home/work/pic.eps and /home/private/pic.eps > > LaTeX-style paths are not good for eLyXer, since it uses the LyX file > to find the pictures and paths are not changed there. Exactly. But what does eLyXer do in the described case? > > As Richard said, eLyXer might copy them to the tmp dir, but I'm not sure > > this will work for pictures from different directories. Imagine I my > > /home/work/doc.lyx includes a file /extras/pix/pic.png and another one > > ../private/pic.png. I think this will be difficult to resolve (without > > filename mangling as we do for LaTeX output). > > eLyXer will work with images from different directories: it will > import images from absolute paths and generate local ones. (If it > doesn't it's a bug.) > > > So I think that using absolute paths that point to the original files is > > the easisest thing to do to resolve view from within LyX. I agree that no > > absolute path should be used on export, which is probably what people do > > for the published version. > > Since eLyXer is an export filter, it does not make sense to use > absolute paths IMHO. So, shall we stick to the "copy everything to > /tmp" approach and make it work? (I myself prefer in-place conversion, > but above all want export to work.) To clarify: We are talking about View>HTML. In that case, the HTML file that opens is in /tmp, it is _not_ copied to /home/work. The images, however, are in /home/work (and not copied to /tmp). So as long as you do View>HTML, you need to either: a.) use absolute paths so that the images in /home/work are found or b.) copy all images to /tmp and resolve the paths again as relative paths Neither happens at the moment. The situation is completely different if you do File>Export. Then all files will end up in /home/work, and all images should be displayed correctly (with relative paths). Jürgen > Alex.
