2 * \file InsetMathLim.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathLim.h"
15 #include "MathExtern.h"
16 #include "MathStream.h"
18 #include "support/debug.h"
23 InsetMathLim::InsetMathLim(Buffer * buf, MathData const & f, MathData const & x,
25 : InsetMathNest(buf, 3)
33 Inset * InsetMathLim::clone() const
35 return new InsetMathLim(*this);
39 void InsetMathLim::normalize(NormalStream & os) const
41 os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
45 void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
47 LYXERR0("should not happen");
51 void InsetMathLim::draw(PainterInfo &, int, int) const
53 LYXERR0("should not happen");
57 void InsetMathLim::maple(MapleStream & os) const
59 os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
63 void InsetMathLim::maxima(MaximaStream & os) const
65 os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
69 void InsetMathLim::mathematica(MathematicaStream & os) const
71 os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
75 docstring InsetMathLim::mathmlize(MathStream & os) const
77 // FIXME XHTML We need a form of MTag that takes attributes.
79 << "<mo form='prefix'>" << "lim" << "</mo>"
80 << "<mrow>" << cell(1) << "<mo>→</mo>" << cell(2)
81 << "</mrow></munder>" << "<mo>(</mo>";
82 docstring const rv = lyx::mathmlize(cell(0), os);
88 void InsetMathLim::write(WriteStream &) const
90 LYXERR0("should not happen");