]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathScript.cpp
Seems boost also includes all std headers. Not including boost therefore produces...
[lyx.git] / src / mathed / InsetMathScript.cpp
index e637e55b8c1afdc2bbcafc98bddcf40230f86faa..0b6a4d86cb39d43059503b34d467ab8b91e306b0 100644 (file)
@@ -655,8 +655,8 @@ void InsetMathScript::htmlize(HtmlStream & os) const
 
        if (u && d)
                os << MTag("span", "class='scripts'")
-                        << MTag("span", "class='sup'") << up() << ETag("span")
-                        << MTag("span", "class='sub'") << down() << ETag("span")
+                        << MTag("span") << up() << ETag("span")
+                        << MTag("span") << down() << ETag("span")
                         << ETag("span");
        else if (u)
                os << MTag("sup", "class='math'") << up() << ETag("sup");
@@ -704,13 +704,13 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
                        // must be a subscript...
                        old.recordUndoInset();
                        removeScript(false);
-                       cur.updateFlags(cur.disp_.update() | Update::SinglePar);
+                       cur.updateFlags(cur.result().update() | Update::SinglePar);
                        return true;
                } else if (cell(1).empty()) {
                        // must be a superscript...
                        old.recordUndoInset();
                        removeScript(true);
-                       cur.updateFlags(cur.disp_.update() | Update::SinglePar);
+                       cur.updateFlags(cur.result().update() | Update::SinglePar);
                        return true;
                }
        }
@@ -740,7 +740,7 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
                insetCur.cell().insert(insetCur.pos(), ar);
 
                // redraw
-               cur.updateFlags(cur.disp_.update() | Update::SinglePar);
+               cur.updateFlags(cur.result().update() | Update::SinglePar);
                return true;
        }
 
@@ -753,7 +753,7 @@ void InsetMathScript::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        //LYXERR("InsetMathScript: request: " << cmd);
 
-       if (cmd.action == LFUN_MATH_LIMITS) {
+       if (cmd.action() == LFUN_MATH_LIMITS) {
                if (!cmd.argument().empty()) {
                        if (cmd.argument() == "limits")
                                limits_ = 1;
@@ -775,14 +775,14 @@ void InsetMathScript::doDispatch(Cursor & cur, FuncRequest & cmd)
 // the idea for dual scripts came from the eLyXer code
 void InsetMathScript::validate(LaTeXFeatures & features) const
 {
-       if (features.runparams().flavor == OutputParams::HTML)
+       if (features.runparams().math_flavor == OutputParams::MathAsHTML)
                features.addPreambleSnippet("<style type=\"text/css\">\n"
                        "span.scripts{display: inline-block; vertical-align: middle; text-align:center; font-size: 75%;}\n"
-                       "span.sup{display: block;}\n"
-                       "span.sub{display: block;}\n"
+                       "span.scripts span {display: block;}\n"
                        "sub.math{font-size: 75%;}\n"
                        "sup.math{font-size: 75%;}\n"
                        "</style>");
+       InsetMathNest::validate(features);
 }
 
 } // namespace lyx