Angus Leeming wrote: > Georg Baum wrote: > >> Angus Leeming wrote: >>> 2. Export->Latex >>> buffer.tex will include the snippet: >>> \input{images/img.pstex_t} >>> It is the user's responsibility to generate 'images/img.pstex_t' >>> correctly. >> >> No. This is 1.3 behaviour, 1.4 creates 'images/img.pstex_t' and >> 'images/img.eps.' This is alo a case where the converter is called on the >> original file and therefore modifies it :-((( > > Not so. It modifies a COPY of the original file. That's a big difference.
Not for latex export. For dvi, ps, pdf export, yes. The reason was probably that we don't want the mangled file names in the .tex file. > Ok, so the bottom line is that a call to > Export->Latex > results in everything that would be needed to compile buffer.tex being > placed in the /tmp/lyx_tmp.../lyx_tmpbuf0/ directory? The only conceptual No. The original files are converted where they are, but we should convert copies in the tmp directory. > problem thereafter is working out which of these files to 'return' in a > 'buffer_latex' directory. (This is something we don't do but maybe should > consider doing in the future?) This is no problem, we have ExportData::externalFiles() for this purpose. Right now, I don't understand anymore why we don't convert the files in the temp dir and then copy them to the buffer dir, because all the needed machinery is there. >> Another problem is that fig2pstex.sh does not know of latex's stupid >> interpretation of relative filenames (relative to the master document, >> not the included one. Therefore images/img.pstex_t contains >> \includegraphics{img}, and this fails of course. > > Ok, I understand your point. I don't think that it's right because my > 'nasty' hack changes that to \includegraphics{<absolute path to>/img}, no? ??? It replaces the filename in the .fig file, not the filename in the .pstex_t file. The latter is wrong, the .fig file is ok. Now I get confused ;-) > I tried to start wrapping all this up in a class (filename) but got lost > in the intricacies. I still think that doing so would make life a lot > easier. Probably, but I am not so sure about the "lot". And this class can certainly not be used in figtools.sh! Georg