减小公式中的字体大小而不影响行距

减小公式中的字体大小而不影响行距

我需要减小一些方程式的字体大小。我已经找到了同样的问题但评分最高的答案——放在等式\footnotesize之前和之后——显然是不正确的,如以下 MWE 所示:\normalsize

\documentclass{article}
\usepackage[TS1,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\begin{document}

This is text of the first paragraph before the equation with correct
line spacing. This is text of the first paragraph before the equation
with correct line spacing.
\begin{equation}
e^{i\pi} - 1 = 0
\end{equation}
This is text of the first paragraph after the equation with correct
line spacing. This is text of the first paragraph after the equation
with correct line spacing.

This is text of the second paragraph before the equation with wrong
line spacing. This is text of the second paragraph before the
equation with wrong line spacing.
\scriptsize\begin{equation}
e^{i\pi} - 1 = 0
\end{equation}\normalsize
This is text of the second paragraph after the equation with correct
line spacing. This is text of the second paragraph after the equation
with correct line spacing.
\end{document}

问题是,正前方的文本的行距变得太窄。

答案1

您可以使用medsize来自的环境nccmath,它显示约 80% 的公式\displaystyle。此包还定义了\medmath\mfrac, \mbinom, \medop\medint命令。

\documentclass{article}
\usepackage[TS1,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{nccmath}

\begin{document}

This is text of the first paragraph before the equation with correct
line spacing. This is text of the first paragraph before the equation
with correct line spacing.
\begin{equation}
  e^{iπ} - 1 = 0
\end{equation}
This is text of the first paragraph after the equation with correct
line spacing. This is text of the first paragraph after the equation
with correct line spacing.

This is text of the second paragraph before the equation with wrong
line spacing. This is text of the second paragraph before the
equation with wrong line spacing.
{\scriptsize\begin{equation}
  e^{iπ} - 1 = 0
\end{equation}}\normalsize
This is text of the second paragraph after the equation with correct
line spacing. This is text of the second paragraph after the equation
with correct line spacing.

This is text of the third paragraph before the equation with correct
line spacing. This is text of the third paragraph before the
equation with correct line spacing.
\begin{equation}\begin{medsize}
    e^{iπ} - 1 = 0
  \end{medsize}\end{equation}
This is text of the thirdd paragraph after the equation with correct
line spacing. This is text of the third paragraph after the equation
with correct line spacing.
\end{document} 

在此处输入图片描述

相关内容