From: André Pönitz Date: Fri, 30 Aug 2002 08:36:35 +0000 (+0000) Subject: small stuff X-Git-Tag: 1.6.10~18388 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5ba91fecc48e629ef6c8437789d9b7e131ceced4;p=lyx.git small stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5182 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/BUGS b/src/mathed/BUGS index f24207b8e7..c4e263b71e 100644 --- a/src/mathed/BUGS +++ b/src/mathed/BUGS @@ -32,16 +32,8 @@ General hints for bug reports: - plain ASCII text please, not much more than 70 chars per column ----------------------------------------------------------------------- - -- \matrm{xy} gets written as \mathrm{x}\mathrm{y} - Dekel: -- LyX crashes when you define a recursive macro - -pp - It is possible to put two or more consecutive spaces in math text mode - - InsetFormula::validate is broken @@ -106,13 +98,6 @@ From: - Some math symbols aren't very well supported (to my knowledge). I'm thinking of [] options. -Herbert Voss: - -- it's not possible to enter superscript when the - ^-char works as a dead key. with the second ^- - or the space the cursor jumps outside the mathbox. - - Jules Bean: a) If something's easy & quick in LaTeX then it should be easy & quick in diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 3752ae051e..692c63b773 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -817,8 +817,8 @@ void MathCursor::normalize() MathScriptInset * p = array()[i].nucleus()->asScriptInset(); if (p) { p->removeEmptyScripts(); - //if (p->empty()) - // array().erase(i); + if (!p->hasUp() && !p->hasDown() && p->nuc().size() == 1) + array()[i] = p->nuc()[0]; } } } diff --git a/src/mathed/math_mathmlstream.C b/src/mathed/math_mathmlstream.C index 1c7f74ed4c..81b1a73ca8 100644 --- a/src/mathed/math_mathmlstream.C +++ b/src/mathed/math_mathmlstream.C @@ -11,6 +11,14 @@ using std::ostream; using std::strlen; +namespace { + + bool isAlpha(char c) + { + return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); + } + +} WriteStream::WriteStream(ostream & os, bool fragile, bool latex) : os_(os), fragile_(fragile), firstitem_(false), latex_(latex), @@ -68,7 +76,7 @@ WriteStream & operator<<(WriteStream & ws, char const * s) WriteStream & operator<<(WriteStream & ws, char c) { if (ws.pendingSpace()) { - if (isalpha(c)) + if (isAlpha(c)) ws.os() << ' '; ws.pendingSpace(false); } diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 1f7e3b5706..9a7cfe5f01 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -687,7 +687,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, ++cellcol; //lyxerr << " column now " << cellcol << " max: " << grid.ncols() << "\n"; if (cellcol == grid.ncols()) { - lyxerr << "adding column " << cellcol << "\n"; + //lyxerr << "adding column " << cellcol << "\n"; grid.addCol(cellcol - 1); } cell = &grid.cell(grid.index(cellrow, cellcol)); @@ -870,7 +870,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, for (int i = 0; i < cols; ++i) { ++cellcol; if (cellcol == grid.ncols()) { - lyxerr << "adding column " << cellcol << "\n"; + //lyxerr << "adding column " << cellcol << "\n"; grid.addCol(cellcol - 1); } cell = &grid.cell(grid.index(cellrow, cellcol));