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?