]> git.lyx.org Git - features.git/commitdiff
fix display "'" vs "\ni"
authorAndré Pönitz <poenitz@gmx.net>
Fri, 17 Aug 2001 15:47:02 +0000 (15:47 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 17 Aug 2001 15:47:02 +0000 (15:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2534 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_charinset.C
src/mathed/math_defs.h
src/mathed/math_parser.C
src/mathed/support.C

index 94a7bf8b48c92c7b1093d174daad29a84bb8f8eb..fa9dceba913cae557124d32490a49f6d7173f69c 100644 (file)
 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_);
 }
 
index 012652917729dd18f0eeeb4d68e4ef74679ad03b..b09fb2d06b95f98cc130c2e8c89fe8e8d8918231 100644 (file)
@@ -58,6 +58,8 @@ enum MathTextCodes  {
        /// Internal code for variables
        LM_TC_VAR,
        ///
+       LM_TC_CONST,
+       ///
        LM_TC_RM,
        ///
        LM_TC_CAL,
index ac5f50ed1fad8099f5dde9c01cd56073af992260..c9f4317749e388fb9f2d0dd1014089b4c8fa8e79 100644 (file)
@@ -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
 }
 
 
index 9922ab9bee018ce2690aed959203677b979bfb4a..87d0af49baa55d9ca12fac1cf66c2814616ba070 100644 (file)
@@ -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];