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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathSubstackInset::metrics(MathMetricsInfo & 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) {
|
|
|
|
MathStyleChanger dummy(mi.base, LM_ST_TEXT);
|
|
|
|
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
|
|
|
}
|