#include "MetricsInfo.h"
#include "TextPainter.h"
+#include "support/lassert.h"
#include "frontends/Painter.h"
using namespace std;
}
-// FIXME This will crash on unitone and is wrong in other cases.
void InsetMathFrac::maple(MapleStream & os) const
{
+ if (nargs() != 2) {
+ // Someone who knows about maple should fix this.
+ LASSERT(false, return);
+ }
os << '(' << cell(0) << ")/(" << cell(1) << ')';
}
-// FIXME This will crash on unitone and is wrong in other cases.
void InsetMathFrac::mathematica(MathematicaStream & os) const
{
+ if (nargs() != 2) {
+ // Someone who knows about mathematica should fix this.
+ LASSERT(false, return);
+ }
os << '(' << cell(0) << ")/(" << cell(1) << ')';
}
-// FIXME This will crash on unitone and is wrong in other cases.
void InsetMathFrac::octave(OctaveStream & os) const
{
+ if (nargs() != 2) {
+ // Someone who knows about octave should fix this.
+ LASSERT(false, return);
+ }
os << '(' << cell(0) << ")/(" << cell(1) << ')';
}
features.require("amsmath");
if (features.runparams().math_flavor == OutputParams::MathAsHTML)
// CSS adapted from eLyXer
- features.addPreambleSnippet("<style type=\"text/css\">\n"
+ features.addCSSSnippet(
"span.frac{display: inline-block; vertical-align: middle; text-align:center;}\n"
"span.numer{display: block;}\n"
- "span.denom{display: block; border-top: thin solid #000040;}\n"
- "</style>");
+ "span.denom{display: block; border-top: thin solid #000040;}");
InsetMathNest::validate(features);
}
if (kind_ == DBINOM || kind_ == TBINOM)
features.require("amsmath");
} else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
- features.addPreambleSnippet("<style type=\"text/css\">\n"
+ features.addCSSSnippet(
"span.binom{display: inline-block; vertical-align: bottom; text-align:center;}\n"
"span.binom span{display: block;}\n"
- "span.binomdelim{font-size: 2em;}\n"
- "</style>");
+ "span.binomdelim{font-size: 2em;}");
InsetMathNest::validate(features);
}