#include "math_macrotemplate.h"
#include "math_hullinset.h"
#include "math_rootinset.h"
+#include "math_sizeinset.h"
#include "math_sqrtinset.h"
#include "math_scriptinset.h"
#include "math_specialcharinset.h"
bool stared(string const & s)
{
- unsigned const n = s.size();
+ string::size_type const n = s.size();
return n && s[n - 1] == '*';
}
&& s.cat() == t.cat() && s.cs() == t.cs();
}
-bool operator!=(Token const & s, Token const & t)
-{
- return !(s == t);
-}
+// Angus' compiler says this is not needed
+//bool operator!=(Token const & s, Token const & t)
+//{
+// return !(s == t);
+//}
ostream & operator<<(ostream & os, Token const & t)
{
return false;
}
- int const cols = p->ncols();
+ MathInset::col_type const cols = p->ncols();
// save global variables
bool const saved_num = curr_num_;
curr_label_.erase();
// reading a row
- for (int col = 0; col < cols; ++col) {
+ for (MathInset::col_type col = 0; col < cols; ++col) {
//lyxerr << "reading cell " << row << " " << col << "\n";
parse_into(p->cell(col + row * cols), FLAG_BLOCK);
return;
}
-/*
- case LM_TK_STY:
- {
- lyxerr[Debug::MATHED] << "LM_TK_STY not implemented\n";
- //MathArray tmp = array;
- //MathSizeInset * p = new MathSizeInset(MathStyles(lval_->id));
- //array.push_back(p);
- //parse_into(p->cell(0), FLAG_BRACE_FONT);
- break;
- }
-
-*/
-
else if (t.cs() == "begin") {
string const name = getArg('{', '}');
if (name == "array") {
return;
}
-/*
// Disabled
+#if 0
else if (t.cs() == "mbox") {
array.push_back(createMathInset(t.cs()));
// slurp in the argument of mbox
MathBoxInset * p = array.back()->asBoxInset();
//lyx::assert(p);
}
-*/
+#endif
+
else if (t.cs().size()) {
latexkeys const * l = in_word_set(t.cs());
array.push_back(p);
}
+ else if (l->token == LM_TK_STY) {
+ MathAtom p = createMathInset(t.cs());
+ parse_into(p->cell(0), flags, code);
+ array.push_back(p);
+ return;
+ }
+
else {
MathAtom p = createMathInset(t.cs());
for (MathInset::idx_type i = 0; i < p->nargs(); ++i)