1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
5 * Copyright 1995 Matthias Ettrich
6 * Copyright 1995-1999 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"
27 extern BufferList bufferlist;
33 ImportLaTeX::ImportLaTeX(string const & file)
39 Buffer * ImportLaTeX::run()
42 string tmp = lyxrc->relyx_command + " -f " + file;
45 int result= one.startscript(Systemcalls::System, tmp);
47 string filename = ChangeExtension(file, ".lyx", false);
48 // File was generated without problems. Load it.
49 buf = bufferlist.loadLyXFile(filename);