]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotemplate.C
make \newcommand{\bb}[1]{\mathbf{#1}} work for read/write/display.
[lyx.git] / src / mathed / math_macrotemplate.C
index d1791592844172484e6901d9b32f63a6cc35ccbd..3fe31bc7b7477df0fb072a87e6973c080ebf6d9b 100644 (file)
@@ -16,10 +16,9 @@ MathMacroTemplate::MathMacroTemplate()
 MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs)
        : MathNestInset(1), numargs_(numargs), name_(nm)
 {
-       if (numargs_ > 9) {
+       if (numargs_ > 9)
                lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of arguments: "
                        << numargs_ << std::endl;
-       }
 }
 
 
@@ -64,10 +63,10 @@ void MathMacroTemplate::draw(Painter & pain, int x, int y) const
 }
 
 
-void MathMacroTemplate::write(MathWriteInfo & os) const
+void MathMacroTemplate::write(WriteStream & os) const
 {
        os << "\n\\newcommand{\\" << name_.c_str() << '}';
        if (numargs_ > 0)
-               os << '[' << ('0' + numargs_) << ']';
+               os << '[' << numargs_ << ']';
        os << '{' << cell(0) << "}\n";
 }