5 #include "math_arrayinset.h"
6 #include "support/LOstream.h"
9 MathArrayInset::MathArrayInset(int m, int n)
14 MathArrayInset::MathArrayInset(int m, int n, char valign, string const & halign)
15 : MathGridInset(m, n, valign, halign)
19 MathInset * MathArrayInset::clone() const
21 return new MathArrayInset(*this);
25 void MathArrayInset::write(MathWriteInfo & os) const
29 os << "\\begin{array}";
31 if (v_align_ == 't' || v_align_ == 'b')
32 os << '[' << char(v_align_) << ']';
35 for (col_type col = 0; col < ncols(); ++col)
36 os << colinfo_[col].align_;
39 MathGridInset::write(os);
43 os << "\\end{array}\n";
47 void MathArrayInset::metrics(MathMetricsInfo const & st) const
50 if (size_.style == LM_ST_DISPLAY)
51 size_.style = LM_ST_TEXT;
52 MathGridInset::metrics(size_);