+ if (hasUp())
+ up().metricsT(mi, dim);
+ if (hasDown())
+ down().metricsT(mi, dim);
+ nuc().metricsT(mi, dim);
+}
+
+
+void MathScriptInset::drawT(TextPainter & pain, int x, int y) const
+{
+ if (nuc().size())
+ nuc().drawT(pain, x + dxx(), y);
+ if (hasUp())
+ up().drawT(pain, x + dx1(), y - dy1());
+ if (hasDown())
+ down().drawT(pain, x + dx0(), y + dy0());
+}
+
+
+
+bool MathScriptInset::hasLimits() const
+{
+ // obvious cases
+ if (limits_ == 1)
+ return true;
+ if (limits_ == -1)
+ return false;
+
+ // we can only display limits if the nucleus wants some
+ if (!nuc().size())
+ return false;
+ if (!nuc().back()->isScriptable())
+ return false;
+
+ // per default \int has limits beside the \int even in displayed formulas
+ if (nuc().back()->asSymbolInset())
+ if (nuc().back()->asSymbolInset()->name().find("int") != string::npos)
+ return false;
+
+ // assume "real" limits for everything else
+ return true;