#Do not load automatically, it redefines some other symbols, and we don't
#have a possibility to turn automatic loading off like for ams
#undertilde decoration none accents
-undertilde decoration none
+undertilde decoration none hiddensymbol
utilde decoration none undertilde
vec decoration none
widehat decoration none
#Do not load automatically, it redefines some other symbols, and we don't
#have a possibility to turn automatic loading off like for ams
#adots dots none yhmath
-adots dots none
+adots dots none hiddensymbol
cdots dots none
ddots dots none
dotsb dots none amsmath
# packages. No 'm' versions!
# See lucidabr.dtx for a possible implementation if you want to use these
# with other fonts.
-biggg big none
-bigggl big none
-bigggr big none
-Biggg big none
-Bigggl big none
-Bigggr big none
+biggg big none hiddensymbol
+bigggl big none hiddensymbol
+bigggr big none hiddensymbol
+Biggg big none hiddensymbol
+Bigggl big none hiddensymbol
+Bigggr big none hiddensymbol
# font changes
# name "font" math/text family series shape color
// fill in global macros
macros.clear();
- MacroTable::globalMacros().getMacroNames(macros);
+ MacroTable::globalMacros().getMacroNames(macros, false);
//lyxerr << "Globals completion macros: ";
for (it = macros.begin(); it != macros.end(); ++it) {
//lyxerr << "\\" + *it << " ";
MathWordList::const_iterator it2;
//lyxerr << "Globals completion commands: ";
for (it2 = words.begin(); it2 != words.end(); ++it2) {
- if (it2->second.inset != "macro") {
+ if (it2->second.inset != "macro" && !it2->second.hidden) {
// macros are already read from MacroTable::globalMacros()
globals.push_back('\\' + it2->first);
//lyxerr << '\\' + it2->first << ' ';
}
+bool MacroData::hidden() const
+{
+ if (sym_)
+ return sym_->hidden;
+ return false;
+}
+
+
docstring const MacroData::xmlname() const
{
if (sym_)
}
-void MacroTable::getMacroNames(std::set<docstring> & names) const
+void MacroTable::getMacroNames(std::set<docstring> & names, bool gethidden) const
{
for (const_iterator it = begin(); it != end(); ++it)
- names.insert(it->first);
+ if (gethidden || !it->second.hidden())
+ names.insert(it->first);
}
///
std::string const requires() const;
///
+ bool hidden() const;
+ ///
docstring const xmlname() const;
///
char const * MathMLtype() const;
///
void dump();
///
- void getMacroNames(std::set<docstring> & names) const;
+ void getMacroNames(std::set<docstring> & names, bool gethidden) const;
/// the global list
static MacroTable & globalMacros();
string requires;
string extra;
string xmlname;
+ bool hidden = false;
is >> macro >> requires;
if ((is >> xmlname)) {
extra = requires;
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));
<< " draw: 0"
<< " extra: " << extra
<< " xml: " << xmlname
- << " requires: " << requires << '\'');
+ << " requires: " << requires
+ << " hidden: " << hidden << '\'');
continue;
}
<< " 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.");
<< " 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";
///
class latexkeys {
public:
+ ///
+ latexkeys() : hidden(false) {}
///
char const * MathMLtype() const;
/// name of the macro or primitive
docstring xmlname;
/// required LaTeXFeatures
std::string requires;
+ /// Should this macro be hidden from autocompletion (since it requires
+ /// user preamble code)?
+ bool hidden;
};