|
|
@@ -88,49 +88,7 @@ function mount () {
|
|
|
$('body').classList.add('_toc-left')
|
|
|
}
|
|
|
if (state.content.mathjax) {
|
|
|
- dom.push(m('script', {type: 'text/x-mathjax-config',}, `
|
|
|
- // TeX-AMS_HTML
|
|
|
- MathJax.Hub.Config({
|
|
|
- jax: [
|
|
|
- 'input/TeX',
|
|
|
- 'output/HTML-CSS',
|
|
|
- 'output/PreviewHTML',
|
|
|
- ],
|
|
|
- extensions: [
|
|
|
- 'tex2jax.js',
|
|
|
- 'AssistiveMML.js',
|
|
|
- 'a11y/accessibility-menu.js',
|
|
|
- ],
|
|
|
- TeX: {
|
|
|
- extensions: [
|
|
|
- 'AMSmath.js',
|
|
|
- 'AMSsymbols.js',
|
|
|
- 'noErrors.js',
|
|
|
- 'noUndefined.js',
|
|
|
- ]
|
|
|
- },
|
|
|
- tex2jax: {
|
|
|
- inlineMath: [
|
|
|
- ['$', '$'],
|
|
|
- ['\\\\(', '\\\\)'],
|
|
|
- ],
|
|
|
- displayMath: [
|
|
|
- ['$$', '$$'],
|
|
|
- ['\\\\[', '\\\\]'],
|
|
|
- ],
|
|
|
- processEscapes: true
|
|
|
- },
|
|
|
- showMathMenu: false,
|
|
|
- showProcessingMessages: false,
|
|
|
- messageStyle: 'none',
|
|
|
- skipStartupTypeset: true, // disable initial rendering
|
|
|
- positionToHash: false
|
|
|
- })
|
|
|
- // set specific container to render, can be delayed too
|
|
|
- MathJax.Hub.Queue(
|
|
|
- ['Typeset', MathJax.Hub, '_html']
|
|
|
- )
|
|
|
- `))
|
|
|
+ dom.push(m('script', {type: 'text/x-mathjax-config'}, mathjax))
|
|
|
dom.push(m('script', {
|
|
|
src: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js'
|
|
|
}))
|
|
|
@@ -267,3 +225,47 @@ if (state.content.autoreload) {
|
|
|
state.interval = setInterval(get, state.ms)
|
|
|
})()
|
|
|
}
|
|
|
+
|
|
|
+var mathjax = `
|
|
|
+ // TeX-AMS_HTML
|
|
|
+ MathJax.Hub.Config({
|
|
|
+ jax: [
|
|
|
+ 'input/TeX',
|
|
|
+ 'output/HTML-CSS',
|
|
|
+ 'output/PreviewHTML',
|
|
|
+ ],
|
|
|
+ extensions: [
|
|
|
+ 'tex2jax.js',
|
|
|
+ 'AssistiveMML.js',
|
|
|
+ 'a11y/accessibility-menu.js',
|
|
|
+ ],
|
|
|
+ TeX: {
|
|
|
+ extensions: [
|
|
|
+ 'AMSmath.js',
|
|
|
+ 'AMSsymbols.js',
|
|
|
+ 'noErrors.js',
|
|
|
+ 'noUndefined.js',
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ tex2jax: {
|
|
|
+ inlineMath: [
|
|
|
+ ['$', '$'],
|
|
|
+ ['\\\\(', '\\\\)'],
|
|
|
+ ],
|
|
|
+ displayMath: [
|
|
|
+ ['$$', '$$'],
|
|
|
+ ['\\\\[', '\\\\]'],
|
|
|
+ ],
|
|
|
+ processEscapes: true
|
|
|
+ },
|
|
|
+ showMathMenu: false,
|
|
|
+ showProcessingMessages: false,
|
|
|
+ messageStyle: 'none',
|
|
|
+ skipStartupTypeset: true, // disable initial rendering
|
|
|
+ positionToHash: false
|
|
|
+ })
|
|
|
+ // set specific container to render, can be delayed too
|
|
|
+ MathJax.Hub.Queue(
|
|
|
+ ['Typeset', MathJax.Hub, '_html']
|
|
|
+ )
|
|
|
+`
|