]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_hash.C
make \newcommand{\bb}[1]{\mathbf{#1}} work for read/write/display.
[lyx.git] / src / mathed / math_hash.C
index 1f22147ab4633847dbf692f99865ff872867c139..46927b920b0e46672d20a9c88642f335a59b45ae 100644 (file)
@@ -1,6 +1,7 @@
 #include <config.h>
 
 #include "math_parser.h"
+#include "math_metricsinfo.h"
 #include "lyxlex.h"
 #include "debug.h"
 #include "support/filetools.h" // LibFileSearch
@@ -10,6 +11,7 @@
 
 namespace {
 
+// global
 std::map<string, latexkeys> theWordList;
 
 
@@ -17,11 +19,12 @@ struct key_type {
        ///
        char const * name;
        ///
-       short token;
+       MathTokenEnum token;
        ///
        unsigned int id;
 };
 
+
 key_type wordlist_array[] = 
 {
        {"!",  LM_TK_SPACE, 0},
@@ -65,7 +68,7 @@ key_type wordlist_array[] =
        {"deg",  LM_TK_FUNC, 0},
        {"det",  LM_TK_FUNCLIM, 0},
        {"dim",  LM_TK_FUNC, 0},
-       //{"displaystyle",  LM_TK_STY, LM_ST_DISPLAY},
+       {"displaystyle",  LM_TK_STY, LM_ST_DISPLAY},
        {"dot",  LM_TK_DECORATION, 0},
        {"end",  LM_TK_END, 0},
        {"exp",  LM_TK_FUNC, 0},
@@ -118,8 +121,8 @@ key_type wordlist_array[] =
        {"right",  LM_TK_RIGHT, 0},
        {"rm",  LM_TK_OLDFONT, LM_TC_RM},
        {"root",  LM_TK_ROOT, 0},
-       //{"scriptscriptstyle",  LM_TK_STY, LM_ST_SCRIPTSCRIPT},
-       //{"scriptstyle",  LM_TK_STY, LM_ST_SCRIPT},
+       {"scriptscriptstyle",  LM_TK_STY, LM_ST_SCRIPTSCRIPT},
+       {"scriptstyle",  LM_TK_STY, LM_ST_SCRIPT},
        {"sec",  LM_TK_FUNC, 0},
        {"sin",  LM_TK_FUNC, 0},
        {"sinh",  LM_TK_FUNC, 0},
@@ -129,7 +132,7 @@ key_type wordlist_array[] =
        {"tan",  LM_TK_FUNC, 0},
        {"tanh",  LM_TK_FUNC, 0},
        {"textrm",  LM_TK_FONT, LM_TC_TEXTRM},
-       //{"textstyle",  LM_TK_STY, LM_ST_TEXT},
+       {"textstyle",  LM_TK_STY, LM_ST_TEXT},
        {"tilde",  LM_TK_DECORATION, 0},
        {"tt",  LM_TK_OLDFONT, LM_TC_TT},
        {"underbrace",  LM_TK_DECORATION, 0},