Georg Baum wrote: > Am Freitag, 22. Oktober 2004 22:59 schrieb Angus Leeming: >> I won't apply this until I've finished the stuff above, but it now works >> as-is. Perhaps someone else would like to test it out? > > I did, and I could not break it, but I found another reason to use this > mover stuff: Bug 605 is still not completely fixed. Consider the > following situation: > > master.lyx includes sub/child.lyx > sub/child.lyx includes sub/pic.fig (external material, relative file > name) sub/pic.fig > > You will get the following files for a latex export: > > master.tex > sub/child.tex > sub/pic.pstex_t > sub/pic.eps > > sub/child.tex contains "\input{sub/pic.pstex_t}" > sub/pic.pstex_t contains "\includegraphics{pic}" -> BANG! It should be > "\includegraphics{sub/pic}". > > This can be fixed if the external inset runs the conversion in the temp > dir, too, and a copier is used to copy the resulting .pstex_t file. The > attached patch builds on top of the mover patch and implements that. I > did create copy and rename functions with a third argument. This argument > is the "latex name" of the file, that means it is either absolute or > relative to the master document. > BTW, getExtFromContents() is inconsistent: It returns format names, not > extensions for formats that it knows, and it returns file extensions for > formats that it does not know. I have a fix for this, but I wait with > this until the mover stuff is finished.
Sounds interesting. >> Incidentaly, is there a more elegant (shell script) way to ascertain >> whether two directories are the same than: > > I would prefer python and use > os.path.normpath(FROM_DIR) == os.path.normpath(TO_DIR) > , but I guess this is not the answer you want to hear ;-) Actually, I don't mind at all. I'll continue to play with the shell script for a little because I can reduce it (if the files are in different directories) to a single invocation of sed. However, if it turns out the PWD stuff is a PITA, then I'll think about using python. -- Angus