commit 5ed01cd6167233e0926d02cdab862dc12873c9b2 Author: Enrico Forestieri <for...@lyx.org> Date: Fri Feb 5 01:03:09 2021 +0100
Avoid double superscript errors Fixes #1633 --- src/mathed/InsetMathScript.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index 01c91a3..5d522bb 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -509,9 +509,12 @@ void InsetMathScript::write(TeXMathStream & os) const { MathEnsurer ensurer(os); - if (!nuc().empty()) + if (!nuc().empty()) { os << nuc(); - else if (os.firstitem()) + // Avoid double superscript errors (bug #1633) + if (os.latex() && hasUp() && nuc().back()->getChar() == '\'') + os << "{}"; + } else if (os.firstitem()) LYXERR(Debug::MATHED, "suppressing {} when writing"); else os << "{}"; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs