>>>>> "Dekel" == Dekel Tsur <[EMAIL PROTECTED]> writes:
Dekel> Partially. The problem occur when the regular expression
Dekel> matched "foo.eps (Eps Graphics File)" instead of "foo.eps", and
Dekel> the space in the .dep file caused bad things. With my patch,
Dekel> "foo.eps (Eps Graphics File)" will not be inserted to the dep
Dekel> file, but "foo.eps" is also not inserted to the dep file, so
Dekel> LyX won't rerun latex when only foo.eps is updated.
I see.
Dekel> PS: I think that the line "if (contains(foundfile,' '))
Dekel> continue;" should also be added (or alternatively, the depfile
Dekel> code should be able to handle spaces in filenames)
This would work fine by using LyxLex to read it and adding "quotes"
around the file name. Lars seems to enjoy a lot removing lyxlex uses
anyway. We'll try to convince him that using lyxlex for depfile is the
right thing to do.
Dekel> And now for a different problem that need to be fixed: If the
Dekel> path to the LyX file contains spaces, then the latex run will
Dekel> cause a "missing \begin{document}" error (due to the
Dekel> \input@path command). The following patch will generate a less
Dekel> cryptic error message. Should it be applied or does anyone have
Dekel> a better idea ? (one possible solution is to create a symbolic
Dekel> link, but this will not work on Windows9x).
The general problem is not really input@path, but rather files with
spaces in name in general: trying to do
\input{foo bar}
or
\input{my dir/foobar}
does not work with LaTeX. We cannot really use Duncan's trick [*] (as far
as I understand it :) since we do not have access to the places where
the \input is done. Moreover, in some places \InputIfFileExists does
an \openin, and this is what breaks \input@path with spaces. Duncan,
do you think we can come up with a clever definition of \input@path
which gives the right catcode to spaces?
Another way out of the input@path nightmare is to change the value of
TEXINPUTS before running latex. We have to be careful in doing this,
especially since the syntax of TEXINPUTS is different between latex
versions. Definitely not something we want to do for 1.1.6fix2.
Thoughts?
JMarc
[*] see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg20428.html