Two scripts are connected to the document page on Blogger. In the <head> :

 <script type ='text/x-mathjax-config'> MathJax.Hub.Config({ tex2jax: {inlineMath: [[&#39;$&#39;,&#39;$&#39;], [&#39;\\(&#39;,&#39;\\)&#39;]]} }); </script> <script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' type='text/javascript'> </script> 

This script is responsible for drawing mathematical formulas.
The following script is responsible for displaying diagrams. It is contained on some pages in the message display box.

 <script src="https://www.draw.io/embed2.js?s=flowchart&amp;" type="text/javascript"></script> 

At the moment, on pages where both scripts are used, the first one from the <head> block is ignored and only the second one is executed. It is necessary that these two scripts be executed on the page. And correctly displayed content using both of these scripts on the same page.

The following errors appear in the browser console:

 Uncaught TypeError: Cannot read property 'Startup' of undefined at Object.StartupHook (MathJax.js:19) at Object.loadComplete (MathJax.js:19) at Function.execute (MathJax.js:19) at cb (MathJax.js:19) Uncaught TypeError: Cannot read property 'MathEvents' of undefined at TeX-AMS-MML_HTMLorMML.js?V=2.7.0:55 at Function.execute (MathJax.js:19) at cb (MathJax.js:19) at Object.Execute (MathJax.js:19) at Object.ExecuteHooks (MathJax.js:19) at Function.execute (MathJax.js:19) at cb (MathJax.js:19) at Object.Execute (MathJax.js:19) at Object.Post (MathJax.js:19) at Function.execute (MathJax.js:19) 
  • In your question, I see three script ad tags, it’s not clear where the second one is and what is being ignored .. - programmer403
  • Ignored is the one in the head tag - Argetto
  • docs.mathjax.org/en/latest/start.html#tex-and-latex-input - in the Premier documentation, the script is connected using the async attribute. Try it. - YozhEzhi

1 answer 1

After reviewing browser errors, you can see that they are related to the simultaneous execution of drawing schemes. Those. MathJax tries to read the entire code of the page, including the not fully loaded scheme. In this regard, there are errors parsing script MathJax. To avoid this, we add the following code at the end of the template </body> :

 <script> setTimeout(function() { var script = document.createElement('script'); script.src = 'https://www.draw.io/embed2.js?s=flowchart&amp;'; script.type = 'text/javascript'; document.head.appendChild(script); }, 2000); </script> 

This will allow execution after the MathJax script. The very drawing of the scheme will occur only on those pages where it is present. And this will allow avoiding duplication of the schematic drawing code on all pages.