CommonHTML输出处理器选项
下面的选项控制 CommonHTML output processor 当你包括 'output/chtml'
在 load
数组 loader
块,或者加载包含CommonHTML输出JAX的组合组件。它们与默认值一起列出。要设置这些选项中的任何一个,请包括 chtml
在你的章节 MathJax
全局对象。
配置块
MathJax = {
chtml: {
scale: 1, // global scaling factor for all expressions
minScale: .5, // smallest scaling factor to use
mtextInheritFont: false, // true to make mtext elements use surrounding font
merrorInheritFont: true, // true to make merror text use surrounding font
mathmlSpacing: false, // true for MathML spacing rules, false for TeX rules
skipAttributes: {}, // RFDa and other attributes NOT to copy to the output
exFactor: .5, // default size of ex in em units
displayAlign: 'center', // default for indentalign when set to 'auto'
displayIndent: '0', // default for indentshift when set to 'auto'
matchFontHeight: true, // true to match ex-height of surrounding font
fontURL: '[mathjax]/components/output/chtml/fonts/woff-v2', // The URL where the fonts are found
adaptiveCSS: true // true means only produce CSS that is used in the processed equations
}
};
选项说明
- matchFontHeight: true
此设置控制MathJax是否缩放数学,以使数学字体的EX高度与周围字体的EX高度匹配。这可以使数学运算更好地匹配周围环境,但是如果周围的字体没有正确设置其ex高度(并不是所有字体都正确设置),则可能会导致数学运算 not 匹配周围的文本。虽然这将使小写字母与周围的字体匹配,但大写字母可能不匹配(这将要求周围文本中的字体高度和ex高度与数学字体中的比例相同,这是不太可能的)。
- fontURL: '[mathjax]/components/output/chtml/fonts/woff-v2'
这是存储mathjax字体的位置的url。在默认情况下,
[mathjax]
替换为从中加载mathjax的位置。你应该包括一个完整的url到你想要使用的字体的位置。
- adaptiveCSS: true
此设置控制commonhtml输出jax如何处理它生成的css样式。如果为true,则意味着只生成迄今为止在页面上处理过的数学所需的css。如果为false,则生成mathjax字体中所有元素和所有字符所需的css。这是一个非常庞大的css,它可以对页面的性能产生影响,所以最好将其保留为
true
. 您可以使用命令重置关于需要什么css的信息MathJax.startup.document.output.clearCache();
清除字体缓存。
其余选项在 所有输出处理器通用的选项 部分。