Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! #131

Open
masx200 opened this issue Jul 26, 2021 · 1 comment

Comments

@masx200
Copy link

masx200 commented Jul 26, 2021

<script src="https://cdn.jsdelivr.net/gh/asciimath/asciimathml@master/ASCIIMathML.min.js"></script>
console.log(asciimath.parseMath('sum_(i=1)^n i^3=((n(n+1))/2)^2'))
<math title="sum_(i=1)^n i^3=((n(n+1))/2)^2"><mstyle mathcolor="blue" fontsize="1em" mathsize="1em" fontfamily="serif" mathvariant="serif" displaystyle="true"><mi>s</mi><mi>u</mi><mi>m</mi><mo>_</mo><mo>(</mo><mi>i</mi><mo>=</mo><mn>1</mn><mo>)</mo><mo>^</mo><mi>n</mi><mi>i</mi><mo>^</mo><mn>3</mn><mo>=</mo><mo>(</mo><mo>(</mo><mi>n</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>)</mo><mo>/</mo><mn>2</mn><mo>)</mo><mo>^</mo><mn>2</mn></mstyle></math>

The attribute "mathvariant" is incorrect! "serif"

https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mi

mathvariant
This logical class of the identifier, which varies in typography. That is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. The following values are allowed:
normal (Default value for more than one character) ; Example
bold ; Example
italic (Default value for a single character) ; Example
bold-italic ; Example
double-struck ; Example
bold-fraktur ; Example
script ; Example
bold-script ; Example
fraktur ; Example
sans-serif ; Example
bold-sans-serif ; Example
sans-serif-italic ; Example
sans-serif-bold-italic ; Example
monospace ; Example
initial ; مثال
tailed ; مثال
looped ; مثال
stretched ; مثال

@masx200
Copy link
Author

masx200 commented Jul 26, 2021

截图_选择区域_20210726205909
The way it transforms is obviously wrong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant