mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
MathML: stop stretching all delimiters.
No form? Reference: https://w3c.github.io/mathml-core/#dfn-form. The MathML processor is smart enough to determine whether the delimiter is prefix or postfix. No stretchy/symmetric/fence in all cases? Reference: https://w3c.github.io/mathml-core/#algorithm-for-determining-the-properties-of-an-embellished-operator and https://w3c.github.io/mathml-core/#operator-dictionary-human (example entry: U+0028). Delimiters have the right properties by default.
This commit is contained in:
parent
be03d69946
commit
8f820d7ccb
@ -190,15 +190,16 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
|
||||
void InsetMathDelim::mathmlize(MathMLStream & ms) const
|
||||
{
|
||||
// Ignore the delimiter if: it is empty or only a space (one character).
|
||||
const std::string attr = is_extracted_ ? "stretchy='false'" : "";
|
||||
if (!left_.empty() && ((left_.size() == 1 && left_[0] != ' ') || left_.size() > 1)) {
|
||||
ms << MTag("mrow")
|
||||
<< MTagInline("mo", "form='prefix' fence='true' stretchy='true' symmetric='true'")
|
||||
<< MTagInline("mo", attr)
|
||||
<< convertDelimToXMLEscape(left_)
|
||||
<< ETagInline("mo");
|
||||
}
|
||||
ms << cell(0);
|
||||
if (!right_.empty() && ((right_.size() == 1 && right_[0] != ' ') || right_.size() > 1)) {
|
||||
ms << MTagInline("mo", "form='postfix' fence='true' stretchy='true' symmetric='true'")
|
||||
ms << MTagInline("mo", attr)
|
||||
<< convertDelimToXMLEscape(right_)
|
||||
<< ETagInline("mo")
|
||||
<< ETag("mrow");
|
||||
|
Loading…
Reference in New Issue
Block a user