我在HTML页面中使用了mathjax,它可以工作。但存在与fontsize相关的问题。
<html>
<head>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<title> mathsjax</title>
</head>
<body>
\(x={72^2-{\sqrt{53^2}}\over 25}\)
$$x={72^2-{\sqrt{53^2}}\over 25}$$
</body>
</html>
为什么在第一种语法[(x = {72 ^ 2 - {\ sqrt {53 ^ 2}} \ over 25})]中,fontsize非常小。以及如何增加其规模。
另外,两种语法的区别是什么
\(x={72^2-{\sqrt{53^2}}\over 25}\)
......... 1
$$x={72^2-{\sqrt{53^2}}\over 25}$$
......... 2
答案 0 :(得分:0)
您应该使用\(
进行内联数学运算,将\[
用作$$
的等效数据。
<html>
<head>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<title> mathsjax</title>
</head>
<body>
This is part of the line: \(x={72^2-{\sqrt{53^2}}\over 25}\). Those are not:
\[x={72^2-{\sqrt{53^2}}\over 25}\]
$$x={72^2-{\sqrt{53^2}}\over 25}$$
</body>
</html>
修改强>
如果还不够,您还可以添加\large
或\huge
。
在他的评论OP中他说他正在使用sleep(),我想是数学公式小工具。您可以在页面链接中找到该窗口小部件的演示,并修改其源代码,添加以下代码:
<p><span class="math-tex">\( x={72^2-{\sqrt{53^2}}\over 25}\)</span></p>
<p><span class="math-tex">\[ x={72^2-{\sqrt{53^2}}\over 25}\]</span></p>
<p><span class="math-tex">\[ \large { x={72^2-{\sqrt{53^2}}\over 25} } \]</span></p>
<p><span class="math-tex">\[ \huge { x={72^2-{\sqrt{53^2}}\over 25} } \]</span></p>
这应该是结果:
答案 1 :(得分:0)
您可以使用{\displaystyle{...}}
强制表达式或子表达式使用将用于显示的等式的大小和间距。特别是对于分数,如果您加载了AMSmath扩展名,则可以使用\dfrac{}{}
代替\frac{}{}
来获取显示样式的分数。