The attached patch:
- Fixes handling of a wrong delimiter. Previously, a character after
a big size macro was swallowed, causing data loss.
- When converting to latex, avoid putting a space before the delimiter.
The space is not necessary as the delimiter never begins with a letter.
- Make translatable the string "Variable size" for the qt4 frontend.
If nobody objects, I'll put it in tomorrow.
--
Enrico
Log:
Fix some glitches with fixed size delimiters
* src/mathed/MathParser.C
(parse1): behave correctly when a wrong delimiter is specified.
* src/mathed/InsetMathBig.C
(write): don't write a space before delimiter
* src/frontends/qt4/QDelimiterDialog.C
(QDelimiterDialog): make translatable the string "Variable size"
Index: src/mathed/InsetMathBig.C
===================================================================
--- src/mathed/InsetMathBig.C (revision 15389)
+++ src/mathed/InsetMathBig.C (working copy)
@@ -88,7 +88,7 @@ void InsetMathBig::draw(PainterInfo & pi
void InsetMathBig::write(WriteStream & os) const
{
- os << '\\' << name_ << ' ' << delim_;
+ os << '\\' << name_ << delim_;
if (delim_[0] == '\\')
os.pendingSpace(true);
}
Index: src/mathed/MathParser.C
===================================================================
--- src/mathed/MathParser.C (revision 15389)
+++ src/mathed/MathParser.C (working copy)
@@ -1321,8 +1321,7 @@ void Parser::parse1(InsetMathGrid & grid
new
InsetMathBig(t.cs(), delim)));
else {
cell->push_back(createInsetMath(t.cs()));
- cell->push_back(createInsetMath(
-
delim.substr(1)));
+ putback();
}
}
Index: src/frontends/qt4/QDelimiterDialog.C
===================================================================
--- src/frontends/qt4/QDelimiterDialog.C (revision 15389)
+++ src/frontends/qt4/QDelimiterDialog.C (working copy)
@@ -107,7 +107,7 @@ QDelimiterDialog::QDelimiterDialog(QMath
leftCO->addItem(QIcon(QPixmap(toqstr(empty_xpm))), qt_("(None)"));
rightCO->addItem(QIcon(QPixmap(toqstr(empty_xpm))), qt_("(None)"));
- sizeCO->addItem(qt_(N_("Variable size")));
+ sizeCO->addItem(qt_("Variable size"));
for (int i = 0; *biggui[i]; ++i)
sizeCO->addItem(qt_(biggui[i]));