From 8cff18e1c14fa29936341ccb0825ddd5a0498660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Mon, 15 Jun 2009 20:11:39 +0000 Subject: [PATCH] branch: tex2lyx/preamble.cpp: - support for fileformat 254 (esint) - using amsmath and esint automatically is safer than not to use them. The automatic usage is also our default when you create a new LyX file. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30118 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/preamble.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index 1e26e6caf9..a5b9d86d55 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -120,7 +120,8 @@ string h_paperfontsize = "default"; string h_spacing = "single"; string h_papersize = "default"; string h_use_geometry = "false"; -string h_use_amsmath = "0"; +string h_use_amsmath = "1"; +string h_use_esint = "1"; string h_cite_engine = "basic"; string h_use_bibtopic = "false"; string h_paperorientation = "portrait"; @@ -299,6 +300,9 @@ void handle_package(Parser &p, string const & name, string const & opts, else if (name == "amsmath" || name == "amssymb") h_use_amsmath = "2"; + else if (name == "esint") + h_use_esint = "2"; + else if (name == "babel" && !opts.empty()) { // check if more than one option was used - used later for inputenc // in case inputenc is parsed before babel, set the encoding to auto @@ -444,7 +448,7 @@ void handle_package(Parser &p, string const & name, string const & opts, void end_preamble(ostream & os, TextClass const & /*textclass*/) { os << "#LyX file created by tex2lyx " << PACKAGE_VERSION << "\n" - << "\\lyxformat 253\n" + << "\\lyxformat 254\n" << "\\begin_document\n" << "\\begin_header\n" << "\\textclass " << h_textclass << "\n"; @@ -468,6 +472,7 @@ void end_preamble(ostream & os, TextClass const & /*textclass*/) << "\\papersize " << h_papersize << "\n" << "\\use_geometry " << h_use_geometry << "\n" << "\\use_amsmath " << h_use_amsmath << "\n" + << "\\use_esint " << h_use_esint << "\n" << "\\cite_engine " << h_cite_engine << "\n" << "\\use_bibtopic " << h_use_bibtopic << "\n" << "\\paperorientation " << h_paperorientation << "\n"