2002-02-14 14:52:23 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include "math_substackinset.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_streamstr.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathSubstackInset::MathSubstackInset()
|
|
|
|
: MathGridInset(1, 1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathSubstackInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathSubstackInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
void MathSubstackInset::metrics(MetricsInfo & mi) const
|
2002-02-14 14:52:23 +00:00
|
|
|
{
|
2002-05-30 07:09:54 +00:00
|
|
|
if (mi.base.style == LM_ST_DISPLAY) {
|
2003-03-21 14:20:48 +00:00
|
|
|
StyleChanger dummy(mi.base, LM_ST_TEXT);
|
2002-05-30 07:09:54 +00:00
|
|
|
MathGridInset::metrics(mi);
|
|
|
|
} else {
|
|
|
|
MathGridInset::metrics(mi);
|
|
|
|
}
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::write(WriteStream & os) const
|
|
|
|
{
|
|
|
|
os << "\\substack{";
|
|
|
|
MathGridInset::write(os);
|
|
|
|
os << "}\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[substack ";
|
|
|
|
MathGridInset::normalize(os);
|
2002-11-27 10:30:28 +00:00
|
|
|
os << ']';
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathSubstackInset::maple(MapleStream & os) const
|
2002-02-14 14:52:23 +00:00
|
|
|
{
|
|
|
|
os << "substack(";
|
2003-02-14 14:30:09 +00:00
|
|
|
MathGridInset::maple(os);
|
2002-11-27 10:30:28 +00:00
|
|
|
os << ')';
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|