From 5ee6172b7b203a5fd019b55e7f71b454be763139 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 13 Mar 2015 18:34:39 +0100 Subject: [PATCH] Fix stmaryrd operators with limits (bug 9458) LyX did not display the limits of the big math operators defined by stmaryrd.sty correctly. The reason for this was a missing check in InsetMathSymbol::metrics(), where it is hardcoded which symbols use display style limits and which symbols use inline limits. In an ideal world this information would be contained explicitly in lib/symbols. This should go to branch as well. --- src/mathed/InsetMathSymbol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathSymbol.cpp b/src/mathed/InsetMathSymbol.cpp index 0bd61d9b5f..8b2d1a2f72 100644 --- a/src/mathed/InsetMathSymbol.cpp +++ b/src/mathed/InsetMathSymbol.cpp @@ -87,7 +87,8 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const scriptable_ = false; if (mi.base.style == LM_ST_DISPLAY) if (sym_->inset == "cmex" || sym_->inset == "esint" || - sym_->extra == "funclim") + sym_->extra == "funclim" || + (sym_->inset == "stmry" && sym_->extra == "mathop")) scriptable_ = true; } @@ -144,7 +145,8 @@ bool InsetMathSymbol::takesLimits() const sym_->inset == "cmex" || sym_->inset == "lyxboldsymb" || sym_->inset == "esint" || - sym_->extra == "funclim"; + sym_->extra == "funclim" || + (sym_->inset == "stmry" && sym_->extra == "mathop"); }