Quellcode durchsuchen

fix mathjax script

Jake Vanderplas vor 11 Jahren
Ursprung
Commit
9e416a73b2
1 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen
  1. 3 4
      liquid_tags/notebook.py

+ 3 - 4
liquid_tags/notebook.py

@@ -74,7 +74,7 @@ from jinja2 import DictLoader
 #  IPython/nbconvert/templates/fullhtml.tpl, while some are custom tags
 #  IPython/nbconvert/templates/fullhtml.tpl, while some are custom tags
 #  specifically designed to make the results look good within the
 #  specifically designed to make the results look good within the
 #  pelican-octopress theme.
 #  pelican-octopress theme.
-JS_INCLUDE = """
+JS_INCLUDE = r"""
 <style type="text/css">
 <style type="text/css">
 /* Overrides of notebook CSS for static HTML export */
 /* Overrides of notebook CSS for static HTML export */
 div.entry-content {
 div.entry-content {
@@ -109,15 +109,14 @@ img.anim_icon{padding:0; border:0; vertical-align:middle; -webkit-box-shadow:non
 </style>
 </style>
 
 
 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
-
 <script type="text/javascript">
 <script type="text/javascript">
 init_mathjax = function() {
 init_mathjax = function() {
     if (window.MathJax) {
     if (window.MathJax) {
         // MathJax loaded
         // MathJax loaded
         MathJax.Hub.Config({
         MathJax.Hub.Config({
             tex2jax: {
             tex2jax: {
-                inlineMath: [ ['$','$'] ],
-                displayMath: [ ['$$','$$'] ]
+                inlineMath: [ ['$','$'], ["\\(","\\)"] ],
+                displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
             },
             },
             displayAlign: 'left', // Change this to 'center' to center equations.
             displayAlign: 'left', // Change this to 'center' to center equations.
             "HTML-CSS": {
             "HTML-CSS": {