move more stuff to math_hash

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2462 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-08-09 10:48:50 +00:00
parent d4582c5bc1
commit 4c7849e8d9
5 changed files with 9 additions and 15 deletions

View File

@ -16,12 +16,16 @@ latexkeys const wordlist[] =
//{"scriptscriptstyle", LM_TK_STY, LM_ST_SCRIPTSCRIPT, LMB_NONE},
//{"scriptstyle", LM_TK_STY, LM_ST_SCRIPT, LMB_NONE},
//{"textstyle", LM_TK_STY, LM_ST_TEXT, LMB_NONE},
{"!", LM_TK_SPACE, 0, LMB_NONE},
{"#", LM_TK_SPECIAL, '#', LMB_NONE},
{"$", LM_TK_SPECIAL, '$', LMB_NONE},
{"%", LM_TK_SPECIAL, '%', LMB_NONE},
{"&", LM_TK_SPECIAL, '&', LMB_NONE},
{"(", LM_TK_BEGIN, LM_OT_SIMPLE, LMB_NONE},
{")", LM_TK_END, LM_OT_SIMPLE, LMB_NONE},
{",", LM_TK_SPACE, 1, LMB_NONE},
{":", LM_TK_SPACE, 2, LMB_NONE},
{";", LM_TK_SPACE, 3, LMB_NONE},
{"Delta", LM_TK_SYM, LM_Delta, LMB_NONE},
{"Downarrow", LM_TK_SYM, LM_Downarrow, LMB_NONE},
{"Gamma", LM_TK_SYM, LM_Gamma, LMB_NONE},
@ -47,7 +51,6 @@ latexkeys const wordlist[] =
{"Vert", LM_TK_SYM, LM_Vert, LMB_NONE},
{"Xi", LM_TK_SYM, LM_Xi, LMB_NONE},
{"[", LM_TK_BEGIN, LM_OT_EQUATION, LMB_NONE},
// -1 needed in mathed_parse_lines!
{"\\", LM_TK_NEWLINE, static_cast<unsigned>(-1), LMB_NONE},
{"]", LM_TK_END, LM_OT_EQUATION, LMB_NONE},
{"_", LM_TK_SPECIAL, '_', LMB_NONE},
@ -294,6 +297,7 @@ latexkeys const wordlist[] =
{"{", LM_TK_SPECIAL, '{', LMB_NONE},
{"|", LM_TK_UNDEF, '|', LMB_NONE},
{"}", LM_TK_SPECIAL, '}', LMB_NONE}
// -1 needed in mathed_parse_lines!
};

View File

@ -292,13 +292,6 @@ int yylex()
yylval.i = l->id;
return l->token;
}
if (lexcode[c] == LexMathSpace) {
int i;
for (i = 0; i < 4 && static_cast<int>(c) != latex_mathspace[i][0]; ++i)
;
yylval.i = (i < 4) ? i : 0;
return LM_TK_SPACE;
}
if (lexcode[c] == LexAlpha) {
yytext.erase();
while (lexcode[c] == LexAlpha && yyis->good()) {

View File

@ -9,6 +9,7 @@
#include "support/LOstream.h"
MathSpaceInset::MathSpaceInset(int sp)
: space_(sp)
{}

View File

@ -237,11 +237,6 @@ char const * math_font_name[] = {
};
char const * latex_mathspace[] = {
"!", ",", ":", ";", "quad", "qquad"
};
namespace {
/*
@ -743,3 +738,6 @@ void math_font_max_dim(MathTextCodes code, MathStyles siz, int & asc, int & des)
des = lyxfont::maxDescent(font);
}
char const * latex_mathspace[] = {
"!", ",", ":", ";", "quad", "qquad"
};

View File

@ -7,8 +7,6 @@
#include "LString.h"
class Painter;
class MathArray;
class MathMatrixInset;
extern char const * math_font_name[];
extern char const * latex_mathspace[];