mathjax / MathJax-node

MathJax for Node
Apache License 2.0
614 stars 97 forks source link

"Error: TeX parse error: Missing \end{array}" #477

Open rkanumola opened 2 years ago

rkanumola commented 2 years ago

Hi Team,

We are an app vendor of the LaTex Math Cloud App, we are consuming this library and sometimes we are running into this issue of piling these error messages in the log, we are not sure why there are coming up all of a sudden. can you help us in this regard and let us know if you need any other details to debug this. We suspect a race condition where the error object doesn't get reset. But, your input helps us to resolve the issue. Error: Error: TeX parse error: Missing \end{array}

Thanks RK

dpvc commented 2 years ago

The error suggests that there is an \begin{array} that doesn't have a corresponding \end{array}. There is not really enough information in your report to determine the problem. You would need to provide the code you are using that calls mathjax-node, as well as the math that is being processed that produces the errors.

You may also want to consider updating to MathJax v3, which supersedes mathjax-node now that MathJax v3 can be called directly from node. See the MathJax node demos repository for examples. This should be both faster and less fragile than mathjax-node.

rkanumola commented 2 years ago

Thanks, @dpvc for the response and suggestion, Actually we are not sure about the input user has given, as we see this in our Heroku logs where our instance is hosted, we will try to capture the input and let you know once we have it.

jalaitinen commented 1 month ago

It's not a race condition. You should be able to reproduce running your example from command line (https://github.com/mathjax/MathJax-demos-node/blob/master/direct/tex2svg) with this input latex code

\begin{array}
{l|l}
X&X
\hline
X&X
\end{array}