Thank you for your response,
I'm using Yew, which is a Rust web framework, but the project is still pretty young, and there's a bit of WebAssembly glue, so I'm not sure I could provide a simple page that works, is easy to test, etc...
I'll try and explain myself more clearly, and if this doesn't help I'll figure something out.
I have a page, and a bunch of math problems that I want to display, one at a time. So I have a paragraph that initially contains problem 1, and then I have a button that allows me to cycle through the problems. When I press the button, the content of the paragraph is dynamically changed to problem 2, and so on.
My issue is that if problem 1 contains any math that is typeset, and I change to problem 2, I get problem 2 displayed, and I also still have the typeset equation from problem 1.
For example, if problem 1 is "Solve the equation \(x+3=7\)" and problem 2 is "What is a quadratic equation?", what actually gets displayed when I want to show problem 2 is "What is a quadratic equation?x+3=7" (where x+3=7 properly typeset).
Initially, I also had the problem that if problem 2 contained math, it didn't get typeset. I solved this by calling `MathJax.typeset()` every time the content of my component changes, as per the page
https://docs.mathjax.org/en/latest/advanced/typeset.html. But this page only deals with typesetting new equations, and not removing the typeset math of equations that aren't wanted anymore.
I guess my question is "Is there a counterpart to `MathJax.typeset()` where I could tell MathJax to remove the typesetting that isn't needed anymore?"
I hope I was clear enough and not too long,
thank you