mathjax.js 635 B

12345678910111213141516171819202122232425262728
  1. // mathJax全局配置文件
  2. window.MathJax = {
  3. loader: { load: ['[tex]/ams', '[tex]/physics'] },
  4. tex: {
  5. inlineMath: [
  6. ['$', '$'],
  7. ['(', ')'],
  8. ], // 行内公式选择符
  9. displayMath: [
  10. ['$$', '$$'],
  11. ['[', ']'],
  12. ], // 段内公式选择符
  13. // 增加 physics 宏包
  14. packages: { '[+]': ['ams', 'physics'] },
  15. },
  16. // 使用 chtml 渲染器
  17. chtml: {
  18. displayAlign: 'center', // 左对齐
  19. displayIndent: '0', // 不缩进
  20. scale: 1, // 缩放比例
  21. exFactor: 2, // 行高因子
  22. },
  23. startup: {
  24. ready() {
  25. window.MathJax.startup.defaultReady();
  26. },
  27. },
  28. };