>>>>> "Yann" == Yann MORERE <[EMAIL PROTECTED]> writes:
Yann> hello lyx developpers, ----1st mail posted en lyx-user
Yann> i've got a problem with the bibtex reference insertion, (in lyx
Yann> 1.1.3 and lyx 1.1.4pre2, and at least 1.1.4),
OK, I took a closer look at the problem and it seems to me that
the appended patch should help.
What was wong with the previous approach is that a file given as a
relative path would return a relative path (whereas is is more
reasonable to get an absolute one) and, worse, if you ask for a file
like foo/bar.bib, then findtexfile() will only search for bar.bib.
Concerning the problem with older kpsewhich, a stopgap measure (since
we do not use this format stuff anyway) is to remove the --format
option. Note that I removed the OnlyFileName() too, since latex
certainly does not do that.
Lars, I am not sure this patch is completely right, so I did not
commit it yet. Yann and Staffan, could you try to apply it and tell us
whether it helps?
JMarc
Index: filetools.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/filetools.C,v
retrieving revision 1.34
diff -u -r1.34 filetools.C
--- filetools.C 2000/02/07 20:17:03 1.34
+++ filetools.C 2000/02/17 10:50:21
@@ -1019,15 +1019,13 @@
Lgb
*/
- // If fil is a file with absolute path we just return it
- if (AbsolutePath(fil)) return fil;
-
- // Check in the current dir.
- if (FileInfo(OnlyFilename(fil)).exist())
- return OnlyFilename(fil);
-
+ // If the file can be found directly, we just return a
+ // absolute path version of it.
+ if (FileInfo(fil).exist())
+ return MakeAbsPath(fil);
+
// No we try to find it using kpsewhich.
- string kpsecmd = "kpsewhich --format=" + format + " " + OnlyFilename(fil);
+ string kpsecmd = "kpsewhich " + fil;
cmdret c = do_popen(kpsecmd);