belerico / py_asciimath

A simple converter from ASCIIMath to LaTeX or MathML and from MathML to LaTeX
MIT License
38 stars 10 forks source link

About translate LaTex to AsciiMath #8

Closed tomc14-cc closed 3 years ago

tomc14-cc commented 3 years ago

for example, pyasciimath "[\bar{N}t=m{{v}{0}}\sin \alpha]" from latex to asciimath , it doesnt work.

belerico commented 3 years ago

I think that \bar is not in the defined LaTeX symbol in the latex.py file. Could you please add it in latex.py under the unary_functions dictionary as:

"\\bar": {
    "asciimath": ["bar", "overline"],
    "mathml": "<mover>{}<mo>&#x332;</mo></mover>",
},

Are there any error at all? Can you also run the translation with log=True and post the results?

tomc14-cc commented 3 years ago

great, it was fixed! i saw the LaTex of MathType keep the \bar as a key words.

tomc14-cc commented 3 years ago

fixed.