]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBig.cpp
* zh_TW.po: Update from Mingyi Wu
[lyx.git] / src / mathed / InsetMathBig.cpp
index 68203fdf471d26b820675406503024c20943806d..969dd472c72fd5e512df6675cd30cda043952037 100644 (file)
@@ -47,9 +47,11 @@ InsetMathBig::size_type InsetMathBig::size() const
 {
        // order: big Big bigg Bigg biggg Biggg
        //        0   1   2    3    4     5
+       char_type const c = name_[name_.size() - 1];
+       int const base_size = (c == 'l' || c == 'm' || c == 'r') ? 4 : 3;
        return name_[0] == 'B' ?
-               2 * (name_.size() - 4) + 1:
-               2 * (name_.size() - 4);
+               2 * (name_.size() - base_size) + 1:
+               2 * (name_.size() - base_size);
 }
 
 
@@ -216,7 +218,7 @@ bool InsetMathBig::isBigInsetDelim(docstring const & delim)
        static char const * const delimiters[] = {
                "(", ")", "\\{", "\\}", "\\lbrace", "\\rbrace", "[", "]",
                "|", "/", "\\slash", "\\|", "\\vert", "\\Vert", "'",
-               "\\\\", "\\backslash",
+               "<", ">", "\\\\", "\\backslash",
                "\\langle", "\\lceil", "\\lfloor",
                "\\rangle", "\\rceil", "\\rfloor",
                "\\downarrow", "\\Downarrow",
@@ -229,12 +231,11 @@ bool InsetMathBig::isBigInsetDelim(docstring const & delim)
 
 void InsetMathBig::validate(LaTeXFeatures & features) const
 {
-       if (features.runparams().flavor == OutputParams::HTML)
-               features.addPreambleSnippet("<style type=\"text/css\">\n"
+       if (features.runparams().math_flavor == OutputParams::MathAsHTML)
+               features.addCSSSnippet(
                        "span.bigsymbol{font-size: 150%;}\n"
                        "span.biggsymbol{font-size: 200%;}\n"
-                       "span.bigggsymbol{font-size: 225%;}\n"
-                       "</style>");
+                       "span.bigggsymbol{font-size: 225%;}");
 }