2 * \file math_splitinset.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "math_splitinset.h"
14 #include "math_data.h"
15 #include "math_mathmlstream.h"
16 #include "math_streamstr.h"
23 MathSplitInset::MathSplitInset(string const & name)
24 : MathGridInset(1, 1), name_(name)
30 auto_ptr<InsetBase> MathSplitInset::doClone() const
32 return auto_ptr<InsetBase>(new MathSplitInset(*this));
36 char MathSplitInset::defaultColAlign(col_type col)
40 if (name_ == "gathered")
42 if (name_ == "aligned")
43 return (col & 1) ? 'l' : 'r';
44 if (name_ == "alignedat")
45 return (col & 1) ? 'l' : 'r';
50 void MathSplitInset::write(WriteStream & ws) const
54 ws << "\\begin{" << name_ << '}';
55 MathGridInset::write(ws);
58 ws << "\\end{" << name_ << "}\n";