}
+docstring const MacroData::xmlname() const
+{
+ if (sym_)
+ return sym_->xmlname;
+ return docstring();
+}
+
+
+char const * MacroData::MathMLtype() const
+{
+ return sym_ ? sym_->MathMLtype() : 0;
+}
+
+
void MacroData::unlock() const
{
--lockCount_;
///
std::string const requires() const;
///
+ docstring const xmlname() const;
+ ///
+ char const * MathMLtype() const;
+ ///
void setSymbol(latexkeys const * sym) { sym_ = sym; }
/// lock while being drawn to avoid recursions
void MathMacro::mathmlize(MathStream & os) const
{
- MathWordList const & words = mathedWordList();
- MathWordList::const_iterator it = words.find(name());
- if (it != words.end()) {
- docstring const xmlname = it->second.xmlname;
+ LATTEST(macro_);
+ if (macro_) {
+ docstring const xmlname = macro_->xmlname();
if (!xmlname.empty()) {
- char const * type = it->second.MathMLtype();
+ char const * type = macro_->MathMLtype();
os << '<' << type << "> " << xmlname << " /<"
<< type << '>';
return;
void MathMacro::htmlize(HtmlStream & os) const
{
- MathWordList const & words = mathedWordList();
- MathWordList::const_iterator it = words.find(name());
- if (it != words.end()) {
- docstring const xmlname = it->second.xmlname;
+ LATTEST(macro_);
+ if (macro_) {
+ docstring const xmlname = macro_->xmlname();
if (!xmlname.empty()) {
os << ' ' << xmlname << ' ';
return;