* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
{}
-InsetMathArray::InsetMathArray(docstring const & name, char valign,
- docstring const & halign)
- : InsetMathGrid(valign, halign), name_(name)
-{}
-
-
InsetMathArray::InsetMathArray(docstring const & name, docstring const & str)
: InsetMathGrid(1, 1), name_(name)
{
void InsetMathArray::write(WriteStream & os) const
{
+ MathEnsurer ensurer(os);
+
if (os.fragile())
os << "\\protect";
os << "\\begin{" << name_ << '}';
- if (v_align_ == 't' || v_align_ == 'b')
- os << '[' << char(v_align_) << ']';
- os << '{' << halign() << "}\n";
+ char const v = verticalAlignment();
+ if (v == 't' || v == 'b')
+ os << '[' << v << ']';
+ os << '{' << horizontalAlignments() << "}\n";
InsetMathGrid::write(os);