Also, replace lspace='thinmathspace' by constructs that are not deprecated.
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
std::string decoration = cur->second.entity;
ms << MTag(outag)
<< cell(0)
- << "<" << from_ascii(ms.namespacedTag("mo")) << " stretchy=\"true\">"
+ << MTagInline("mo", "stretchy='true'")
<< from_ascii(decoration)
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+ << ETagInline("mo")
<< ETag(outag);
}
else if (upper)
ms << ETag("msup");
ms << cell(0)
- << "<" << from_ascii(ms.namespacedTag("mo")) << "> "
- << " ⁢ "
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+ << MTagInline("mo") << "⁢" << ETagInline("mo") // ⁢
<< MTag("mrow")
- << "<" << from_ascii(ms.namespacedTag("mo")) << "> "
- << " ⅆ "
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+ << MTagInline("mo") << "ⅆ" << ETagInline("mo") // ⅆ
<< cell(1)
<< ETag("mrow");
}
rdelim = ']';
break;
}
- ms << "<" << from_ascii(ms.namespacedTag("mo")) << " fence='true' stretchy='true' form='prefix'>"
+ ms << MTagInline("mo", "fence='true' stretchy='true' form='prefix'")
<< ldelim
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
- << "<" << from_ascii(ms.namespacedTag("mfrac")) << " linethickness='0'>"
+ << ETagInline("mo")
+ << MTagInline("mfrac", "linethickness='0'")
<< cell(0) << cell(1)
- << "</" << from_ascii(ms.namespacedTag("mfrac")) << ">"
- << "<" << from_ascii(ms.namespacedTag("mo")) << " fence='true' stretchy='true' form='postfix'>"
+ << ETagInline("mfrac")
+ << MTagInline("mo", "fence='true' stretchy='true' form='postfix'")
<< rdelim
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">";
+ << ETagInline("mo");
}
docstring const xmlname = d->macro_->xmlname();
if (!xmlname.empty()) {
char const * type = d->macro_->MathMLtype();
- ms << "<" << from_ascii(ms.namespacedTag(type)) << ">"
- << xmlname
- << "</" << from_ascii(ms.namespacedTag(type)) << ">";
+ ms << MTagInline(type) << xmlname << ETagInline(type);
return;
}
}
void InsetMathMatrix::mathmlize(MathMLStream & ms) const
{
- ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
+ // lspace='3/18em', but fractions are not allowed.
+ ms << MTagInline("mo", "form='prefix' fence='true' stretchy='true' symmetric='true' lspace='0.1666em'")
<< convertDelimToXMLEscape(left_)
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+ << ETagInline("mo")
<< MTag("mtable");
for (row_type row = 0; row < nrows(); ++row) {
ms << MTag("mtr");
ms << ETag("mtr");
}
ms << ETag("mtable")
- << "<" << from_ascii(ms.namespacedTag("mo")) << " form='postfix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
+ << MTagInline("mo", "form='postfix' fence='true' stretchy='true' symmetric='true' lspace='0.1666em'")
<< convertDelimToXMLEscape(right_)
- << "</" << from_ascii(ms.namespacedTag("mo")) << ">";
+ << ETagInline("mo");
}
void InsetMathOverset::mathmlize(MathMLStream & ms) const
{
- ms << "<" << from_ascii(ms.namespacedTag("mover")) << " accent='false'>"
+ ms << MTag("mover", "accent='false'")
<< cell(0) << cell(1)
- << "</" << from_ascii(ms.namespacedTag("mover")) << ">";
+ << ETag("mover");
}
ms << MTag("mmultiscripts");
if (nuc().empty())
- ms << "<" << from_ascii(ms.namespacedTag("mrow")) << " />";
+ ms << CTag("mrow");
else
ms << MTag("mrow") << nuc() << ETag("mrow");
if (br().empty() || !scriptr_)
- ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
+ ms << CTag("none");
else
ms << MTag("mrow") << br() << ETag("mrow");
if (tr().empty() || !scriptr_)
- ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
+ ms << CTag("none");
else
ms << MTag("mrow") << tr() << ETag("mrow");
if (bl().empty() || !scriptl_)
- ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
+ ms << CTag("none");
else
ms << MTag("mrow") << bl() << ETag("mrow");
if (tl().empty() || !scriptl_)
- ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
+ ms << CTag("none");
else
ms << MTag("mrow") << tl() << ETag("mrow");
void InsetMathStackrel::mathmlize(MathMLStream & ms) const
{
if (nargs() > 2)
- ms << "<" << from_ascii(ms.namespacedTag("munderover")) << ">"
+ ms << MTag("munderover")
<< cell(0) << cell(2) << cell(1)
- << "</" << from_ascii(ms.namespacedTag("munderover")) << ">";
+ << ETag("munderover");
else
- ms << "<" << from_ascii(ms.namespacedTag("mover")) << " accent='false'>"
+ ms << MTag("mover", "accent='false'>")
<< cell(0) << cell(1)
- << "</" << from_ascii(ms.namespacedTag("mover")) << ">";
+ << ETag("mover");
}
{
// FIXME We may need to do more interesting things
// with MathMLtype.
- docstring tag = from_ascii(ms.namespacedTag(sym_->MathMLtype()));
- ms << '<' << tag << ">";
+ ms << MTagInline(sym_->MathMLtype());
if (sym_->xmlname == "x")
// unknown so far
ms << name();
else
ms << sym_->xmlname;
- ms << "</" << tag << '>';
+ ms << ETagInline(sym_->MathMLtype());
}
void InsetMathUnderset::mathmlize(MathMLStream & ms) const
{
- ms << "<" << from_ascii(ms.namespacedTag("munder")) << " accent='false'>"
+ ms << MTag("munder", "accent='false'")
<< cell(0) << cell(1)
- << "</" << from_ascii(ms.namespacedTag("munder")) << ">";
+ << ETag("munder");
}
void InsetMathUnderset::htmlize(HtmlStream & os) const
{
os << MTag("span", "class='underset'")
- << MTag("span") << cell(1) << ETag("span")
- << MTag("span", "class='bottom'") << cell(0) << ETag("span")
- << ETag("span");
+ << MTag("span") << cell(1) << ETag("span")
+ << MTag("span", "class='bottom'") << cell(0) << ETag("span")
+ << ETag("span");
}
void InsetMathXArrow::mathmlize(MathMLStream & ms) const
{
docstring arrow = map_latex_to(name_);
- ms << "<" << from_ascii(ms.namespacedTag("munderover")) << " accent='false' accentunder='false'>"
+ ms << MTag("munderover", "accent='false' accentunder='false'")
<< MTagInline("mo") << arrow << ETagInline("mo")
<< cell(1) << cell(0)
- << "</" << from_ascii(ms.namespacedTag("munderover"))<< ">";
+ << ETag("munderover");
}