refactor: Pre-render TeX + MathML server-side to SVG
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
/* global $ */
|
||||
|
||||
import MathJax from 'mathjax'
|
||||
|
||||
export default {
|
||||
name: 'content-view',
|
||||
data() {
|
||||
@@ -19,23 +17,5 @@ export default {
|
||||
return false
|
||||
})
|
||||
})
|
||||
MathJax.Hub.Config({
|
||||
jax: ['input/TeX', 'input/MathML', 'output/SVG'],
|
||||
extensions: ['tex2jax.js', 'mml2jax.js'],
|
||||
TeX: {
|
||||
extensions: ['AMSmath.js', 'AMSsymbols.js', 'noErrors.js', 'noUndefined.js']
|
||||
},
|
||||
SVG: {
|
||||
scale: 120,
|
||||
font: 'STIX-Web'
|
||||
},
|
||||
tex2jax: {
|
||||
preview: 'none'
|
||||
},
|
||||
showMathMenu: false,
|
||||
showProcessingMessages: false,
|
||||
messageStyle: 'none'
|
||||
})
|
||||
MathJax.Hub.Configured()
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
/* global siteRoot */
|
||||
|
||||
export default {
|
||||
name: 'source-view',
|
||||
data() {
|
||||
@@ -7,7 +9,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
let self = this
|
||||
FuseBox.import('/js/ace/ace.js', (ace) => {
|
||||
FuseBox.import(siteRoot + '/js/ace/ace.js', (ace) => {
|
||||
let scEditor = ace.edit('source-display')
|
||||
scEditor.setTheme('ace/theme/dawn')
|
||||
scEditor.getSession().setMode('ace/mode/markdown')
|
||||
|
Reference in New Issue
Block a user