You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
881 B

  1. 'use strict'
  2. import $ from 'jquery'
  3. import MathJax from 'mathjax'
  4. module.exports = (alerts) => {
  5. if ($('#page-type-view').length) {
  6. let currentBasePath = ($('#page-type-view').data('entrypath') !== 'home') ? $('#page-type-view').data('entrypath') : ''
  7. // MathJax Render
  8. MathJax.Hub.Config({
  9. jax: ['input/TeX', 'input/MathML', 'output/SVG'],
  10. extensions: ['tex2jax.js', 'mml2jax.js'],
  11. TeX: {
  12. extensions: ['AMSmath.js', 'AMSsymbols.js', 'noErrors.js', 'noUndefined.js']
  13. },
  14. SVG: {
  15. scale: 120,
  16. font: 'STIX-Web'
  17. },
  18. tex2jax: {
  19. preview: 'none'
  20. },
  21. showMathMenu: false,
  22. showProcessingMessages: false,
  23. messageStyle: 'none'
  24. })
  25. MathJax.Hub.Configured()
  26. require('../modals/create.js')(currentBasePath)
  27. require('../modals/move.js')(currentBasePath, alerts)
  28. }
  29. }