2002-07-12 11:21:21 +00:00
|
|
|
#include "math_liminset.h"
|
|
|
|
#include "math_support.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_symbolinset.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
2003-07-25 17:11:25 +00:00
|
|
|
using std::auto_ptr;
|
|
|
|
|
2002-07-12 11:21:21 +00:00
|
|
|
|
|
|
|
MathLimInset::MathLimInset
|
|
|
|
(MathArray const & f, MathArray const & x, MathArray const & x0)
|
|
|
|
: MathNestInset(3)
|
|
|
|
{
|
|
|
|
cell(0) = f;
|
|
|
|
cell(1) = x;
|
|
|
|
cell(2) = x0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-25 17:11:25 +00:00
|
|
|
auto_ptr<InsetBase> MathLimInset::clone() const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2003-07-25 17:11:25 +00:00
|
|
|
return auto_ptr<InsetBase>(new MathLimInset(*this));
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathLimInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-02 10:03:27 +00:00
|
|
|
void MathLimInset::metrics(MetricsInfo &, Dimension &) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
void MathLimInset::draw(PainterInfo &, int, int) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathLimInset::maple(MapleStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathLimInset::mathematica(MathematicaStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
os << "Lim[" << cell(0) << ',' << cell(1) << ',' << cell(2) << ']';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathLimInset::mathmlize(MathMLStream & os) const
|
|
|
|
{
|
|
|
|
os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathLimInset::write(WriteStream &) const
|
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|