Skip to content

Commit e3b1ec4

Browse files
committed
Corrected some comments. Fixed duplicate MathML test.
1 parent ba2141a commit e3b1ec4

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,18 +757,19 @@ class FontConstantsBase:
757757
# Percentage of x-height the numerator is shifted up in display style.
758758
num1 = 1.4
759759

760-
# Percentage of x-height the numerator is shifted up in text style if there
761-
# is a fraction line.
760+
# Percentage of x-height the numerator is shifted up in text, script and
761+
# scriptscript styles if there is a fraction line.
762762
num2 = 1.5
763763

764-
# Percentage of x-height the numerator is shifted up in text style if there
765-
# is no fraction line.
764+
# Percentage of x-height the numerator is shifted up in text, script and
765+
# scriptscript styles if there is no fraction line.
766766
num3 = 1.3
767767

768768
# Percentage of x-height the denominator is shifted down in display style.
769769
denom1 = 1.3
770770

771-
# Percentage of x-height the denominator is shifted down in text style.
771+
# Percentage of x-height the denominator is shifted down in text, script
772+
# and scriptscript styles.
772773
denom2 = 1.1
773774

774775

@@ -2396,7 +2397,7 @@ def _genfrac(self, ldelim, rdelim, rule, style, num, den):
23962397
cnum.hpack(width, 'exactly')
23972398
cden.hpack(width, 'exactly')
23982399

2399-
# Align the fraction without a fraction line (node743, node744 and
2400+
# Align the fraction with a fraction line (node743, node744 and
24002401
# node746).
24012402
if rule:
24022403
if style is self._MathStyle.DISPLAYSTYLE:

lib/matplotlib/tests/test_mathtext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@
127127
r'$\mathcal{H} = \int d \tau \left(\epsilon E^2 + \mu H^2\right)$',
128128

129129
# The examples prefixed by 'mmltt' are from the MathML torture test here:
130-
# https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/MathML_Torture_Test
130+
# https://www-archive.mozilla.org/projects/mathml/demo/texvsmml.xhtml
131131
r'${x}^{2}{y}^{2}$',
132132
r'${}_{2}F_{3}$',
133133
r'$\frac{x+{y}^{2}}{k+1}$',
134134
r'$x+{y}^{\frac{2}{k+1}}$',
135135
r'$\frac{a}{b/2}$',
136136
r'${a}_{0}+\frac{1}{{a}_{1}+\frac{1}{{a}_{2}+\frac{1}{{a}_{3}+\frac{1}{{a}_{4}}}}}$',
137-
r'${a}_{0}+\frac{1}{{a}_{1}+\frac{1}{{a}_{2}+\frac{1}{{a}_{3}+\frac{1}{{a}_{4}}}}}$',
137+
r'${a}_{0}+\dfrac{1}{{a}_{1}+\dfrac{1}{{a}_{2}+\dfrac{1}{{a}_{3}+\dfrac{1}{{a}_{4}}}}}$',
138138
r'$\binom{n}{k/2}$',
139139
r'$\binom{p}{2}{x}^{2}{y}^{p-2}-\frac{1}{1-x}\frac{1}{1-{x}^{2}}$',
140140
r'${x}^{2y}$',

0 commit comments

Comments
 (0)