]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDecoration.cpp
Fix misparsing of alternative simple formulas
[lyx.git] / src / mathed / InsetMathDecoration.cpp
index 71973296eacc1ad7c6aea350f3a43e17c1ec42ce..b9202f5d6394bbf5cc0e1d7623916d60f023c65b 100644 (file)
@@ -94,6 +94,7 @@ bool InsetMathDecoration::wide() const
                        key_->name == "underleftarrow" ||
                        key_->name == "underrightarrow" ||
                        key_->name == "underleftrightarrow" ||
+                       key_->name == "undertilde" ||
                        key_->name == "utilde";
 }
 
@@ -205,6 +206,7 @@ namespace {
                // this is the macron, again, but it works
                t["underline"] = Attributes(false, "¯");
                t["underrightarrow"] = Attributes(false, "⟶");
+               t["undertilde"] = Attributes(false, "∼");
                t["utilde"] = Attributes(false, "∼");
                t["vec"] = Attributes(true, "→");
                t["widehat"] = Attributes(true, "^");
@@ -273,21 +275,16 @@ void InsetMathDecoration::validate(LaTeXFeatures & features) const
        if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
                string const name = to_utf8(key_->name);
                if (name == "bar") {
-                       features.addPreambleSnippet("<style type=\"text/css\">\n"
-                               "span.overbar{border-top: thin black solid;}\n"
-                               "</style>");
+                       features.addCSSSnippet("span.overbar{border-top: thin black solid;}");
                } else if (name == "underbar" || name == "underline") {
-                       features.addPreambleSnippet("<style type=\"text/css\">\n"
-                               "span.underbar{border-bottom: thin black solid;}\n"
-                               "</style>");
+                       features.addCSSSnippet("span.underbar{border-bottom: thin black solid;}");
                } else {
-                       features.addPreambleSnippet("<style type=\"text/css\">\n"
+                       features.addCSSSnippet(
                                "span.symbolpair{display: inline-block; text-align:center;}\n"
                                "span.symontop{vertical-align: top;}\n"
                                "span.symonbot{vertical-align: bottom;}\n"
                                "span.symbolpair span{display: block;}\n"                       
-                               "span.symbol{height: 0.5ex;}\n"
-                               "</style>");
+                               "span.symbol{height: 0.5ex;}");
                }
        } else {
                if (!key_->requires.empty())