namespace lyx {
-InsetMathPhantom::InsetMathPhantom(Kind k)
- : InsetMathNest(1), kind_(k)
+InsetMathPhantom::InsetMathPhantom(Buffer * buf, Kind k)
+ : InsetMathNest(buf, 1), kind_(k)
{}
void InsetMathPhantom::write(WriteStream & os) const
{
- bool brace = os.pendingBrace();
- os.pendingBrace(false);
- if (os.latex() && os.textMode()) {
- os << "\\ensuremath{";
- os.textMode(false);
- brace = true;
- }
+ MathEnsurer ensurer(os);
switch (kind_) {
case phantom:
os << "\\phantom{";
break;
}
os << cell(0) << '}';
- os.pendingBrace(brace);
}