roniemartinez / latex2mathml

Pure Python library for LaTeX to MathML conversion
MIT License
183 stars 25 forks source link

latex2mathml Matrices transfer problem #59

Closed walei88 closed 4 years ago

walei88 commented 4 years ago

I’ve faced a problem with latex2mathml in transferring a matrices

Environment os: MacOS 10.13.6 python version 3.7.0 latex2mathml version 2.8.0 IDE using spyder 4.0.0

this is my code: d = latex2mathml.converter.convert("\begin{matrix}a & b \ c & d \end{matrix}") print(d)

missing “>” in one of block. latex2mathml Matrices

even I add ">", it is still different between the result and the example in "readme" example

walei88 commented 4 years ago

I figure out the problem is that I didn't use "raw strings".

latex_input = r'\begin{matrix}a & b \ c & d \end{matrix}' g = latex2mathml.converter.convert(latex_input) print(g)

then the result is correct: image