4 #include "math_casesinset.h"
5 #include "math_parser.h"
6 #include "math_mathmlstream.h"
7 #include "math_support.h"
8 #include "LaTeXFeatures.h"
9 #include "support/LOstream.h"
14 MathCasesInset::MathCasesInset(row_type n)
15 : MathGridInset(2, n, 'c', "ll")
19 auto_ptr<InsetBase> MathCasesInset::clone() const
21 return auto_ptr<InsetBase>(new MathCasesInset(*this));
25 void MathCasesInset::metrics(MetricsInfo & mi, Dimension & dim) const
27 MathGridInset::metrics(mi);
33 void MathCasesInset::draw(PainterInfo & pain, int x, int y) const
35 mathed_draw_deco(pain, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
36 MathGridInset::draw(pain, x + 8, y);
40 void MathCasesInset::write(WriteStream & os) const
44 os << "\\begin{cases}\n";
45 MathGridInset::write(os);
52 void MathCasesInset::normalize(NormalStream & os) const
55 MathGridInset::normalize(os);
60 void MathCasesInset::maple(MapleStream & os) const
63 MathGridInset::maple(os);
68 void MathCasesInset::infoize(std::ostream & os) const
74 void MathCasesInset::validate(LaTeXFeatures & features) const
76 features.require("amsmath");
77 MathGridInset::validate(features);