]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.h
* doxy
[lyx.git] / src / tex2lyx / tex2lyx.h
index bde27dab57325008b1900e280775e591144a67ee..3ca64d2193273955d36dd71df5f003ccb6f4211a 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  * \author Jean-Marc Lasgouttes
  *
  * Full author contact details are available in file CREDITS.
@@ -14,7 +14,7 @@
 #define TEX2LYX_H
 
 #include "Parser.h"
-#include "LyXTextClass.h"
+#include "TextClass.h"
 
 #include <iosfwd>
 #include <string>
@@ -28,13 +28,17 @@ namespace support { class FileName; }
 
 class Context;
 
+/// A trivial subclass, just to give us a public default constructor
+class TeX2LyXDocClass : public DocumentClass
+{};
+
 /// in preamble.cpp
-LyXTextClass const parse_preamble(Parser & p, std::ostream & os, std::string const & forceclass);
+void parse_preamble(Parser & p, std::ostream & os, 
+       std::string const & forceclass, TeX2LyXDocClass & tc);
 
 /// used packages with options
 extern std::map<std::string, std::vector<std::string> > used_packages;
 
-
 /// in text.cpp
 std::string translate_len(std::string const &);
 
@@ -110,13 +114,16 @@ extern std::string getParentFilePath();
 
 /*!
  *  Reads tex input from \a infilename and writes lyx output to \a outfilename.
+ *  The (latex) encoding can be provided as \a encoding.
  *  Uses some common settings for the preamble, so this should only
  *  be used more than once for included documents.
  *  Caution: Overwrites the existing preamble settings if the new document
  *  contains a preamble.
  *  \return true if the conversion was successful, else false.
  */
-bool tex2lyx(std::string const & infilename, support::FileName const & outfilename);
+bool tex2lyx(std::string const & infilename, 
+            support::FileName const & outfilename, 
+            std::string const & encoding);
 
 
 } // namespace lyx