1/**
2 * Scripts of the KaTeX Plugin
3 *
4 * add event listener to render TeX expressions with KaTeX
5 *
6 * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
7 * @author  H.-H. PENG (Hsins) <hsinspeng@gmail.com>
8 */
9
10document.addEventListener('DOMContentLoaded', () => {
11  if (JSINFO['ACT'] == 'admin') return;
12  renderMathInElement(document.body, {
13    output: JSINFO['plugins']['katex']['options']['output'],
14    delimiters: JSINFO['plugins']['katex']['options']['delimiters'],
15    throwOnError: JSINFO['plugins']['katex']['options']['throwonerror'],
16    errorColor: JSINFO['plugins']['katex']['options']['error-color'],
17    macros: JSINFO['plugins']['katex']['options']['macros'],
18  });
19});
20