Forces a refresh of MathJax rendering within a specified container.
Re-typesets all mathematical expressions in the target element to ensure
proper rendering. This is useful when math content has been dynamically
updated or when display issues occur.
Parameters
Optionalcontainer: HTMLElement
Optional HTML element to refresh. If not provided,
defaults to this.viewPanel.
OptionalviewPanel: HTMLElement
Returns Promise<void>
A promise that resolves when the typesetting is complete.
Example
equationDiv.replaceChildren(window.MathJax!.tex2chtml(eqTag.content, { display:true })); // Render new math // Refresh math in a specific element awaitforceMathRefresh(myElement, this.viewPanel);
// Refresh math in the default view panel awaitforceMathRefresh();
Forces a refresh of MathJax rendering within a specified container.
Re-typesets all mathematical expressions in the target element to ensure proper rendering. This is useful when math content has been dynamically updated or when display issues occur.