原 文:Display style in math mode
译 者:Xovee
翻译时间:2020年8月29日
Display style in math mode
LaTeX 文档中的数学符号并不总是一成不变的,有些符号的样式会随着它们所在的环境而改变:例如,它们是在文本中出现,或者是在一个公式的环境中出现。本篇文章介绍如何调整展示样式。
介绍
让我们看一个例子:
Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge.
\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \]
在这个例子里,公式的上下标、以及分式的样式,在不同的环境中是不一样的。
设置数学样式
数学样式可以被显式地设置。例如,如果你希望在公式环境中展示行内样式的公式,你可以使用\displaystyle
命令。你还可以使用一些与数学样式有关的命令来改变文字的大小。
In-line maths elements can be set with a different style: \(f(x) = \displaystyle \frac{1}{1+x}\). The same is true the other way around:
\begin{eqnarray*}
\begin{eqnarray*}
f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x}
\end{eqnarray*}
\end{eqnarray*}
延伸阅读
更多信息请见: