Thank you for this great library, I have integrated it into the editor of Jade, my side-project to build a spatial note-taking tool.
An issue I notice recently is that MathView throws the KaTeX error if it's not a ParseError. It happens, for example, when I type this invalid LaTeX: \gdef\bar#1#{#1^2} \bar{y} + \bar{y}.
Throwing the error means I need to handle it at higher level, or my app would crash.
But when I catch the error in the app, I cannot easily know which MathView threw it and I have no access to _mathRenderElt to show the error message in place.
I think a better solution is to handle it the same way as handling ParseError: show the error message in place to notify users to correct their LaTeX. You can take a look at the approach in my fork here.
Hi benrbray,
Thank you for this great library, I have integrated it into the editor of Jade, my side-project to build a spatial note-taking tool.
An issue I notice recently is that MathView throws the KaTeX error if it's not a
ParseError
. It happens, for example, when I type this invalid LaTeX:\gdef\bar#1#{#1^2} \bar{y} + \bar{y}
.Throwing the error means I need to handle it at higher level, or my app would crash. But when I catch the error in the app, I cannot easily know which MathView threw it and I have no access to
_mathRenderElt
to show the error message in place.I think a better solution is to handle it the same way as handling
ParseError
: show the error message in place to notify users to correct their LaTeX. You can take a look at the approach in my fork here.