- MathJax是什么
- MathJax AsciiMath Support
- 入门指南
- MathJax Output Formats
- Loading MathJax Dynamically
- 安装和测试MathJax
- The MathJax Community
- Modifying Math on the Page
- 加载和配置MathJax
- What’s New in MathJax v2.0
- MathJax API
- Common Configurations
- What’s New in MathJax v1.1
- Describing HTML snippets
- Configuration Objects
- Migrating from MathJax v1.0 to v1.1
- CSS Style Objects
- Using MathJax in popular web platforms
- Converting to MathJax from jsMath
- Glossary
- MathJax TeX and LaTeX Support
- The MathJax Processing Model
- MathJax MathML Support
- The MathJax Startup Sequence
- Synchronizing your code with MathJax
Configuration Objects
The various components of MathJax, including its input and output processors, its preprocessors, its extensions, and the MathJax core, all can be configured through the config/default.js file, or via a MathJax.Hub.Config() call (indeed, if you look closely, you will see that config/default.js is itself one big call to MathJax.Hub.Config()). Anything that is in config/default.js can be included in-line to configure MathJax.
The structure that you pass to MathJax.Hub.Config() is a JavaScript object that includes name:value pairs giving the names of parameters and their values, with pairs separated by commas. Be careful not to include a comma after the last value, however, as some browsers (namely Internet Explorer) will fail to process the configuration if you do.
The MathJax components, like the TeX input processor, have their own sections in the configuration object labeled by the component name, and using an object as its value. That object is itself a configuration object made up of name:value pairs that give the configuration options for the component.
For example,
MathJax.Hub.Config({ showProcessingMessages: false, jax: ["input/TeX", "output/HTML-CSS"], TeX: { TagSide: "left", Macros: { RR: '{\\bf R}', bold: ['{\\bf #1}',1] } } });
is a configuration that includes two settings for the MathJax Hub (one for showProcessingMessages and one for the jax array), and a configuration object for the TeX input processor. The latter includes a setting for the TeX input processor’s TagSide option (to set tags on the left rather than the right) and a setting for Macros, which defines new TeX macros (in this case, two macros, one called \RR that produces a bold “R”, and one called \bold that puts is argument in bold face).
The config/default.js file is another example that shows nearly all the configuration options for all of MathJax’s components.
Configuration Options by Component
The individual options are explained in the following sections, which are categorized by the component they affect.
- The tex2jax preprocessor options
- The mml2jax preprocessor options
- The asciimath2jax preprocessor options
- The jsMath2jax preprocessor options
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论