You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, even a slight error on tex source will make the cell unreadable after Katex throws ParseError. Sometimes the whole page becomes blank and auto-reload with watch fails even after doing a correction. Current Katex renderer function does not handle the parser errors gracefully.
Katex documentation ( https://katex.org/docs/options ) says that the behavior can be controlled with throwOnError option. Documentation for the option is:
throwOnError: boolean. If true (the default), KaTeX will throw a ParseError when it encounters an unsupported command or invalid LaTeX. If false, KaTeX will render unsupported commands as text, and render invalid LaTeX as its source code with hover text giving the error, in the color given by errorColor.
Having information about source of error is much better from usability perspective. As such, render-katex should be modified like this:
Right now, even a slight error on tex source will make the cell unreadable after Katex throws
ParseError
. Sometimes the whole page becomes blank and auto-reload with watch fails even after doing a correction. Current Katex renderer function does not handle the parser errors gracefully.Katex documentation ( https://katex.org/docs/options ) says that the behavior can be controlled with
throwOnError
option. Documentation for the option is:throwOnError: boolean. If true (the default), KaTeX will throw a ParseError when it encounters an unsupported command or invalid LaTeX. If false, KaTeX will render unsupported commands as text, and render invalid LaTeX as its source code with hover text giving the error, in the color given by errorColor.
Having information about source of error is much better from usability perspective. As such,
render-katex
should be modified like this:The text was updated successfully, but these errors were encountered: