Added CJK support + MathJax display

This commit is contained in:
NGPixel
2017-04-14 14:15:11 -04:00
parent 8daa772c61
commit fe313baf67
13 changed files with 141 additions and 35 deletions

View File

@@ -1,11 +1,27 @@
'use strict'
import $ from 'jquery'
import MathJax from 'mathjax'
module.exports = (alerts) => {
if ($('#page-type-view').length) {
let currentBasePath = ($('#page-type-view').data('entrypath') !== 'home') ? $('#page-type-view').data('entrypath') : ''
// MathJax Render
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'
},
showMathMenu: false
})
require('../modals/create.js')(currentBasePath)
require('../modals/move.js')(currentBasePath, alerts)
}