]> git.lyx.org Git - features.git/commitdiff
LaTeX can now find \input insets where the file has a relative path.
authorAngus Leeming <leeming@lyx.org>
Fri, 9 Aug 2002 11:16:54 +0000 (11:16 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 9 Aug 2002 11:16:54 +0000 (11:16 +0000)
(Thanks to John for unwittingly informing me of the existance of input@path.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4920 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/PreviewLoader.C
src/insets/ChangeLog
src/insets/insetinclude.C

index 58ee7bf15844847794e4aa1947bbd40b5045ba5f..e3b6918ab1a019d7fdd4041b881d7739b0a69eeb 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-09  Angus Leeming  <leeming@lyx.org>
+
+       * PreviewLoader.C (dumpPreamble): pass Buffer::filePath() to
+       Buffer::makeLaTeXFile() so that LaTeX can find \input files because
+       input@path is now set correctly.
+
 2002-08-06  Angus Leeming  <leeming@lyx.org>
 
        * PreviewLoader.C: add support for preview.sty 0.73 (currently
index f89fddd03cff84f32831c65f777d9dd598a01f08..091d9ac9b582c2e5ea59f847786b434b21a7a837 100644 (file)
@@ -577,7 +577,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
        // Why on earth is Buffer::makeLaTeXFile a non-const method?
        Buffer & tmp = const_cast<Buffer &>(buffer_);
        // Dump the preamble only.
-       tmp.makeLaTeXFile(os, string(), true, false, true);
+       tmp.makeLaTeXFile(os, buffer_.filePath(), true, false, true);
 
        // Loop over the insets in the buffer and dump all the math-macros.
        Buffer::inset_iterator it  = buffer_.inset_const_iterator_begin();
index 79db10339804e7a0d5c44e5716f3acffb7555706..f46e262ea594f792364faa7574b0306d733d5241 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-09  Angus Leeming  <leeming@lyx.org>
+
+       * insetinclude.C (latexString): remove fudge now that I've found out
+       how to enable LaTeX to find the file using input@path.
+
 2002-08-09  John Levon  <levon@movementarian.org>
 
        * insettext.h:
index 74dbb0f691c321547ff0e2949ac454226517150f..018da0fb3889ba136a3e577a273ed7962a3aac7c 100644 (file)
@@ -565,22 +565,7 @@ string const InsetInclude::PreviewImpl::latexString() const
        ostringstream os;
        parent().latex(view()->buffer(), os, false, false);
 
-       // This fails if the file has a relative path.
-       // return os.str().c_str();
-
-       // I would /really/ like not to do this, but don't know how to tell
-       // LaTeX where to find a \input-ed file...
-       // HELP!
-       string command;
-       string file = rtrim(split(os.str().c_str(), command, '{'), "}");
-
-       if (!AbsolutePath(file))
-               file = MakeAbsPath(file, view()->buffer()->filePath());
-
-       ostringstream out;
-       out << command << '{' << file << '}' << endl;
-       
-       return out.str().c_str();
+       return os.str().c_str();
 }