Skip to content
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

initialize:160 Error loading MathJax: TypeError: Cannot set property Package of #<Object> which has only a getter #3289

Open
quanzhongxian opened this issue Sep 26, 2024 · 1 comment

Comments

@quanzhongxian
Copy link

import "mathjax-full/es5/tex-svg-full";
image

@dpvc
Copy link
Member

dpvc commented Sep 30, 2024

This is a duplicate of #3106, and the earlier #3079.

Because this is occurring while handling the MathJax configuration, we can't use the usual MathJax.startup.ready() function to fix it. It is fixed in v4 (currently in beta release), but not in v3.

The fix is in this commit. You could edit the ts/components/global.ts file to make the combineConfig() function be

https://github.com/mathjax/MathJax-src/blob/43bb7d905c1891f0fd3b5459dc0ec2f90c650845/ts/components/global.ts#L85-L102

and recompile it using npm run -s compile, then rebuild the tex-svg-full component using npm run -s make-components (which will rebuild everything, so it will take a while), that should allow it to work for you.

Sometimes the presence of a MathJax configuration can prevent this. There is also some discussion in #3079 about it, but no other solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants