I have a formula that is so long it exceeds the internal MathJax buffer size limit (default is 5KB). MathJax fails to render any formula that is longer than ~5130 characters and includes macros like `\iff` or any user-defined commands.
This is caused by the default `maxBuffer` parameter set to 5k in MathJax. I wrote a Templator script (with help of Gemini 3) to solve this issue. The script increases the maxBuffer to 256KB, and it does not conflict with `Extended MathJax` plugin.
Below is the Templator script:
```
<%*
try {
window.MathJax.startup.document.inputJax.find(j => j.name === “TeX”).parseOptions.options.maxBuffer = 256 * 1024;
new Notice(“
MathJax buffer fixed”);
} catch (e) {
new Notice(“
MathJax buffer not fixed”);
}
%>
```
