Improve mathjax integration
This commit is contained in:
parent
51fcdf9f94
commit
b8d51191ab
|
@ -106,7 +106,7 @@ class File:
|
||||||
|
|
||||||
# self.content = markdowner.convert(f.read())
|
# self.content = markdowner.convert(f.read())
|
||||||
|
|
||||||
self.content = subprocess.check_output(['pandoc', '-f', 'latex', '-t', 'html',
|
self.content = subprocess.check_output(['pandoc', '--mathjax=templates/mathjax/es5/tex-mml-chtml.js', '-f', 'latex', '-t', 'html',
|
||||||
'%s/%s' % (root, name)]).decode()
|
'%s/%s' % (root, name)]).decode()
|
||||||
|
|
||||||
def expand_html(self):
|
def expand_html(self):
|
||||||
|
|
|
@ -6,13 +6,9 @@
|
||||||
<link rel="stylesheet" href="${root}stylesheet.css"/>
|
<link rel="stylesheet" href="${root}stylesheet.css"/>
|
||||||
<script>
|
<script>
|
||||||
window.MathJax = {
|
window.MathJax = {
|
||||||
tex: {
|
|
||||||
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
|
||||||
},
|
|
||||||
options: {
|
options: {
|
||||||
enableMenu: false,
|
enableMenu: false,
|
||||||
enableEnrichment: false,
|
enableEnrichment: false
|
||||||
makeCollapsible: false
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue