]> git.lyx.org Git - lyx.git/commitdiff
Use proper minus sign character in MathML Core.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 28 Sep 2024 14:47:58 +0000 (16:47 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 28 Sep 2024 14:50:29 +0000 (16:50 +0200)
Fixes bug https://www.lyx.org/trac/ticket/13067.

Based on the patch in the ticket above by Jean-Marc Lasgouttes.

src/mathed/InsetMathChar.cpp

index ebc1644af541758e7e418cf60cde23f54d6a3f0c..7e57bf28e567ff6796ee133b5eff0fe6db4a4d5e 100644 (file)
@@ -239,6 +239,12 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
        case '<': entity = "&lt;"; break;
        case '>': entity = "&gt;"; break;
        case '&': entity = "&amp;"; break;
+       case '-':
+               if (ms.version() == MathMLStream::mathmlCore) {
+                       // − U+2212 MINUS SIGN
+                       entity = "&#x2212;";
+               }
+               break;
        case ' ': {
                ms << from_ascii("&#0160;");
                return;