* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include "InsetMathNumber.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "MathSupport.h"
+#include "MetricsInfo.h"
-namespace lyx {
+using namespace std;
-using std::vector;
+
+namespace lyx {
InsetMathNumber::InsetMathNumber(docstring const & s)
: str_(s)
}
-bool InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const
{
mathed_string_dim(mi.base.font, str_, dim);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
}
-void InsetMathNumber::mathmlize(MathStream & os) const
+void InsetMathNumber::mathmlize(MathMLStream & ms) const
{
- os << "<mi> " << str_ << " </mi>";
+ ms << MTagInline("mn")
+ << str_
+ << ETagInline("mn");
+}
+
+
+void InsetMathNumber::htmlize(HtmlStream & os) const
+{
+ os << str_;
}
-void InsetMathNumber::write(WriteStream & os) const
+void InsetMathNumber::write(TeXMathStream & os) const
{
os << str_;
}