Georg Baum wrote:
Abdelrazak Younes wrote:
Agreed but, well, I wanted to remove this code from findtexfile but then
it is used in Latex.C and I am not sure it is useful there.
It is used there on purpose IIRC. findtexfile was designed for exactly this
use case: Find a file, using the same search algorithm as TeX.
OK, now I understand that it is used like that in Latex.C. But we are it
for something internal to LyX now and that is not good I guess.
I don't blame you for no knowing that, because (as so often) it is not
documented.
Indeed.
In practice, this means that we cache only files that are in the texmf
tree and there is no room for confusion.
Not good. We should cache all files. This makes the code simpler.
As you prefer... It can be done with a map. No strong opinion on that...
Well, the cache is a map, isnt it?
Yes, sorry, I mean a vector of FileName instead of a simple Filename map
data.
And we should always store FileNames, no
strings please.
Yes.
Well, I think this is misleading somewhat. Because if you use a local
bib file that has the same name as one in the Textmf tree, then you
don't know which one you are using. I think we should prefix './' to the
local one.
This was simply designed to work exactly as it works in LaTeX. If we want to
change that, then we should not store the filenames in a comma separated
list, but use something similar to the new InsetCommandParams, and for each
file store also a flag whether it comes from texmf or not. Using a "./"
prefix for that is too fragile IMHO: "./xyz" will not be found using
kpsewhich if it is not local, but "xyz" will both be found using kpsewhich
and as a local file.
But then, how does it works for files that are neither local nor in the
texmf tree?
But please: We need to get 1.5.0 out of the door, so lets keep the bibfile
storage as it is. If you know an easy way to fix the reload problem that is
fine, but without redesigning the bibfile storage please.
OK, I'll stop here.
Agreed but for me relative path means './toto' and not 'toto'.
Concerning the file system that is the same. Both will work. This seems to
be a personal preference.
On windows yes but not on Unix I think.
Abdel.