X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathFrac.cpp;h=6a175fad31ac26e0568c24684ef557917ee5a5c9;hb=f67cf6f4bb3e3d22ac9aebfa22027c3537cbdf61;hp=90937619bf2a8d46f93710a20db708bc9f84ea17;hpb=d7de1f2a1eb8b7e944e063aa83869c33e45efe6a;p=lyx.git
diff --git a/src/mathed/InsetMathFrac.cpp b/src/mathed/InsetMathFrac.cpp
index 90937619bf..6a175fad31 100644
--- a/src/mathed/InsetMathFrac.cpp
+++ b/src/mathed/InsetMathFrac.cpp
@@ -22,6 +22,7 @@
#include "MetricsInfo.h"
#include "TextPainter.h"
+#include "support/lassert.h"
#include "frontends/Painter.h"
using namespace std;
@@ -366,23 +367,32 @@ bool InsetMathFrac::extraBraces() const
}
-// 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) << ')';
}
@@ -502,11 +512,10 @@ void InsetMathFrac::validate(LaTeXFeatures & features) const
features.require("amsmath");
if (features.runparams().math_flavor == OutputParams::MathAsHTML)
// CSS adapted from eLyXer
- features.addPreambleSnippet("");
+ "span.denom{display: block; border-top: thin solid #000040;}");
InsetMathNest::validate(features);
}
@@ -707,11 +716,10 @@ void InsetMathBinom::validate(LaTeXFeatures & features) const
if (kind_ == DBINOM || kind_ == TBINOM)
features.require("amsmath");
} else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
- features.addPreambleSnippet("");
+ "span.binomdelim{font-size: 2em;}");
InsetMathNest::validate(features);
}