]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Preamble.cpp
Remove wmf2eps as EMF > EPS converter
[lyx.git] / src / tex2lyx / Preamble.cpp
index b3f7b1efc8a3f1fba413b57d18b99df5cfbf321b..ea315dd156677da80c165acdce4cbe8e97c5fed9 100644 (file)
@@ -1790,13 +1790,19 @@ void Preamble::parse(Parser & p, string const & forceclass,
                }
 
                else if (t.cs() == "newtheorem") {
+                       bool star = false;
+                       if (p.next_token().character() == '*') {
+                               p.get_token();
+                               star = true;
+                       }
                        string const name = p.getArg('{', '}');
                        string const opt1 = p.getFullOpt();
                        string const opt2 = p.getFullOpt();
                        string const body = p.verbatim_item();
                        string const opt3 = p.getFullOpt();
+                       string const cmd = star ? "\\newtheorem*" : "\\newtheorem";
 
-                       string const complete = "\\newtheorem{" + name + '}' +
+                       string const complete = cmd + "{" + name + '}' +
                                          opt1 + opt2 + '{' + body + '}' + opt3;
 
                        add_known_theorem(name, opt1, !opt2.empty(), from_utf8(complete));
@@ -2012,7 +2018,7 @@ void Preamble::parse(Parser & p, string const & forceclass,
        if (!forceclass.empty())
                h_textclass = forceclass;
        tc.setName(h_textclass);
-       if (!tc.load()) {
+       if (!LayoutFileList::get().haveClass(h_textclass) || !tc.load()) {
                cerr << "Error: Could not read layout file for textclass \"" << h_textclass << "\"." << endl;
                exit(EXIT_FAILURE);
        }