在不影响方程的标签和其他值的情况下调整方程大小的最佳方法是什么?

在不影响方程的标签和其他值的情况下调整方程大小的最佳方法是什么?

有时,在我的排版工作中,我需要调整一些方程的大小,如示例中所示(这只是为了解释目的):

\documentclass[11pt]{article}
\pagestyle{empty}

\usepackage{blindtext}

\renewcommand{\baselinestretch}{1.1}

\begin{document}
\flushbottom
\section{Section}
\blindtext\footnote{Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}\end{equation}}
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
\blindtext
{\small\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}\relax


\end{document}

在此处输入图片描述

我想知道是否有解决方案:

  1. 不会影响已调整大小的方程的标签,如示例中的方程 (3)。我需要的是默认大小。
  2. 不影响脚注方程式标签。(这在示例中没有发生,但在我尝试的一些解决方案中发生了。)
  3. 不会影响baselinestretch调整大小后的公式之前最后一段的行(如示例中所示)
  4. 确实可以防止在调整大小的方程式和相应段落之间出现分页符。
  5. 适用于多线对齐环境(align、alignat)。

编辑。我一般采用的解决办法是:

\documentclass[11pt]{article}
\pagestyle{empty}

\usepackage{blindtext}

\renewcommand{\baselinestretch}{1.1}

\usepackage{mathtools}
\newtagform{normal}[\normalsize]{\normalsize (}{)}
\newtagform{footnotesize}[\footnotesize]{\footnotesize (}{)}
\usetagform{normal}

\begin{document}
\flushbottom
\section{Section}
\blindtext\footnote{\usetagform{footnotesize}Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}\end{equation}}
\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
\blindtext
\par\vskip -\baselineskip
{\small\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}\relax    

\end{document}

在此处输入图片描述

但它不能防止公式和相应段落之间的分页符。我也在寻找更简单、更快捷的方法。

注1.我知道我可以减少数学运算符的空间(例如以更简单的方式 \!+\!)但我确实需要一个通用的解决方案来“调整大小”除标签之外的数学环境的整个内容。

笔记2。如果我的英语和技术术语有误或不易理解,请随时纠正。

答案1

如果您正在使用amsmath,您可以重新定义\maketag@@@以保持“正常”大小。

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\def\newmaketag{%
  \def\maketag@@@##1{\hbox{\m@th\normalfont\normalsize##1}}%
  }
\makeatother

\begin{document}
Ordinary display:
\begin{equation}
a + b + c = d
\end{equation}

Small numbered display:
\begin{small}
\begin{equation}
a + b + c = d
\end{equation}
\end{small}

\newmaketag
Small numbered display with redefined tag:
\begin{small}
\begin{equation}
a + b + c = d
\end{equation}
\end{small}
\end{document}

示例代码的输出

这将适用于任何amsmath多行显示环境,在每一行提供全尺寸方程式数字。

如果“缩小”显示上方的文本有多行,基线将受到影响;这需要一些额外的注意,但我现在没有时间解决这个问题;我会试着回过头来解决这个问题。

答案2

作为排版员,你的手非常受限......除了在 MWE 中尝试使用较小的字体之外,我只想到了两件事: - 将运算符括+在花括号中,即:({+}作为此等式的例外) - 将方程式溢出到外边框

两种情况均显示在下面的 MWE 中:

\documentclass[11pt]{article}
\usepackage[strict]{changepage}

\usepackage{blindtext}
\renewcommand{\baselinestretch}{1.1}

\begin{document}
\pagestyle{empty}
\flushbottom
\section{Section}
\blindtext\footnote{Equation:
\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
\end{equation}}
    \begin{adjustwidth*}{}{-4em}
\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
\end{equation}
    \end{adjustwidth*}
or with smaller font in equation
   {\small\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
    \end{equation}}
or shortly (as pointed in comments below answer)%
    \footnote{Equation
\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
        }:
    \begin{adjustwidth*}{}{-4em}
\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
    \end{adjustwidth*}
or with smaller font in equation
{\small\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
    \end{equation}}

\end{document}

我说不出哪个更合适。也许你应该问作者,他/她重写了这个方程式并向他展示了这个测试的结果 :)

编辑:在 MWE 中添加了考虑以下 @campa 评论的部分。从下图可以看出,结果是相同的(必须是……)但使用\muskip 使方程式书写更加简洁 :)。

在此处输入图片描述

答案3

抱歉,这个{\small\begin{equation}...}解决方法可能是错误的。

以下是一些更好的解决方案:

\documentclass[11pt]{article}
\usepackage{amsmath}% for text, recommended anyway
\usepackage{mathtools}% for \splitdfrac

\pagestyle{empty}
\renewcommand{\baselinestretch}{1.1}
\flushbottom

\begin{document}
\section{Section}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text.\footnote{Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
      + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
      + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}
\begin{equation}
\text{\footnotesize$\displaystyle
  \frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
        + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
        + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}$%
}
\end{equation}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
\begin{equation}
\frac{
  \splitdfrac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7}}
             {+ 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13}}
  }{z}
\end{equation}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
\begin{equation}
\begin{split}
  \frac{1}{z}\bigl(
    & 2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7}\\
    & + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13}
  \bigr)
\end{split}
\end{equation}

\end{document}

你可能想先做

\begin{equation}
\text{\footnotesize\medmuskip=0mu}$\displaystyle
  \frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
        + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
        + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}$%
}
\end{equation}

你会得到

在此处输入图片描述

另一种方法是nccmath使用

\medmath{\frac{...}{...}}

在此处输入图片描述

相关内容