mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix display "'" vs "\ni"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2534 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
71d514f39e
commit
f149653927
@ -16,21 +16,22 @@
|
||||
MathCharInset::MathCharInset(char c)
|
||||
: char_(c), code_(nativeCode(c))
|
||||
{
|
||||
if (isalpha(c))
|
||||
code_ = LM_TC_VAR;
|
||||
//lyxerr << "creating char '" << char_ << "' with code " << int(code_) << endl;
|
||||
}
|
||||
|
||||
|
||||
MathCharInset::MathCharInset(char c, MathTextCodes t)
|
||||
: char_(c), code_((t == LM_TC_MIN) ? nativeCode(c) : t)
|
||||
{}
|
||||
{
|
||||
//lyxerr << "creating char '" << char_ << "' with code " << int(code_) << endl;
|
||||
}
|
||||
|
||||
|
||||
MathTextCodes MathCharInset::nativeCode(char c) const
|
||||
{
|
||||
if (isalpha(c))
|
||||
return LM_TC_VAR;
|
||||
return LM_TC_MIN;
|
||||
return LM_TC_CONST;
|
||||
}
|
||||
|
||||
|
||||
@ -68,6 +69,7 @@ void MathCharInset::draw(Painter & pain, int x, int y) const
|
||||
{
|
||||
xo(x);
|
||||
yo(y);
|
||||
//lyxerr << "drawing '" << char_ << "' code: " << code_ << endl;
|
||||
drawChar(pain, code_, size_, x, y, char_);
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,8 @@ enum MathTextCodes {
|
||||
/// Internal code for variables
|
||||
LM_TC_VAR,
|
||||
///
|
||||
LM_TC_CONST,
|
||||
///
|
||||
LM_TC_RM,
|
||||
///
|
||||
LM_TC_CAL,
|
||||
|
@ -118,9 +118,6 @@ inline CatCode catcode(unsigned char c)
|
||||
}
|
||||
|
||||
|
||||
const unsigned char LM_TK_OPEN = '{';
|
||||
const unsigned char LM_TK_CLOSE = '}';
|
||||
|
||||
enum {
|
||||
FLAG_BRACE = 1 << 0, // an opening brace needed
|
||||
FLAG_BRACE_LAST = 1 << 1, // last closing brace ends the parsing process
|
||||
@ -440,10 +437,12 @@ void Parser::tokenize(string const & buffer)
|
||||
}
|
||||
}
|
||||
|
||||
//lyxerr << "\nTokens: ";
|
||||
//for (unsigned i = 0; i < tokens_.size(); ++i)
|
||||
// lyxerr << tokens_[i];
|
||||
//lyxerr << "\n";
|
||||
#if 0
|
||||
lyxerr << "\nTokens: ";
|
||||
for (unsigned i = 0; i < tokens_.size(); ++i)
|
||||
lyxerr << tokens_[i];
|
||||
lyxerr << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,6 +167,7 @@ LyXFont WhichFont(MathTextCodes type, MathStyles size)
|
||||
|
||||
case LM_TC_SPECIAL: //f = Math_Fonts[0]; break;
|
||||
case LM_TC_TEXTRM:
|
||||
case LM_TC_CONST:
|
||||
case LM_TC_TEX:
|
||||
case LM_TC_RM:
|
||||
f = Math_Fonts[6];
|
||||
|
Loading…
Reference in New Issue
Block a user