Update the MathDocument reset() command to allow resetting input and output jax. #647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #570, we wanted a more general reset facility so that you can ask the MathDocument to reset, and it will reset its input and output jax automatically. This PR extends the current
reset()
method to do that by allowing you to specify what items to be reset. The default is still just the processed bits (since that's what the documented behavior is), but you can request the input or output jax, or all possible resets. It adds the genericreset()
methods to the input and output tax objects, and implements them in SVG and CHTML output to reset the font caches, and in TeX input to reset the tags. It updates the Menu code to call the general input-jax reset function rather than including tex-specific code, and it updates the Startup object to create reset commands that use the new generic reset rather than making only a tex-specific one.