#include "MathStream.h"
#include "MathStream.h"
+#include "MetricsInfo.h"
+
#include "support/lstrings.h"
#include <ostream>
void InsetMathTabular::metrics(MetricsInfo & mi, Dimension & dim) const
{
- FontSetChanger dummy(mi.base, "textnormal");
+ Changer dummy = mi.base.changeFontSet("textnormal");
InsetMathGrid::metrics(mi, dim);
- dim.wid += 6;
-}
-
-
-Dimension const InsetMathTabular::dimension(BufferView const & bv) const
-{
- Dimension dim = InsetMathGrid::dimension(bv);
- dim.wid += 6;
- return dim;
}
void InsetMathTabular::draw(PainterInfo & pi, int x, int y) const
{
- FontSetChanger dummy(pi.base, "textnormal");
- InsetMathGrid::drawWithMargin(pi, x, y, 4, 2);
+ Changer dummy = pi.base.changeFontSet("textnormal");
+ InsetMathGrid::draw(pi, x, y);
}
if (os.fragile())
os << "\\protect";
os << "\\begin{" << name_ << '}';
+ bool open = os.startOuterRow();
char const v = verticalAlignment();
if (v == 't' || v == 'b')
if (os.fragile())
os << "\\protect";
os << "\\end{" << name_ << '}';
+ if (open)
+ os.startOuterRow();
// adding a \n here is bad if the tabular is the last item
// in an \eqnarray...
}