#include "math_iter.h"
#include "math_inset.h"
#include "support/lstrings.h"
-#include "error.h"
+#include "debug.h"
+ostream & operator<<(ostream & o, MathedTextCodes mtc)
+{
+ return o << int(mtc);
+}
+
enum MathedMacroFlag {
MMF_Env=1,
MMF_Exp=2,
MMF_Edit=4
};
+ostream & operator<<(ostream & o, MathedMacroFlag mmf)
+{
+ return o << int(mmf);
+}
extern GC mathGC, mathFrameGC, latexGC;
extern int mathed_string_width(short type, int style, byte const* s, int ls);
void MathMacro::Write(string &file)
{
if (tmplate->flags & MMF_Exp) {
- lyxerr.debug(string("Expand ")+ tostr(tmplate->flags)
- + ' ' + tostr(MMF_Exp),
- Error::MATHED);
+ lyxerr[Debug::MATHED] << "Expand " << tmplate->flags
+ << ' ' << MMF_Exp << endl;
tmplate->update(this);
tmplate->Write(file);
} else {
MathParInset::Write(file);
} else {
file += '#';
- file += number;
+ file += tostr(number);
file += ' ';
}
}
if (nargs > 0 ) {
file += '[';
- file += nargs;
+ file += tostr(nargs);
file += ']';
}
if (num_macros<max_macros)
macro_table[num_macros++] = m;
else
- lyxerr.print("Error (MathMacroTable::addTemplate): "
- "Macro table exhausted!");
+ lyxerr << "Error (MathMacroTable::addTemplate): "
+ "Macro table exhausted!" << endl;
}
built = true;
- lyxerr.debug("Building macros", Error::MATHED);
+ lyxerr[Debug::MATHED] << "Building macros" << endl;
// This macro doesn't have arguments
m = new MathMacroTemplate("notin"); // this leaks