
考慮以下 MWE:
\documentclass[10pt]{report}
\usepackage{relsize}
\DeclareMathSizes{10}{28}{26}{25} % For size 10 text
\begin{document}\relscale{1.7}
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\end{document}
我嘗試在使用relsize
package.json 時增加數學字體大小。當我不使用relsize
包包時,\DeclareMathSizes
就是工作。但是當我使用\relscale
package時,\DeclareMathSizes
不適用?
如果有人能描述如何在使用relsize
.
答案1
\documentclass[10pt]{report}
\usepackage{relsize}
\DeclareMathSizes{10}{28}{26}{25} % For size 10 text
\begin{document}
aaa
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\relscale{1.7}
bbb
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\end{document}
生產
因為您已經為 10pt 文字字體聲明了大數學字體,但對於您透過選擇的非標準 17pt 字體大小沒有聲明任何內容relscale
您可以將大字體定義為 17pt,但由於您使用的是預設的 cm 字體,因此 17pt 會替換為 17.28pt,因此您需要聲明該大小的數學字體:
\documentclass[10pt]{report}
\usepackage{relsize}
\DeclareMathSizes{17.28}{28}{26}{25} % For size 17.28 text
\begin{document}
aaa
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\relscale{1.7}
bbb
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\end{document}
生產
relsize
請注意,透過使用標準命令,您可以在不使用套件的情況下獲得相同的輸出\LARGE
:
\documentclass[10pt]{report}
\DeclareMathSizes{17.28}{28}{26}{25} % For size 17.28 text
\begin{document}
aaa
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\LARGE
bbb
\begin{equation}
S = \frac{A}{B^2}
\end{equation}
\end{document}