commit 8f820d7ccb0cb6129c8e3c1d495905d61db97355
Author: Thibaut Cuvelier <tcuvel...@lyx.org>
Date:   Mon Mar 11 01:40:16 2024 +0100

    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.
---
 src/mathed/InsetMathDelim.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp
index d32029b818..fab72db88d 100644
--- a/src/mathed/InsetMathDelim.cpp
+++ b/src/mathed/InsetMathDelim.cpp
@@ -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");
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to