@@ -136,21 +136,31 @@ <h1 class="title">{{ page.title }}</h1>
136136
137137 <!-- MathJax Section -->
138138 < script type ="text/x-mathjax-config ">
139- MathJax . Hub . Config ( {
139+ MathJax . Hub . Config ( {
140140 TeX : { equationNumbers : { autoNumber : "AMS" } }
141- } ) ;
142- </ script >
143- < script type ="text/javascript "
144- src ="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML "> </ script >
141+ } ) ;
142+ </ script >
145143 < script >
146- MathJax . Hub . Config ( {
147- tex2jax : {
148- inlineMath : [ [ "$" , "$" ] , [ "\\\\(" , "\\\\)" ] ] ,
149- displayMath : [ [ "$$" , "$$" ] , [ "\\[" , "\\]" ] ] ,
150- processEscapes : true ,
151- skipTags : [ 'script' , 'noscript' , 'style' , 'textarea' , 'pre' ]
152- }
153- } ) ;
144+ // Note that we load MathJax this way to work with local file (file://), HTTP and HTTPS.
145+ // We could use "//cdn.mathjax...", but that won't support "file://".
146+ ( function ( d , script ) {
147+ script = d . createElement ( 'script' ) ;
148+ script . type = 'text/javascript' ;
149+ script . async = true ;
150+ script . onload = function ( ) {
151+ MathJax . Hub . Config ( {
152+ tex2jax : {
153+ inlineMath : [ [ "$" , "$" ] , [ "\\\\(" , "\\\\)" ] ] ,
154+ displayMath : [ [ "$$" , "$$" ] , [ "\\[" , "\\]" ] ] ,
155+ processEscapes : true ,
156+ skipTags : [ 'script' , 'noscript' , 'style' , 'textarea' , 'pre' ]
157+ }
158+ } ) ;
159+ } ;
160+ script . src = ( 'https:' == document . location . protocol ? 'https://' : 'http://' ) +
161+ 'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ;
162+ d . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( script ) ;
163+ } ( document ) ) ;
154164 </ script >
155165 </ body >
156166</ html >
0 commit comments