#include "math_macrotemplate.h"
#include "math_parser.h"
#include "array.h"
-#include "math_accentinset.h"
+#include "math_decorationinset.h"
#include "math_deliminset.h"
#include "math_fracinset.h"
#include "math_inset.h"
#include "debug.h"
#include "support/LAssert.h"
-
-using namespace std;
-
+using std::endl;
MathMacroTable::table_type MathMacroTable::macro_table;
void MathMacroTable::dump()
{
- cerr << "\n------------------------------------------\n";
+ lyxerr << "\n------------------------------------------\n";
table_type::const_iterator it;
for (it = macro_table.begin(); it != macro_table.end(); ++it)
- cerr << it->first << " [" << it->second->nargs() << "] : "
+ lyxerr << it->first << " [" << it->second->nargs() << "] : "
<< it->second << endl;
- cerr << "------------------------------------------\n";
+ lyxerr << "------------------------------------------" << endl;;
}
if (pos == macro_table.end())
lyxerr << "MathMacroTable::updateTemplate: no template with name '"
- << par->name() << "' available.\n";
+ << par->name() << "' available." << endl;
else
pos->second = par;
}
if (pos == macro_table.end()) {
lyxerr << "MathMacroTable::provideTemplate: no template with name '"
- << name << "' available.\n";
+ << name << "' available." << endl;
}
return *pos->second;
built = true;
- lyxerr[Debug::MATHED] << "Building macros\n";
+ lyxerr[Debug::MATHED] << "Building macros" << endl;
// This macro doesn't have arguments
{
MathMacroTemplate * t = new MathMacroTemplate("notin", 0);
- t->push_back(new MathAccentInset(LM_in, LM_TC_BOPS, LM_not));
+ MathDecorationInset * p = new MathDecorationInset("not", LM_not);
+ p->cell(0).push_back(LM_in, LM_TC_BOPS);
+ t->push_back(p);
insertTemplate(t);
}
{
MathMacroTemplate * t = new MathMacroTemplate("emptyset", 0);
- t->push_back(new MathAccentInset('0', LM_TC_RM, LM_not));
+ MathDecorationInset * p = new MathDecorationInset("not", LM_not);
+ p->cell(0).push_back('O', LM_TC_VAR);
+ t->push_back(p);
+ insertTemplate(t);
+ }
+
+ {
+ MathMacroTemplate * t = new MathMacroTemplate("land", 0);
+ t->push_back(LM_wedge, LM_TC_SYMB);
+ insertTemplate(t);
+ }
+
+ {
+ MathMacroTemplate * t = new MathMacroTemplate("lor", 0);
+ t->push_back(LM_vee, LM_TC_SYMB);
+ insertTemplate(t);
+ }
+
+ {
+ MathMacroTemplate * t = new MathMacroTemplate("to", 0);
+ t->push_back(LM_rightarrow, LM_TC_SYMB);
insertTemplate(t);
}
t->push_back(LM_bot, LM_TC_BOP);
insertTemplate(t);
}
+
/*
{
MathMacroTemplate & m = createTemplate("lint", 4);
// binom has two arguments
{
- MathFracInset * frac = new MathFracInset(LM_OT_ATOP);
+ MathFracInset * frac = new MathFracInset("atop");
frac->cell(0).push_back(new MathMacroArgument(1));
frac->cell(1).push_back(new MathMacroArgument(2));