NDOJ/resources/katex_config.js

17 lines
761 B
JavaScript
Raw Normal View History

2024-02-05 23:02:49 +00:00
window.KatexOptions = {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\[', right: '\\]', display: true},
{left: "\\(", right: "\\)", display: false},
{left: "\\begin{equation}", right: "\\end{equation}", display: true},
{left: "\\begin{align}", right: "\\end{align}", display: true},
{left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
{left: "\\begin{gather}", right: "\\end{gather}", display: true},
{left: "\\begin{CD}", right: "\\end{CD}", display: true},
],
throwOnError : false
};
window.renderKatex = (elem=document.body) => {
renderMathInElement(elem, window.KatexOptions);
}