[toc2] Remove MathJax preview in headers and links #877
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.
This PR addresses a somewhat involved issue for
toc2
andlatex_envs
together; see latex_envs#14.toc2
copies the headers into links in order to populate the toc2 widow/sidebar, the table of contents (if enabled) in the notebook, and finally the navigate menu. Whenlatex_envs
is enabled, it has the capability to keep all equations and environments correctly numbered: each markdown rendering entails the reset of all equations numbers and the recomputation of all math renderings. Maths are stored as a preview in html, with styling, classes, ids, and embedded scripts. When copying the headers into links, these previews are copied as well. The duplication of ids then seems to cause a mess to the whole webpage rendering: maths in the toc window/sidebar is sometimes duplicated, maths can disappear in the toc and/or in the navigation menu.The PR remove MathJax previews in headings links and restore the latex versions, which in turn, is interpreted by Mathjax when needed.