Commit 1e08164d by Bridger Maxwell

Added MathJax to wiki pages.

parent 0598a471
##
## mako
## File: templates/mathjax_include.html
##
## Advanced mathjax using 2.0-latest CDN for Dynamic Math
##
## This enables ASCIIMathJAX, and is used by js_textbox
%if mathjax_mode is not Undefined and mathjax_mode == 'wiki':
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [ ['$','$'], ["\\(","\\)"]],
displayMath: [ ['$$','$$'], ["\\[","\\]"]]}
});
</script>
%else:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
......@@ -19,6 +28,7 @@
}
});
</script>
%endif
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
......
......@@ -120,6 +120,9 @@ MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates',
# still left lying around.
TEMPLATE_DIRS = (
PROJECT_ROOT / "templates",
COMMON_ROOT / 'templates',
COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates',
COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates',
)
TEMPLATE_CONTEXT_PROCESSORS = (
......
......@@ -17,7 +17,7 @@
<body class="{% block bodyclass %}{% endblock %}">
{% include "navigation.html" %}
<section class="content-wrapper">
{% block body %}{% endblock %}
......
......@@ -5,9 +5,6 @@
{% block headextra %}
{% compressed_css 'course' %}
<script src="{% static 'js/bootstrap-alert.js' %}"></script>
<script src="{% static 'js/bootstrap-collapse.js' %}"></script>
<script src="{% static 'js/bootstrap-modal.js' %}"></script>
<script type="text/javascript">
function ajaxError(){}
......@@ -30,6 +27,21 @@
});
}
</script>
{% addtoblock 'js' %}
{% comment %} These scripts load at the bottom of the body {% endcomment %}
<script src="{% static 'js/bootstrap-alert.js' %}"></script>
<script src="{% static 'js/bootstrap-collapse.js' %}"></script>
<script src="{% static 'js/bootstrap-modal.js' %}"></script>
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
{% endaddtoblock %}
{% endblock %}
......
......@@ -31,6 +31,11 @@
{% compressed_js 'application' %}
{% compressed_js 'module-js' %}
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
</body>
</html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment