+ string required;
+ string extra;
+ string htmlname;
+ string xmlname;
+ bool hidden = false;
+ is >> setw(65536) >> macro >> required;
+ if ((is >> htmlname >> xmlname)) {
+ extra = required;
+ if (!(is >> required))
+ required = "";
+ } else
+ htmlname = xmlname = "";
+ MacroTable::iterator it = MacroTable::globalMacros().insert(
+ nullptr, from_utf8(macro));
+ if (!extra.empty() || !htmlname.empty() || !xmlname.empty() || !required.empty()) {
+ MathWordList::iterator wit = theMathWordList.find(it->first);
+ if (wit != theMathWordList.end())
+ LYXERR(Debug::MATHED, "readSymbols: inset "
+ << to_utf8(it->first) << " already exists.");
+ else {
+ latexkeys tmp;
+ tmp.inset = "macro";
+ tmp.name = it->first;
+ tmp.extra = from_utf8(extra);
+ tmp.htmlname = from_utf8(htmlname);
+ tmp.xmlname = from_utf8(xmlname);
+ if (required == "hiddensymbol") {
+ required = "";
+ tmp.hidden = hidden = true;
+ } else
+ tmp.required = required;
+ theMathWordList[it->first] = tmp;
+ wit = theMathWordList.find(it->first);
+ it->second.setSymbol(&(wit->second));
+ }
+ }
+ // If you change the following output, please adjust
+ // development/tools/generate_symbols_images.py.
+ LYXERR(Debug::MATHED, "read symbol '" << to_utf8(it->first)
+ << " inset: macro"
+ << " draw: 0"
+ << " extra: " << extra
+ << " html: " << htmlname
+ << " xml: " << xmlname
+ << " requires: " << required
+ << " hidden: " << hidden << '\'');