- 
                Notifications
    You must be signed in to change notification settings 
- Fork 279
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  | 
5113906    to
    dbef9cf      
    Compare
  
    | 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  | 
Which stashes LaTeX during conversion and pops it afterwards. Otherwise things like `\\` get replaced with `\` which failed with: DOMjudge#3099 (comment)





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.