0

We are currently using auto-render extension for rendering KaTeX into preview mode, we do have helper function which calls renderMathInElement function and our helper function is as follows:

function renderMath(element) {
            try {
                window.renderMathInElement(element,
                {
                    delimiters: [
                        { left: "$$", right: "$$", display: true },
                        { left: "\\[", right: "\\]", display: true },
                        { left: "$", right: "$", display: true },
                        { left: "\\(", right: "\\)", display: false }
                    ]
                });
            } catch (err) {
                console.log(err);
            }
        }

This function does not catch any error thrown by KaTeX. Can someone point, what and where we are doing wrong?

1 Answers1

0

Auto-renderer does not throw parse exceptions, it catches them and prints them to console.error.

MvG
  • 57,380
  • 22
  • 148
  • 276