]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/preamble.cpp
* src/frontends/GuiDocument.{cpp,h}:
[lyx.git] / src / tex2lyx / preamble.cpp
index 9e88c2b5e4c2aeae4a63454fb467dc4bbe91e50e..3813a36bf66b734d09bab2ce81252b729c44eacf 100644 (file)
@@ -18,7 +18,9 @@
 #include "Layout.h"
 #include "Lexer.h"
 #include "TextClass.h"
+
 #include "support/convert.h"
+#include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
@@ -35,9 +37,9 @@ using namespace lyx::support;
 namespace lyx {
 
 // special columntypes
-extern std::map<char, int> special_columns;
+extern map<char, int> special_columns;
 
-std::map<string, vector<string> > used_packages;
+map<string, vector<string> > used_packages;
 
 // needed to handle encodings with babel
 bool one_language = true;
@@ -459,8 +461,10 @@ TextClass const parse_preamble(Parser & p, ostream & os, string const & forcecla
                        p.setCatCode('@', catOther);
                }
 
-               else if (t.cs() == "newcommand" || t.cs() == "renewcommand"
-                           || t.cs() == "providecommand") {
+               else if (t.cs() == "newcommand" 
+                        || t.cs() == "renewcommand"
+                        || t.cs() == "providecommand"
+                        || t.cs() == "newlyxcommand") {
                        bool star = false;
                        if (p.next_token().character() == '*') {
                                p.get_token();
@@ -649,7 +653,7 @@ TextClass const parse_preamble(Parser & p, ostream & os, string const & forcecla
        // Force textclass if the user wanted it
        if (!forceclass.empty())
                h_textclass = forceclass;
-       if (noweb_mode && !lyx::support::prefixIs(h_textclass, "literate-"))
+       if (noweb_mode && !prefixIs(h_textclass, "literate-"))
                h_textclass.insert(0, "literate-");
        FileName layoutfilename = libFileSearch("layouts", h_textclass, "layout");
        if (layoutfilename.empty()) {