-
Notifications
You must be signed in to change notification settings - Fork 1
Use MathJax 4 #85
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?
Use MathJax 4 #85
Conversation
|
I created an issue for the empty mtr problem here. I think the workaround is fine for production. It's just a little annoying that we will have some extra non-fatal errors in the logs. |
This works for tagged pdfs, the other doesn't. Browsers also recognize title as a valid alternate description + add a tooltip.
So far, this only happens when a math element only contains mspace and nothing else.
Event emitter had some problems with serializing the DOM.
Not always one svg (oops)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It made sense to me while I was reading the code, but there are a lot of changes here. It would also be good to have someone in the content team (Theresa?) take a look at the font changes you mentioned and approve everything.
| log.debug(`There are ${total} elements to process...`) | ||
| const convertMathML = async (log, mathEntries, outputFormat, batchSize, handleErrors) => { | ||
| log.debug(`There are ${mathEntries.length} elements to process...`) | ||
| log.debug('Starting conversion of mapped MathML elements with mathjax-node...') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess technically you removed mathjax-node
serializes entities
https://openstax.atlassian.net/browse/CORE-1294
Update to MathJax 4 in order to fix speech generation. There's one workaround for dealing with empty mtr. Also, I removed html output since we are not using that. It shouldn't be too hard to add it back, but it didn't seem worth it right now.
There are some visual differences since the font is slightly different, but I tried to keep it as close to the old as possible. I was able to configure the min script size in the
readysection of the config instead of using an extension.The missing font variants part I am less sure about. I have some idea how to replicate that in MathJax 4 using fontparams, but I am not sure if that's still required.