[LyX/master] Use proper minus sign character in MathML Core.
Thibaut Cuvelier
tcuvelier at lyx.org
Sat Sep 28 14:50:59 UTC 2024
commit 790c15373782510d912ab3bd2c24393cda7fe85d
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
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.
---
src/mathed/InsetMathChar.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp
index ebc1644af5..7e57bf28e5 100644
--- a/src/mathed/InsetMathChar.cpp
+++ b/src/mathed/InsetMathChar.cpp
@@ -239,6 +239,12 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
case '<': entity = "<"; break;
case '>': entity = ">"; break;
case '&': entity = "&"; break;
+ case '-':
+ if (ms.version() == MathMLStream::mathmlCore) {
+ // − U+2212 MINUS SIGN
+ entity = "−";
+ }
+ break;
case ' ': {
ms << from_ascii(" ");
return;
More information about the lyx-cvs
mailing list