Use classes to indicate what MathJax should typeset. Exclude `body`, then include e.g. `div.content` or possibly `.mathjax`. That way you can activate and deactivate by manipulating the `.classList`. Here [in the docs](https://docs.mathjax.org/en/latest/options/document.html) we see ```js MathJax = { options: { skipHtmlTags: [ // HTML tags that won't be searched for math 'script', 'noscript', 'style', 'textarea', 'pre', 'code', 'annotation', 'annotation-xml' ], includeHtmlTags: { // HTML tags that can appear within math br: '\n', wbr: '', '#comment': '' }, ignoreHtmlClass: 'tex2jax_ignore', // class that marks tags not to search processHtmlClass: 'tex2jax_process', // class that marks tags that should be searched compileError: function (doc, math, err) {doc.compileError(math, err)}, typesetError: function (doc, math, err) {doc.typesetError(math, err)}, renderActions: {...} } }; ``` so we can add `nomathmax` to the `
` element, and then `mathjax` to e.g. `