First, I apologize for saying that LyX creates .tex files behind your
back. It does not. I actually created them myself and then
forgot about it (duh). Second, I looked into the code and
found out some more about the spaces problem. Actually, there should be no
problem for LyX files which do not have any *graphics* in them.
This is because the culprit of the bug lies in the setting of input@path in file
buffer.C(Buffer::makeLaTeXFile()). This seems to be a good place to put
the warning.
quote:

        // so this is OK. input@path is set when the actual parameter
        // original_path is set. This is done for usual tex-file, but not
        // for nice-latex-file. (Matthias 250696)
[cut]
                if (!original_path.empty()) {
                        ofs << "\\makeatletter\n"
                            << "\\def\\input@path{{"
                            << original_path << "/}}\n"
                            << "\\makeatother\n";
                        texrow.newline();
                        texrow.newline();
                        texrow.newline();
                }

unquote.

Associated input tex files are created in the tmp directory, and therefore
should not have any problem (as long as a single line is added to the code, see
patch). Graphic files are not copied to the tmp directory (a possible
solution), but rely on the input@path variable (which must not have spaces). 

patch
Changelog: file insets/insetinclude.C
Temporary file names which have spaces are changed to underscores. This
enables the input of LyX files from more directories.
------------------------------------
--- insetinclude.C.bak  Sun Jul  2 12:39:40 2000
+++ insetinclude.C      Sun Jul  2 13:04:18 2000
@@ -363,6 +363,7 @@
                if (!master->tmppath.empty()
                    && !master->niceFile) {
                        incfile = subst(incfile, '/','@');
+                       incfile = subst(incfile, ' ','_');
 #ifdef __EMX__
                        incfile = subst(incfile, ':', '$');
 #endif
------------------------------------


--
saludos,

Edscott

Reply via email to