以较小的字体在段落中设置单个方程式

以较小的字体在段落中设置单个方程式

我正在尝试找出使单个方程式稍微小一点的最佳方法。当然,我可以尝试将方程式分解成几个部分,然后按照这种方式进行,但我想了解完成这项任务的最佳方法。问题如下:

\documentclass{article}
\begin{document}
Here is a bunch of text that I'm writing for no good reason. 
The overall purpose is to demonstrate how to make an equation 
set in a different font size from the surrounding paragraph
without messing up the spacing, like we do here:
{\footnotesize \[ f(x) = g(x) \] }
with an equation set as \verb#{ \footnotesize \[  f(x) = g(x) \]}#
\end{document}

我认为这会导致段落看起来非常扭曲,因为 \footnotesize 命令改变了基线。

我该如何避免这种情况?

答案1

使用数学字体大小命令\scriptstyle\scriptscriptstyle

\documentclass{article}
\begin{document}
Here is a bunch of text that I'm writing for no good reason. The overall
purpose is to demonstrate how to make an equation set in a different font size
from the surrounding paragraph without messing up the spacing, like we do here:
 \[\scriptstyle f(x) = g(x) \]  with an equation set as
\verb#{\footnotesize \[  f(x) = g(x) \]}#
\end{document}

答案2

对于没有一个的单个方程式可以用

\[
\mbox{\small$\displaystyle
long equation
$}
\]

答案3

这可能有用(但看起来仍然很奇怪)

\documentclass{article}
\parskip2\baselineskip

\begin{document}
\showoutput
Here is a bunch of text that I'm writing for no good reason. 
The overall purpose is to demonstrate how to make an equation 
set in a different font size from the surrounding paragraph
without messing up the spacing, like we do here:
\par\nobreak{\parskip0pt \footnotesize \noindent\[ f(x) = g(x) \]}%
with an equation set as \verb#{ \footnotesize \[  f(x) = g(x) \]}#

\end{document}

答案4

与其改变字体大小,不如考虑使用包\scalebox中的graphicx缩放因子。在这个例子中,缩放因子非常小,以证明基线间距没有被搞乱。然而,除非你真的必须的是,缩小显示屏比重新制定显示屏(例如,使用更多行)以便于阅读要差得多。

\documentclass{article}
\usepackage{graphicx}
\begin{document}
Here is a bunch of text that I'm writing for no good reason. 
The overall purpose is to demonstrate how to make an equation 
set in a different font size from the surrounding paragraph
without messing up the spacing, like we do here:
\[ \scalebox{.3}{$\displaystyle f(x) = g(x)$} \]
with an equation set as \verb#\[ \scalebox{.3}{$\displaystyle f(x) = g(x)$} \]#
\end{document}

重新缩放显示的文本

相关内容