Closed asterixpound closed 1 year ago
The error is caused by html attributes starting with a special char, like :aria-label
and @click
which are used for Alpine. These are valid attribute names but for some reason mathjax cannot parse the HTML document if such attributes are present. You can report this problem on the MathJax repo and maybe they will fix it.
As a workaround you can use the longhand syntax of Alpine by replacing :foo
with x-bind:foo
and @bar
with x-on:bar
. It works if the colon is in the middle and not at the beginning. Here is a diff.patch with the relevant changes.
At the moment I don't have any plans to add MathJax by default.
Thanks for your help, @rothsandro. Your patch worked for me. With eleventy-plugin-mathjax installed, equations are now rendered correctly without error.
I have also shared the issue with eleventy-plugin-mathjax at https://github.com/tsung-ju/eleventy-plugin-mathjax/issues/6.
Great, thanks for your feedback. I'll close this issue as MathJax should fix their parser.
For the benefit of other readers, an alternative is to use markdown-it-mathjax3 - I appreciate you have no plans to merge but could supply a PR if that is of use
@synesthesia Thanks for the recommendation, good to know for other users 👍 I don't plan to add this to the template atm.
For me, it is important in a note-taking application to have support for mathematical equations.
I tried adding eleventy-plugin-mathjax to my clone of eleventy-notes but I get the following error:
Any idea what might be going on here?
Is there interest in adding MathJax support to eleventy-notes by default?