#include <map>
+using std::map;
namespace {
-// global
-std::map<string, latexkeys> theWordList;
+// file scope
+typedef map<string, latexkeys> WordList;
+WordList theWordList;
struct key_type {
};
-key_type wordlist_array[] =
+key_type wordlist_array[] =
{
{"!", LM_TK_SPACE, 0},
{"#", LM_TK_SPECIAL, '#'},
{"inf", LM_TK_FUNCLIM, 0},
{"it", LM_TK_OLDFONT, LM_TC_IT},
{"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},
{"ln", LM_TK_FUNC, 0},
{"log", LM_TK_FUNC, 0},
{"lyxbox", LM_TK_BOX, 0},
+ {"lyxnegspace", LM_TK_SPACE, 6},
{"mathbb", LM_TK_FONT, LM_TC_BB},
{"mathbf", LM_TK_FONT, LM_TC_BF},
{"mathcal", LM_TK_FONT, LM_TC_CAL},
{"overleftarrow", LM_TK_DECORATION, 0},
{"overline", LM_TK_DECORATION, 0},
{"overrightarrow", LM_TK_DECORATION, 0},
+ {"overleftrightarrow", LM_TK_DECORATION, 0},
{"protect", LM_TK_PROTECT, 0},
{"qquad", LM_TK_SPACE, 5},
{"quad", LM_TK_SPACE, 4},
{"underleftarrow", LM_TK_DECORATION, 0},
{"underline", LM_TK_DECORATION, 0},
{"underrightarrow", LM_TK_DECORATION, 0},
+ {"underleftrightarrow", LM_TK_DECORATION, 0},
{"underset", LM_TK_UNDERSET, 0},
{"vdots", LM_TK_DOTS, 0},
{"vec", LM_TK_DECORATION, 0},
}
}
+
void initSymbols()
{
unsigned const n = sizeof(wordlist_array) / sizeof(wordlist_array[0]);
initialized = true;
}
- std::map<string, latexkeys>::iterator it = theWordList.find(str);
+ WordList::iterator it = theWordList.find(str);
return (it != theWordList.end()) ? &(it->second) : 0;
}