-
Notifications
You must be signed in to change notification settings - Fork 277
MathJax demo #3099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
MathJax demo #3099
Conversation
I think I need to apply the MathJax code to the new element from the modal, I assume those elements don't exist in the DOM when MathJax is loaded. Similar to what we need for clarifications previews.
I think that's because of the rendering being done on clientside. It might be possible to do this serverside if we use nodejs but I don't think MathJax has a PHP equivalent.
I'll keep on looking, but might be for a future PR if this works before the weekend. |
So when you add that part to the menu it does work so it's special to the clarifications. I would almost say we make a separate issue for it if the other issues are fixed. |
So when you add that part to the menu it does work so it's special to the clarifications. I would almost say we make a separate issue for it if the other issues are fixed.
I found the problem, the |
Which stashes LaTeX during conversion and pops it afterwards.
This reverts commit 9a2e9f041f173e9623d77de5705946af6227d159.
This is to render Math statements like LaTeX in clarifications
This reverts commit f3541a4dad21fbbbc9c19637581779ed45c2ab62.
The fonts are missing from the release so we need to manually keep those in sync, we can't use the normal asset function as we get the version string added which is interpret as an option by MathJax and gives unharmful console log entries.
The packages on packagist doesn't have the fonts so we need to store those locally. I now installed the 2 packages with
If it was only for those 2 |
This should only run the script for the modal element to make it fast enough to not use the Promise.
Purely a PoC, only tested/demonstrated at the jury clarification pages. I assume it works for the team pages but that's only because of the shared code.
I didn't test for MathML yet, and the other options for the MathJax object. We would need a couple of example clarifications to test with and do some visual inspection on the result.
I think the fonts can also be version controlled, but GitHub doesn't have a release in the MathJax organization which seems to ship those.