backport r37288:

Author: baum
	Date: Fri Jan 21 20:18:27 2011
	New Revision: 37288
	URL: http://www.lyx.org/trac/changeset/37288

	Log:
	Fix bug #7252

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37792 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2011-02-27 13:12:46 +00:00
parent 2c0cab1a5f
commit 9f44f179df
3 changed files with 6 additions and 1 deletions

View File

@ -74,6 +74,8 @@ bool InsetMathOverset::idxLast(Cursor & cur) const
void InsetMathOverset::write(WriteStream & os) const void InsetMathOverset::write(WriteStream & os) const
{ {
MathEnsurer ensurer(os); MathEnsurer ensurer(os);
if (os.fragile())
os << "\\protect";
os << "\\overset{" << cell(0) << "}{" << cell(1) << '}'; os << "\\overset{" << cell(0) << "}{" << cell(1) << '}';
} }

View File

@ -85,6 +85,8 @@ bool InsetMathUnderset::idxUpDown(Cursor & cur, bool up) const
void InsetMathUnderset::write(WriteStream & os) const void InsetMathUnderset::write(WriteStream & os) const
{ {
MathEnsurer ensurer(os); MathEnsurer ensurer(os);
if (os.fragile())
os << "\\protect";
os << "\\underset{" << cell(0) << "}{" << cell(1) << '}'; os << "\\underset{" << cell(0) << "}{" << cell(1) << '}';
} }

View File

@ -56,7 +56,8 @@ What's new
* DOCUMENT INPUT/OUTPUT * DOCUMENT INPUT/OUTPUT
- Protect the math commands \overset and \underset in fragile context
(bug 7252).
* USER INTERFACE * USER INTERFACE