+ updateExpansion();
+ ::mathmlize(expanded_.data(), os);
+}
+
+
+void MathMacro::octavize(OctaveStream & os) const
+{
+ updateExpansion();
+ ::octavize(expanded_.data(), os);
+}
+
+
+void MathMacro::normalize(NormalStream & os) const
+{
+ os << "[macro " << name() << " ";
+ for (idx_type i = 0; i < nargs(); ++i)
+ os << cell(i) << ' ';
+ os << ']';
+}
+
+
+void MathMacro::write(WriteStream & os) const
+{
+ os << '\\' << name();
+ for (idx_type i = 0; i < nargs(); ++i)
+ os << '{' << cell(i) << '}';
+ if (nargs() == 0)
+ os << ' ';
+}
+
+
+void MathMacro::updateExpansion() const
+{
+ expand();
+ expanded_.data().substitute(*this);