]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.cpp
Correct col spacing in Cases environment
[lyx.git] / src / mathed / MathFactory.cpp
index 34131278b5b52d6c173ca0534830f90d32f54d89..f2e980a2db7b47b0e8164a75cddaa9954c384678 100644 (file)
@@ -185,6 +185,7 @@ void initSymbols()
                        string requires;
                        string extra;
                        string xmlname;
+                       bool hidden = false;
                        is >> macro >> requires;
                        if ((is >> xmlname)) {
                                extra = requires;
@@ -205,7 +206,11 @@ void initSymbols()
                                        tmp.name = it->first;
                                        tmp.extra = from_utf8(extra);
                                        tmp.xmlname = from_utf8(xmlname);
-                                       tmp.requires = requires;
+                                       if (requires == "hiddensymbol") {
+                                               requires = "";
+                                               tmp.hidden = hidden = true;
+                                       } else
+                                               tmp.requires = requires;
                                        theMathWordList[it->first] = tmp;
                                        wit = theMathWordList.find(it->first);
                                        it->second.setSymbol(&(wit->second));
@@ -218,7 +223,8 @@ void initSymbols()
                                << "  draw: 0"
                                << "  extra: " << extra
                                << "  xml: " << xmlname
-                               << "  requires: " << requires << '\'');
+                               << "  requires: " << requires
+                               << "  hidden: " << hidden << '\'');
                        continue;
                }
 
@@ -294,6 +300,12 @@ void initSymbols()
                                              << " used for " << to_utf8(tmp.name));
                }
 
+               if (tmp.requires == "hiddensymbol")
+               {
+                       tmp.requires = "";
+                       tmp.hidden = true;
+               }
+
                if (theMathWordList.find(tmp.name) != theMathWordList.end())
                        LYXERR(Debug::MATHED, "readSymbols: inset " << to_utf8(tmp.name)
                                << " already exists.");
@@ -307,7 +319,8 @@ void initSymbols()
                        << "  draw: " << int(tmp.draw.empty() ? 0 : tmp.draw[0])
                        << "  extra: " << to_utf8(tmp.extra)
                        << "  xml: " << to_utf8(tmp.xmlname)
-                       << "  requires: " << tmp.requires << '\'');
+                       << "  requires: " << tmp.requires
+                       << "  hidden: " << tmp.hidden << '\'');
        }
        string tmp = "cmm";
        string tmp2 = "cmsy";