MathMacroTemplate::MathMacroTemplate()
: MathNestInset(2), numargs_(0), name_(), type_("newcommand")
-{}
+{
+ initMath();
+}
MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs,
string const & type, MathArray const & ar1, MathArray const & ar2)
: MathNestInset(2), numargs_(numargs), name_(nm), type_(type)
{
+ initMath();
+
if (numargs_ > 9)
lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of arguments: "
<< numargs_ << std::endl;
MathMacroTemplate::MathMacroTemplate(std::istream & is)
: MathNestInset(2), numargs_(0), name_()
{
+ initMath();
+
MathArray ar;
mathed_parse_cell(ar, is);
if (ar.size() != 1 || !ar[0]->asMacroTemplate()) {
}
-auto_ptr<InsetBase> MathMacroTemplate::clone() const
+auto_ptr<InsetBase> MathMacroTemplate::doClone() const
{
return auto_ptr<InsetBase>(new MathMacroTemplate(*this));
}