-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "math_spaceinset.h"
#include "math_support.h"
#include "LColor.h"
#include "frontends/Painter.h"
#include "math_mathmlstream.h"
+#include "LaTeXFeatures.h"
#include "debug.h"
MathSpaceInset::MathSpaceInset(string const & name)
: space_(1)
{
- for (int i = 0; i < nSpace; ++i)
- if (latex_mathspace[i] == name)
+ for (int i = 0; i < nSpace; ++i)
+ if (latex_mathspace[i] == name)
space_ = i;
}
}
-void MathSpaceInset::metrics(MathMetricsInfo &) const
+void MathSpaceInset::metrics(MetricsInfo &) const
{
switch (space_) {
case 0: dim_.w = 6; break;
}
-void MathSpaceInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathSpaceInset::draw(PainterInfo & pi, int x, int y) const
{
// Sadly, HP-UX CC can't handle that kind of initialization.
}
-void MathSpaceInset::maplize(MapleStream & os) const
+void MathSpaceInset::validate(LaTeXFeatures & features) const
+{
+ if (space_ >= 0 && space_< nSpace) {
+ if ((latex_mathspace[space_] == "negmedspace")
+ || (latex_mathspace[space_] == "negthickspace"))
+ features.require("amsmath");
+ }
+}
+
+
+void MathSpaceInset::maple(MapleStream & os) const
{
os << ' ';
}
-void MathSpaceInset::mathematicize(MathematicaStream & os) const
+void MathSpaceInset::mathematica(MathematicaStream & os) const
{
os << ' ';
}
-void MathSpaceInset::octavize(OctaveStream & os) const
+void MathSpaceInset::octave(OctaveStream & os) const
{
os << ' ';
}