You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the text below with the details of the issue you are facing.
DO NOT simply erase the form and type a free-form response.
Issue Summary
I have a working implementation of MathJax for all my math typsetting needs, but for some reason, some basic HTML tags don't work.
Of note, <b> doesn't work but <strong> does, <i> doesn't work but <em> does, and none of the listing tags are working (<ul>,<ol>,<li>).
Screenshot of the issue
Technical details:
MathJax Version: 2.7.7
Client OS: (e.g., Windows )
Browser: (Multiple (Chrome, Edge))
I am using the following MathJax configuration (within Svelte):
<script>
import {onMount,afterUpdate} from 'svelte';
export let math = '';
let container;
let mathJaxScriptLoaded = false;
function renderMath() {if(window.MathJax&&window.MathJax.Hub){if(container){container.innerHTML=math;window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,container]);}}}
function initMathJax() {if(window.MathJax){returnPromise.resolve();}
return new Promise((resolve, reject) =>{constscript=document.createElement('script');script.src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML';script.async=true;script.onload=()=>{window.MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'],['\\(','\\)']],displayMath: [['$$','$$'],['\\[','\\]']],processEscapes: true},TeX: {extensions: ["AMSmath.js","AMSsymbols.js"]},menuSettings: {context: "browser"},});resolve();};script.onerror=(err)=>reject(err);document.head.appendChild(script);});}
onMount(async () =>{if(!mathJaxScriptLoaded){try{awaitinitMathJax();mathJaxScriptLoaded=true;} catch (err) {console.error("MathJax script loading error: ",err);}}renderMath();});afterUpdate(()=>{renderMath();});
</script><divbind:this={container}></div>
I don't know the svelte library, so there could be an interaction with MathJax, but I would be very surprised if what you are experiencing were MathJax's fault. I don't see how that would be the case. Can you say what has lead you to think that MathJax is the culprit?
One thing you might do is to use your browser's console to investigate the DOM tree and see if those elements are actually in the DOM that you are viewing. If not, it may be that svelte is preventing their use in some way.
Also, if you are developing new code, why are you using such an old version of MathJax (the current version is 3.2.2, with 4.0 out in beta release), and even the most current v2 is 2.7.9, not 2.7.7. Why not use a more current version?
Replace the text below with the details of the issue you are facing.
DO NOT simply erase the form and type a free-form response.
Issue Summary
I have a working implementation of MathJax for all my math typsetting needs, but for some reason, some basic HTML tags don't work.
Of note, <b> doesn't work but <strong> does, <i> doesn't work but <em> does, and none of the listing tags are working (<ul>,<ol>,<li>).
Screenshot of the issue
Technical details:
I am using the following MathJax configuration (within Svelte):
and loading MathJax via
The text was updated successfully, but these errors were encountered: