void InsetMathSplit::write(WriteStream & ws) const
{
- bool brace = ws.pendingBrace();
- ws.pendingBrace(false);
- if (ws.latex() && ws.textMode()) {
- ws << "\\ensuremath{";
- ws.textMode(false);
- brace = true;
- }
+ MathEnsurer ensurer(ws);
if (ws.fragile())
ws << "\\protect";
ws << "\\begin{" << name_ << '}';
if (ws.fragile())
ws << "\\protect";
ws << "\\end{" << name_ << "}\n";
- ws.pendingBrace(brace);
}