##// END OF EJS Templates
Improved MathJax, missing callback workaround...
Improved MathJax, missing callback workaround MathJax.InputJax.TeX.resetEquationNumbers is supposed to be available, but isn't consistently loaded before the notebook fires off its first re-render request. The code edits in mathjaxutils.js fix this issue. Additionally, there was some init code in mathjaxutils.js that has been properly excised to the html templates. Removed some orphan rendering code so that all typesetting now goes through mathjaxutils.js Finally, removed an extra cell in the demo notebook.

File last commit:

r8659:9e186f76
r8659:9e186f76
Show More
printnotebook.html
96 lines | 3.7 KiB | text/html | HtmlLexer
{% extends page.html %}
{% block stylesheet %}
{% if mathjax_url %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS", useLabelIds: true } },
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEnvironments: true
},
displayAlign: 'left', // Change this to 'center' to center equations.
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}}
}
});
</script>
<script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script>
{% end %}
<script type="text/javascript">
// MathJax disabled, set as null to distingish from *missing* MathJax,
// where it will be undefined, and should prompt a dialog later.
window.mathjax_url = "{{mathjax_url}}";
</script>
<link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}">
<link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}">
<link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/>
<link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" />
<link rel="stylesheet" href="{{ static_url("css/printnotebook.css") }}" type="text/css" />
<link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" />
{% end %}
{% block params %}
data-project={{project}}
data-base-project-url={{base_project_url}}
data-base-kernel-url={{base_kernel_url}}
data-read-only={{read_only and not logged_in}}
data-notebook-id={{notebook_id}}
{% end %}
{% block header %}
{% end %}
{% block site %}
<div id="main_app">
<div id="notebook_panel">
<div id="notebook"></div>
</div>
</div>
{% end %}
{% block script %}
<script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/xml/xml.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/css/css.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/rst/rst.js") }}" charset="utf-8"></script>
<script src="{{ static_url("codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script>
<script src="{{ static_url("pagedown/Markdown.Converter.js") }}" charset="utf-8"></script>
<script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script>
<script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script>
<script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ static_url("js/printnotebookmain.js") }}" type="text/javascript" charset="utf-8"></script>
{% end %}