2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_liminset.C
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2003-08-02 11:30:30 +00:00
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2002-07-12 11:21:21 +00:00
|
|
|
|
#include "math_liminset.h"
|
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
2003-07-25 17:11:25 +00:00
|
|
|
|
using std::auto_ptr;
|
2003-08-02 11:30:30 +00:00
|
|
|
|
using std::endl;
|
2003-07-25 17:11:25 +00:00
|
|
|
|
|
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
|
|
|
|
{
|
2003-08-02 11:30:30 +00:00
|
|
|
|
lyxerr << "should not happen" << endl;
|
2002-07-12 11:21:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void MathLimInset::draw(PainterInfo &, int, int) const
|
2002-07-12 11:21:21 +00:00
|
|
|
|
{
|
2003-08-02 11:30:30 +00:00
|
|
|
|
lyxerr << "should not happen" << endl;
|
2002-07-12 11:21:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
{
|
2003-08-02 11:30:30 +00:00
|
|
|
|
lyxerr << "should not happen" << endl;
|
2002-07-12 11:21:21 +00:00
|
|
|
|
}
|