Closed zbh876325764 closed 3 years ago
Hello, @zbh876325764. Sorry for taking too long to respond. I missed this issue. This is just the way the library is implemented. It does not distingue between one or many characters, so for one char in LaTeX, parentheses are optional, but they must be applied for many chars cases, so they are always applied to accomplish the most restrive case.
hello @asnunes , I also have this problem, when I use <mrow>
tag after <msub>
tag,
example: <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi><mi>e</mi><msub><mrow><mo>(</mo><mi>O</mi><mi>H</mi><mo>)</mo></mrow><mn>3</mn></msub></math>
result: F e \left(\left(\right. O H \left.\right)\right)_{3}
but i want: F e \left(\right. O H \left.\right)_{3}
I have this idea: check the starting characters, if it starts with {
or [
or (
, then wrap ( )
can be omitted (see photo below)
( The file containing the function in the image is
src\data\helpers\wrappers\parenthesis.ts
)
Have a nice day, asnunes
example:
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <msub> <mi>𝑎</mi> <mn>0</mn> </msub> </math>
result:'\left(𝑎\right)_{0}'
but i want '𝑎_{0}'