2001-06-25 00:06:33 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "math_arrayinset.h"
|
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathArrayInset::MathArrayInset(int m, int n)
|
2001-08-08 17:26:30 +00:00
|
|
|
: MathGridInset(m, n)
|
2001-06-25 00:06:33 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
MathInset * MathArrayInset::clone() const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
return new MathArrayInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-26 06:56:43 +00:00
|
|
|
void MathArrayInset::write(std::ostream & os, bool fragile) const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
if (fragile)
|
|
|
|
os << "\\protect";
|
|
|
|
os << "\\begin{array}";
|
|
|
|
|
|
|
|
if (v_align_ == 't' || v_align_ == 'b')
|
|
|
|
os << '[' << char(v_align_) << ']';
|
|
|
|
|
|
|
|
os << '{';
|
2001-09-26 15:20:45 +00:00
|
|
|
for (unsigned int col = 0; col < ncols(); ++col)
|
2001-09-04 13:32:06 +00:00
|
|
|
os << colinfo_[col].align_;
|
2001-06-25 00:06:33 +00:00
|
|
|
os << "}\n";
|
|
|
|
|
2001-07-26 06:56:43 +00:00
|
|
|
MathGridInset::write(os, fragile);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
if (fragile)
|
|
|
|
os << "\\protect";
|
|
|
|
os << "\\end{array}\n";
|
|
|
|
}
|
2001-09-10 09:35:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
void MathArrayInset::metrics(MathStyles st) const
|
|
|
|
{
|
|
|
|
MathGridInset::metrics(st == LM_ST_DISPLAY ? LM_ST_TEXT : st);
|
|
|
|
}
|
|
|
|
|