mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
LaTeX can now find \input insets where the file has a relative path.
(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
This commit is contained in:
parent
01080c9eda
commit
8478e5dcfe
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user