]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_hash.C
use stream-like syntax for LaTeX output
[lyx.git] / src / mathed / math_hash.C
index 9c24fd243fda25ea6ef45507c994ea7bbfa8456e..888ff8748a1cc128df5f4bf987050475162dc6f6 100644 (file)
@@ -4,7 +4,6 @@
 #include "lyxlex.h"
 #include "debug.h"
 #include "support/filetools.h" // LibFileSearch
-#include "support/lyxfunctional.h"
 
 #include <map>
 
@@ -44,7 +43,6 @@ latexkeys_a wordlist_array[] =
        {"arctan",  LM_TK_FUNC, 0},
        {"arg",  LM_TK_FUNC, 0},
        {"atop",  LM_TK_ATOP, 0},
-       {"backslash",  LM_TK_SPECIAL, '\\'},
        {"bar",  LM_TK_DECORATION, 0},
        {"begin",  LM_TK_BEGIN, 0},
        {"binom",  LM_TK_BINOM, 0},
@@ -77,6 +75,7 @@ latexkeys_a wordlist_array[] =
        {"ker",  LM_TK_FUNC, 0},
        {"kern",  LM_TK_KERN, 0},
        {"label",  LM_TK_LABEL, 0},
+       {"lefteqn",  LM_TK_LEFTEQN, 1},
        {"ldots",  LM_TK_DOTS, 0},
        {"left",  LM_TK_LEFT, 0},
        {"lg",  LM_TK_FUNC, 0},
@@ -95,6 +94,7 @@ latexkeys_a wordlist_array[] =
        {"mathsf",  LM_TK_FONT, LM_TC_SF},
        {"mathtt",  LM_TK_FONT, LM_TC_TT},
        {"max",  LM_TK_FUNCLIM, 0},
+       //{"mbox",  LM_TK_BOX, 0},
        {"min",  LM_TK_FUNCLIM, 0},
        {"newcommand",  LM_TK_NEWCOMMAND, 0 },
        {"nolimits",  LM_TK_LIMIT, static_cast<unsigned>(-1)},
@@ -130,8 +130,7 @@ latexkeys_a wordlist_array[] =
        {"widehat",  LM_TK_DECORATION, 0},
        {"widetilde",  LM_TK_DECORATION, 0},
        {"{",  LM_TK_SPECIAL, '{'},
-       {"|",  LM_TK_UNDEF, '|'},
-       {"}",  LM_TK_SPECIAL, '}'},
+       {"}",  LM_TK_SPECIAL, '}'}
 };
 
 
@@ -156,6 +155,7 @@ MathTokenEnum tokenEnum(const string & font)
        return LM_TK_SYM;
 }
 
+
 MathSymbolTypes symbolType(const string & type)
 {
        if (type == "mathrel")
@@ -184,7 +184,11 @@ void ReadSymbols(string const & filename)
                        tmp.id = lex.getInteger();
                if (lex.next())
                        tmp.type = symbolType(lex.getString());
-               wordlist[tmp.name] = tmp;
+               if (wordlist.find(tmp.name) != wordlist.end())
+                       lyxerr << "ReadSymbols: token " << tmp.name
+                              << " already exists.\n";
+               else
+                       wordlist[tmp.name] = tmp;
        }
 }