}
-void InsetMathSubstack::write(WriteStream & os) const
+void InsetMathSubstack::write(TeXMathStream & os) const
{
MathEnsurer ensurer(os);
+ if (os.fragile())
+ os << "\\protect";
os << "\\substack{";
bool open = os.startOuterRow();
InsetMathGrid::write(os);