
如何單獨更改兩個方程式的字體大小?
\begin{eqnarray}
\begin{split}
% Change the font size
r_j &= 2 \\
&\quad + 4
\end{split}
\\
% Change the font size
r_j = 2 + 4
\end{eqnarray}
我嘗試 \scalebox 但出現一些錯誤。我嘗試:
\begin{eqnarray}
\scalebox{.95}{
\begin{split}
r_j &= 2 \\
&\quad + 4
\end{split}
}
\\
\scalebox{.95}{
r_j = 2 + 4}
\end{eqnarray}
答案1
一些評論
預設情況下,第二個參數
\scalebox
處於文字模式。要將其視為數學材料,您需要用$
符號包圍數學材料。split
規模盒內不能有環境。然而,aligned
環境是有效的。環境
eqnarray
是嚴重棄用。不要使用它!相反,請使用align
或gather
。在下面的程式碼中,我使用了一個gather
環境,因為在基於 - 的範例中似乎沒有執行對齊eqnarray
。
\documentclass{article}
\usepackage{amsmath} % for "gather" and "aligned" environments
\usepackage{graphicx} % for "\scalebox" macro
\begin{document}
\begin{gather}
\scalebox{1.33}{$
\begin{aligned}
r_j &= 2 \\
&\quad + 4
\end{aligned}$} \\
\scalebox{.75}{$
r_j = 2 + 4$}
\end{gather}
\end{document}