You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great plugin. I've tried \begin{equation}...\end{equation} syntax with little success. If there are \{ and '}`, I had to escape backslashes because of the Markdown syntax(?). For example,
I think you're escaping them if they're between the default delimiters. I could add \begin{} and \end{} as delimiters, but then, my auto-numbering setting (TeX: {equationNumbers: {autoNumber: "AMS"}} in mathjax.js) wouldn't work anymore. For this setting, I directly modified the JS file in the plugin, which I don't link (see below for more details). Please support \begin{} and \end{} syntax as well.
Custom JS file
Also, since I wanted to add the auto-numbering setting, I tried to follow your instructions to create a custom JS file. I'm using my inherited Quark theme, so I copied mathjax.js to themes/my-quark/js and added {% do assets.addJs('theme://js/mathjax.js') %} to themes/my-quark//templates/partials/base.html.twig. Then, disabled the build-in JS. Now, in the developer console of my Firefox, I'm getting these errors (Undefined MathJax.Hub.. Full error message below). Do you have any idea why this is happening? One thing I can think of is.. in my other non-Grav site, I'm using the text/x-mathjax-config type, not the script type as in
I'm not sure if this is relevant to your specific problem, but here is how I got equation numbering to work with the Grav Mathjax plugin. In short, the issue was that Grav was loading my configuration file after loading from the MathJax CDN, and so the CDN wasn't taking my configuration options into account.
Here is a more detailed list of what I did:
After copying the mathjax.yaml file into my user/config/plugins directory I left most of the configuration options the same except for these two:
Numbered equations
Thanks for the great plugin. I've tried
\begin{equation}
...\end{equation}
syntax with little success. If there are\{
and '}`, I had to escape backslashes because of the Markdown syntax(?). For example,doesn't work while
does.
I think you're escaping them if they're between the default delimiters. I could add
\begin{}
and\end{}
as delimiters, but then, my auto-numbering setting (TeX: {equationNumbers: {autoNumber: "AMS"}}
in mathjax.js) wouldn't work anymore. For this setting, I directly modified the JS file in the plugin, which I don't link (see below for more details). Please support\begin{}
and\end{}
syntax as well.Custom JS file
Also, since I wanted to add the auto-numbering setting, I tried to follow your instructions to create a custom JS file. I'm using my inherited Quark theme, so I copied
mathjax.js
tothemes/my-quark/js
and added{% do assets.addJs('theme://js/mathjax.js') %}
tothemes/my-quark//templates/partials/base.html.twig
. Then, disabled the build-in JS. Now, in the developer console of my Firefox, I'm getting these errors (Undefined MathJax.Hub.. Full error message below). Do you have any idea why this is happening? One thing I can think of is.. in my other non-Grav site, I'm using thetext/x-mathjax-config
type, not thescript
type as inThank you,
Huidae
Full error message
The text was updated successfully, but these errors were encountered: