1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
5 * Copyright 1995 Matthias Ettrich
6 * Copyright 1995-2000 The LyX Team.
8 * This file is Copyright 1998
11 * ======================================================
17 #pragma implementation
20 #include "ImportLaTeX.h"
22 #include "support/syscall.h"
23 #include "support/filetools.h"
24 #include "bufferlist.h"
26 extern BufferList bufferlist;
32 ImportLaTeX::ImportLaTeX(string const & file)
38 Buffer * ImportLaTeX::run()
41 string tmp = lyxrc.relyx_command + " -f " + file;
44 int result = one.startscript(Systemcalls::System, tmp);
46 string filename = ChangeExtension(file, ".lyx");
47 // File was generated without problems. Load it.
48 buf = bufferlist.loadLyXFile(filename);