327d6c695104 — Joe Ulfers 5 years ago
Make math display again
4 files changed, 21 insertions(+), 3 deletions(-)

M _static/default.css
M _templates/layout.html
M conf.py
M readme.md
M _static/default.css +1 -1
@@ 110,4 110,4 @@ iframe.model {
     width: 100%;
     border: none;
     height: 1000px;
-}
  No newline at end of file
+}

          
M _templates/layout.html +12 -0
@@ 1,5 1,9 @@ 
 {% extends "basic/layout.html" %}
 
+{% set script_files = script_files + [
+    '/_static/js/classify.js',
+    '/_static/js/lib/ASCIIMathML.js' ] %}
+
 {# Remove base theme navigation, top and bottom #}
 {% block relbar1 %}{% endblock %}
 {% block relbar2 %}{% endblock %}

          
@@ 21,5 25,13 @@ 
     <a href="index.html">Home</a>
     <a href="https://bitbucket.org/julfers/revolvingdoorhoax">Source code</a>
     <small>Copyright 2017, WTFPL</small>
+
+    <script>
+    $('code.docutils.literal').each(function () {
+        // This whackiness removes the spans that docutils puts in inline code literals so that
+        // ascii math/mathjax can parse them.
+        this.textContent = this.textContent
+    })
+    </script>
 </footer>
 {% endblock %}
  No newline at end of file

          
M conf.py +2 -1
@@ 30,7 30,7 @@ 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
-extensions = ['sphinx.ext.mathjax']
+extensions = []
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']

          
@@ 72,6 72,7 @@ exclude_patterns = ['_build', 'Thumbs.db
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
+highlight_language = 'text'
 
 # If true, `todo` and `todoList` produce output, else they produce nothing.
 todo_include_todos = False

          
M readme.md +6 -1
@@ 25,8 25,12 @@ Depends on:
 * [Arduino IDE], to upload Arduino software. Alternatively, [Ino] may do the trick, but I haven't
     tested with it.
 * [Adafruit Motor Shield V2 library], to control the stepper motor
-* [Skulpt] to run the in-browser model
+
+Dependencies bundled with this project. Note they have their own licenses:
+
 * [jQuery]
+* [Skulpt]
+* [AsciiMathML]
 
 ## Build the site ##
 

          
@@ 45,3 49,4 @@ make clean html
 [Adafruit Motor Shield V2 library]: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/library-reference
 [jQuery]: http://jquery.com/
 [Skulpt]: http://www.skulpt.org/
+[AsciiMathML]: http://asciimath.org/