if (!parent_.premetrics())
dim.des += maxasc + maxdes + 1;
}
-
- setDimCache(mi, dim);
}
dim.wid = 0;
dim.asc = 0;
dim.des = 0;
- setDimCache(mi, dim);
}
}
Inset * MathMacroTemplate::clone() const
{
- return new MathMacroTemplate(*this);
+ MathMacroTemplate * inset = new MathMacroTemplate(*this);
+ // the parent pointers of the proxy insets above will point to
+ // to the old template. Hence, the look must be updated.
+ inset->updateLook();
+ return inset;
}
if (os.latex() && optionals_ > 1)
os << "\\newlyxcommand";
else {
- if (redefinition_)
+ if (redefinition_ && !overwriteRedefinition)
os << "\\renewcommand";
else
os << "\\newcommand";
if (!cell(displayIdx()).empty())
os << "\n{" << cell(displayIdx()) << '}';
}
+}
int MathMacroTemplate::plaintext(Buffer const & buf, odocstream & os,