}
+Limits InsetMathScript::limits() const
+{
+ if (nuc().empty())
+ return AUTO_LIMITS;
+ else
+ // only the limits status of the last element counts
+ return nuc().back()->limits();
+}
+
+
+void InsetMathScript::limits(Limits lim)
+{
+ if (!nuc().empty())
+ nuc().back()->limits(lim);
+}
+
+
MathClass InsetMathScript::mathClass() const
{
// FIXME: this is a hack, since the class will not be correct if
bool InsetMathScript::hasLimits(FontInfo const & font) const
{
- if (font.style() != DISPLAY_STYLE)
- return false;
if (nuc().empty())
return false;
Limits const lim = nuc().back()->limits() == AUTO_LIMITS
- ? nuc().back()->defaultLimits() : nuc().back()->limits();
+ ? nuc().back()->defaultLimits(font.style() == DISPLAY_STYLE)
+ : nuc().back()->limits();
LASSERT(lim != AUTO_LIMITS, return false);
return lim == LIMITS;
}