【发布时间】:2020-08-28 06:28:34
【问题描述】:
我在一个项目中使用 mathjax,我一直在尝试更改所有数学的颜色。我正在加载以下配置文件:
window.MathJax = {
jax: ['input/TeX', 'output/HTML-CSS'],
extensions: ['tex2jax.js'],
displayAlign: 'center',
TeX: {
extensions: ['AMSmath.js', 'AMSsymbols.js', 'AMScd.js'],
Macros: {
e: '{\\textrm{e}}',
R: '{\\mathbb{R}}', // this is working!
Z: '{\\mathbb Z}',
KK: '{\\mathbb{K}}'
}
},
tex2jax: {
inlineMath: [
['$', '$'],
['\\(', '\\)']
],
displayMath: [
['$$', '$$'],
['\\[', '\\]']
],
processEscapes: true
},
'HTML-CSS': {
fonts: ['TeX'],
styles: {
scale: 110,
'.MathJax': { padding: '1em 0.1em', color: 'green ! important' }, //Not working
'.MathJax_Display': { 'text-align': 'center' }
}
},
showProcessingMessages: false,
menuSettings: { zoom: 'Double-Click', mpContext: true, mpMouse: true }
}
显然一切正常,但 HTML-CCS:styles 部分不起作用。我找不到合适的参考,我不知道这个版本的 MathJax (2.7.8) 是否使用了不同的格式。 在这个项目中,我使用的是 nuxt 和 vuetify,我不知道这是否是问题所在,但我关闭了 vuetify,但样式仍然没有应用于数学显示。 非常感谢您的帮助, 米尔顿。
【问题讨论】:
标签: css colors configuration styles mathjax