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_mathmlstream.h"
15 #include "math_streamstr.h"
20 MathSplitInset::MathSplitInset(string const & name)
21 : MathGridInset(1, 1), name_(name)
27 auto_ptr<InsetBase> MathSplitInset::clone() const
29 return auto_ptr<InsetBase>(new MathSplitInset(*this));
33 char MathSplitInset::defaultColAlign(col_type col)
37 if (name_ == "gathered")
39 if (name_ == "aligned")
40 return (col & 1) ? 'l' : 'r';
45 void MathSplitInset::write(WriteStream & ws) const
49 ws << "\\begin{" << name_ << '}';
50 MathGridInset::write(ws);
53 ws << "\\end{" << name_ << "}\n";