设计MathJax [英] Styling MathJax
问题描述
我对此很困惑。我搜索了教程,但找不到对我来说很有意义的任何内容,我如何为MathJax输出设置一个CSS类?我只是想让字体变大。目前包括:
I'm so confused about this. I've searched for tutorials but can't find any that make much sense to me, how do I set a CSS class for MathJax output? I just want to make the font big. The current include is:
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
在我的页面底部。渲染TEX很好,但我想设置一些CSS!
At the bottom of my page. Renders TEX fine, but I'd like to set some CSS on it!
理想情况下,我想传递一个CSS类名称给它。
Ideally I'd like to pass a CSS class name to it.
推荐答案
您是否尝试在输出处理器中设置比例
选项?请参阅手册。您可以将配置选项设置为文件或内联; 此页面涵盖了此过程。
Have you tried setting the scale
option in your output processor? See the manual. You can set the configuration options either in a file or inline; this page covers the process.
基本上,您在页面中或在包含的文件中包含一小段JavaScript代码。示例:
Basically, you include a short snippet of JavaScript in your page, or in a file you include. Example:
<script type="text/javascript">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
"HTML-CSS": { scale: 100}
});
</script>
另外,您可以简单地将 div
应用了一个CSS类。在此页面上查看源代码。
Also, you can simply surround the thing in a div
with a CSS class applied. View the source on this page.
<div style="font-size: 500%;">
\[
g\frac{d^2u}{dx^2} + L\sin u = 0
\]
</div>
该公式只会继承字体大小。
The equation will simply inherit the font size.
这篇关于设计MathJax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!