2002-09-11 09:14:57 +00:00
|
|
|
|
2001-11-13 16:27:06 +00:00
|
|
|
#include "math_diffinset.h"
|
|
|
|
#include "math_support.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_symbolinset.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathDiffInset::MathDiffInset()
|
|
|
|
: MathNestInset(1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathDiffInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathDiffInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::addDer(MathArray const & der)
|
|
|
|
{
|
2002-08-02 14:29:42 +00:00
|
|
|
cells_.push_back(der);
|
2001-11-13 16:27:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[diff";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx)
|
|
|
|
os << ' ' << cell(idx);
|
|
|
|
os << ']';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
void MathDiffInset::metrics(MetricsInfo &) const
|
2001-11-13 16:27:06 +00:00
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
void MathDiffInset::draw(PainterInfo &, int, int) const
|
2002-03-21 17:42:56 +00:00
|
|
|
{
|
2001-11-13 16:27:06 +00:00
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathDiffInset::maple(MapleStream & os) const
|
2001-11-13 16:27:06 +00:00
|
|
|
{
|
|
|
|
os << "diff(";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ')';
|
|
|
|
}
|
|
|
|
|
2002-07-12 11:21:21 +00:00
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathDiffInset::mathematica(MathematicaStream & os) const
|
2002-07-01 11:17:14 +00:00
|
|
|
{
|
|
|
|
os << "Dt[";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ']';
|
|
|
|
}
|
|
|
|
|
2001-11-13 16:27:06 +00:00
|
|
|
|
|
|
|
void MathDiffInset::mathmlize(MathMLStream & os) const
|
|
|
|
{
|
|
|
|
os << "diff(";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::write(WriteStream &) const
|
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|