int const nSpace = sizeof(space_info)/sizeof(SpaceInfo);
int const defaultSpace = 4;
-} // anon namespace
+} // namespace
InsetMathSpace::InsetMathSpace()
: space_(defaultSpace)
dim.asc = 4;
dim.des = 0;
if (space_info[space_].custom)
- dim.wid = abs(length_.inPixels(mi.base));
+ dim.wid = abs(mi.base.inPixels(length_));
else
dim.wid = space_info[space_].width;
}
}
-void InsetMathSpace::mathmlize(MathStream & ms) const
+void InsetMathSpace::mathmlize(MathMLStream & ms) const
{
SpaceInfo const & si = space_info[space_];
if (si.negative || !si.visible)
l = ss.str() + "px";
}
- ms << "<mspace";
+ std::string attr;
if (!l.empty())
- ms << " width=\"" << from_ascii(l) << "\"";
- ms << " />";
+ attr = "width=\"" + l + "\"";
+
+ ms << CTag("mspace", attr);
}
}
-void InsetMathSpace::write(WriteStream & os) const
+void InsetMathSpace::write(TeXMathStream & os) const
{
// All kinds work in text and math mode, so simply suspend
// writing a possibly pending mode closing brace.
if (cmd.getArg(0) == "mathspace") {
MathData ar;
if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
+ Buffer * buf = buffer_;
cur.recordUndo();
*this = *ar[0].nucleus()->asSpaceInset();
+ buffer_ = buf;
break;
}
}