Show More
@@ -1,36 +1,23 b'' | |||||
1 | {%- macro mathjax() -%} |
|
1 | {%- macro mathjax() -%} | |
|
2 | <!-- Load mathjax --> | |||
|
3 | <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> | |||
2 | <!-- MathJax configuration --> |
|
4 | <!-- MathJax configuration --> | |
3 | <script type="text/x-mathjax-config"> |
|
5 | <script type="text/x-mathjax-config"> | |
4 | MathJax.Hub.Config({ |
|
6 | MathJax.Hub.Config({ | |
5 | tex2jax: { |
|
7 | tex2jax: { | |
6 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], |
|
8 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |
7 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ], |
|
9 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ], | |
8 | processEscapes: true, |
|
10 | processEscapes: true, | |
9 | processEnvironments: true |
|
11 | processEnvironments: true | |
10 | }, |
|
12 | }, | |
11 | // Center justify equations in code and markdown cells. Elsewhere |
|
13 | // Center justify equations in code and markdown cells. Elsewhere | |
12 | // we use CSS to left justify single line equations in code cells. |
|
14 | // we use CSS to left justify single line equations in code cells. | |
13 | displayAlign: 'center', |
|
15 | displayAlign: 'center', | |
14 | "HTML-CSS": { |
|
16 | "HTML-CSS": { | |
15 | styles: {'.MathJax_Display': {"margin": 0}}, |
|
17 | styles: {'.MathJax_Display': {"margin": 0}}, | |
16 | linebreaks: { automatic: true } |
|
18 | linebreaks: { automatic: true } | |
17 | } |
|
19 | } | |
18 | }); |
|
20 | }); | |
19 | </script> |
|
21 | </script> | |
20 | <!-- End of mathjax configuration --> |
|
22 | <!-- End of mathjax configuration --> | |
21 |
|
||||
22 | <script> |
|
|||
23 | // We wait for the onload function to load MathJax after the page is completely loaded. |
|
|||
24 | // MathJax is loaded 1 unit of time after the page is ready. |
|
|||
25 | // This hack prevent problems when you load multiple js files. |
|
|||
26 |
|
||||
27 | window.onload = function () { |
|
|||
28 | setTimeout(function () { |
|
|||
29 | var script = document.createElement("script"); |
|
|||
30 | script.type = "text/javascript"; |
|
|||
31 | script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"; |
|
|||
32 | document.getElementsByTagName("head")[0].appendChild(script); |
|
|||
33 | },1) |
|
|||
34 | } |
|
|||
35 | </script> |
|
|||
36 | {%- endmacro %} No newline at end of file |
|
23 | {%- endmacro %} |
General Comments 0
You need to be logged in to leave comments.
Login now