|
From: <mi...@us...> - 2021-04-08 16:36:02
|
Revision: 8675
http://sourceforge.net/p/docutils/code/8675
Author: milde
Date: 2021-04-08 16:35:54 +0000 (Thu, 08 Apr 2021)
Log Message:
-----------
Fix bug #406 (MathML translation of ``\mathbf``).
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/utils/math/latex2mathml.py
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-04-07 20:45:05 UTC (rev 8674)
+++ trunk/docutils/HISTORY.txt 2021-04-08 16:35:54 UTC (rev 8675)
@@ -16,6 +16,10 @@
Changes Since 0.17
==================
+* docutils/utils/math/latex2mathml.py
+
+ - Fix bug #406 (MathML translation of ``\mathbf``).
+
* docutils/writers/latex2e/__init__.py:
- Open "docutils.sty" with encoding set to "utf8".
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2021-04-07 20:45:05 UTC (rev 8674)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2021-04-08 16:35:54 UTC (rev 8675)
@@ -524,7 +524,7 @@
node = node.append(mo(negatables[operator]))
skip += len(operator)
elif name == 'mathbf':
- style = mstyle(nchildren=1, fontweight='bold')
+ style = mstyle(nchildren=1, mathvariant='bold')
node.append(style)
node = style
elif name == 'mathbb':
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2021-04-07 20:45:05 UTC (rev 8674)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2021-04-08 16:35:54 UTC (rev 8675)
@@ -46,7 +46,7 @@
<math xmlns="http://www.w3.org/1998/Math/MathML" mode="display">
<mtable>
<mtr>
-<mtd><mstyle fontweight="bold">
+<mtd><mstyle mathvariant="bold">
<mrow><mi>M</mi></mrow></mstyle><mo>=</mo><mfenced open="(" close=")">
<mrow>
<mtable>
@@ -58,7 +58,7 @@
<mtd><mi>d</mi></mtd></mtr></mtable></mrow></mfenced></mtd></mtr></mtable></math>
</div>
<p>is <math xmlns="http://www.w3.org/1998/Math/MathML">
-<mrow><mo>|</mo><mstyle fontweight="bold">
+<mrow><mo>|</mo><mstyle mathvariant="bold">
<mrow><mi>M</mi></mrow></mstyle><mo>|</mo><mo>=</mo><mi>a</mi><mi>d</mi><mo>-</mo><mi>b</mi><mi>c</mi></mrow></math>.</p>
<p>More than one display math block can be put in one math directive.
For example, the following sum and integral with limits:</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|