Anybody else notice that sometimes, entering the first 
digit in a (sub-)inset in math appears as italic, and 
only subsequent ones as roman?

This happens in a single math inset in text as well as
in a super/subscript, sqrt and frac inset. LyX file
(as well as saved and re-loaded appearance) is OK.

Anyway, the interchange of two lines seems to fix this.
I am not aware of any side effects -- tried to test, but 
don't really know what to look for. It happens when 
upon entry, lastcode_ is LM_TC_VAR rather than LM_TC_MIN 
which would allow the inset to find the proper 
italicization using isalpha.

Ah yes, spelling correction :-)

t. Martin


Index: math_cursor.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.210
diff -u -p -r1.210 math_cursor.C
--- math_cursor.C       2001/12/12 14:39:33     1.210
+++ math_cursor.C       2001/12/15 15:18:39
@@ -1291,7 +1293,7 @@ bool MathCursor::interpret(char c)
                selClear();
 
        if (lastcode_ == LM_TC_TEXTRM) {
-               // suppress direct insertion of to spaces in a row
+               // suppress direct insertion of two spaces in a row
                // the still allows typing  '<space>a<space>' and deleting the 'a', but
                // it is better than nothing
                if (c == ' ' && hasPrevAtom() && prevAtom()->getChar() == ' ')
@@ -1353,8 +1355,8 @@ bool MathCursor::interpret(char c)
        }
 
        // no special circumstances, so insert the character without any fuss
-       insert(c, lastcode_);
        lastcode_ = LM_TC_MIN;
+       insert(c, lastcode_);
        return true;
 }
 


-- 
Martin Vermeer  [EMAIL PROTECTED]
Helsinki University of Technology 
Department of Surveying
P.O. Box 1200, FIN-02015 HUT, Finland
:wq

Attachment: msg30619/pgp00000.pgp
Description: PGP signature

Reply via email to