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

Reset the tex labels and ids when A11y changes force rerendering. (mathjax/MathJax#2597) #570

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Dec 30, 2020

This PR forces TeX to reset the tags when an A11Y menu item causes the page to re-render.

It may be good to abstract this so that the MathDocument has a reset method that can just be called, and that would call resets on the input jax (and output jax?), which would be empty for ones with no reset, but would do the TeX reset for the TeX input.

It may also be appropriate to save the expression labels and ids for each expression so that if it is re-rendered, it clear those labels and ids, and start auto-numbering at the right place. That would allow proper rerendering without making assumptions about where the numbering starts on the page, or what labels need to be cleared.

Resolves issue mathjax/MathJax#2597

@dpvc dpvc requested a review from zorkow December 30, 2020 21:33
@dpvc dpvc added this to the 3.1.3 milestone Jan 31, 2021
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm.

I agree on the abstraction to a general reset method.

@dpvc
Copy link
Member Author

dpvc commented Mar 8, 2021

I agree on the abstraction to a general reset method.

Should I delay merging this to add that functionality? If we do it on a separate PR, I'm likely to forget about this code and will not remember to change it.

@dpvc
Copy link
Member Author

dpvc commented Mar 22, 2021

I've made the reset() function in a separate PR.

@dpvc dpvc merged commit c125626 into develop Mar 22, 2021
@dpvc dpvc deleted the issue2597 branch March 22, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants