commit d99f1659dad76d4d0068dd44f547abbc4149ed81
Author: Thibaut Cuvelier <[email protected]>
Date:   Sat Sep 28 16:47:58 2024 +0200

    Use proper minus sign character in MathML Core.
    
    Fixes bug https://www.lyx.org/trac/ticket/13067.
    
    Based on the patch in the ticket above by Jean-Marc Lasgouttes.
    
    (cherry picked from commit 790c15373782510d912ab3bd2c24393cda7fe85d)
---
 src/mathed/InsetMathChar.cpp | 20 ++++++++++++--------
 status.24x                   |  2 ++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp
index bfe0d46eda..a8c08d2e3a 100644
--- a/src/mathed/InsetMathChar.cpp
+++ b/src/mathed/InsetMathChar.cpp
@@ -250,14 +250,18 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
 {
        std::string entity;
        switch (char_) {
-               case '<': entity = "&lt;"; break;
-               case '>': entity = "&gt;"; break;
-               case '&': entity = "&amp;"; break;
-               case ' ': {
-                       ms << from_ascii("&#0160;");
-                       return;
-               }
-               default: break;
+       case '<': entity = "&lt;"; break;
+       case '>': entity = "&gt;"; break;
+       case '&': entity = "&amp;"; break;
+       case '-':
+               // − U+2212 MINUS SIGN
+               entity = "&#x2212;";
+               break;
+       case ' ': {
+               ms << from_ascii("&#0160;");
+               return;
+       }
+       default: break;
        }
 
        if (ms.inText()) {
diff --git a/status.24x b/status.24x
index 50d7a599e3..a2a077c376 100644
--- a/status.24x
+++ b/status.24x
@@ -97,6 +97,8 @@ What's new
 
 - Fix cmidrule trimming in last column of a formal table (bug 13171).
 
+- Use proper minus sign character in MathML export (bug 13067).
+
 
 * USER INTERFACE
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to