}
+
+MathMatrixInset::MathMatrixInset()
+ : MathGridInset(1, 1), objtype_(LM_OT_SIMPLE), nonum_(1), label_(1)
+{}
+
+
MathMatrixInset::MathMatrixInset(MathInsetTypes t)
: MathGridInset(getCols(t), 1), objtype_(t), nonum_(1), label_(1)
{
}
-MathMatrixInset::MathMatrixInset()
- : MathGridInset(1, 1), objtype_(LM_OT_SIMPLE), nonum_(1), label_(1)
-{}
+MathMatrixInset::MathMatrixInset(MathInsetTypes t, int cols)
+ : MathGridInset(cols, 1), objtype_(t), nonum_(1), label_(1)
+{
+ halign(getAlign(t, ncols()));
+}
+
MathInset * MathMatrixInset::clone() const
{
return label_[row];
}
+
void MathMatrixInset::label(int row, string const & label)
{
label_[row] = label;
///
explicit MathMatrixInset(MathInsetTypes t);
///
+ MathMatrixInset(MathInsetTypes t, int cols);
+ ///
MathInset * clone() const;
///
void write(std::ostream &, bool fragile) const;
if (name == "align" || name == "align*") {
MathMatrixInset * p = new MathMatrixInset(LM_OT_ALIGN);
- p->halign(getArg('{', '}'));
parse_lines(p, !stared(name), true);
return p;
}
if (name == "alignat" || name == "alignat*") {
- MathMatrixInset * p = new MathMatrixInset(LM_OT_ALIGNAT);
- p->halign(getArg('{', '}'));
+ MathMatrixInset * p =
+ new MathMatrixInset(LM_OT_ALIGNAT, 2 * atoi(getArg('{', '}').c_str()));
parse_lines(p, !stared(name), true);
return p;
}