-MathMacroArgument::MathMacroArgument(int n)
- : MathNestInset(1), number_(n), expanded_(false)
+MathMacroArgument::MathMacroArgument(int n, MathTextCodes code)
+ : MathNestInset(1), number_(n), expanded_(false), code_(code)
{
if (n < 1 || n > 9) {
lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
void MathMacroArgument::write(WriteStream & os) const
{
- os << str_;
+ if (code_ == LM_TC_MIN)
+ os << str_;
+ else
+ os << '\\' << math_font_name(code_) << '{' << str_ << '}';
}
void MathMacroArgument::substitute(MathMacro const & m)
{
cell(0) = m.cell(number_ - 1);
+ for (MathArray::iterator it = cell(0).begin(); it != cell(0).end(); ++it)
+ it->nucleus()->handleFont(code_);
expanded_ = true;
}