方程式的索引

方程式的索引

我有这个代码:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
  \max\nolimits_X \min\nolimits_{\vec{Y}} F(X, \vec{Y})) =
  \sup\nolimits_{X} (\inf\nolimits_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \min\nolimits_{\vec{Y}} (\max\nolimits_X F(X, \vec{Y})) =
  \inf\nolimits_{\vec{Y}} (\sup\nolimits_{X} F(X, \vec{Y})) = \Gamma_2
\end{gather*}
\end{document}

但我想要有索引方程。如果我使用\begin{equation} ...\end{equation},则没有任何断线。

答案1

带星号的环境(amsmath例如gather*align*和 )alignat*不使用方程编号。只要说gather和 就会出现方程编号,除非使用\nonumber

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
  \max\nolimits_X \min\nolimits_{\vec{Y}} F(X, \vec{Y})) =
  \sup\nolimits_{X} (\inf\nolimits_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \min\nolimits_{\vec{Y}} (\max\nolimits_X F(X, \vec{Y})) =
  \inf\nolimits_{\vec{Y}} (\sup\nolimits_{X} F(X, \vec{Y})) = \Gamma_2
\end{gather*}

\begin{gather}
  \max\nolimits_X \min\nolimits_{\vec{Y}} F(X, \vec{Y})) =
  \sup\nolimits_{X} (\inf\nolimits_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \min\nolimits_{\vec{Y}} (\max\nolimits_X F(X, \vec{Y})) =
  \inf\nolimits_{\vec{Y}} (\sup\nolimits_{X} F(X, \vec{Y})) = \Gamma_2
\end{gather}

\end{document}

答案2

如果要将两个方程式作为一个块进行编号,请gathered在内部使用equation,或gather对两个方程式都使用编号;但也许align更好。

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator{\maxn}{max}
\DeclareMathOperator{\minn}{min}
\DeclareMathOperator{\supn}{sup}
\DeclareMathOperator{\infn}{inf}

\begin{document}

One number for the whole block
\begin{equation}
\begin{gathered}
  \maxn_X (\minn_{\vec{Y}} F(X, \vec{Y})) =
  \supn_{X} (\infn_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \minn_{\vec{Y}} (\maxn_X F(X, \vec{Y})) =
  \infn_{\vec{Y}} (\supn_{X} F(X, \vec{Y})) = \Gamma_2
\end{gathered}
\end{equation}
or numbers for both equations
\begin{gather}
  \maxn_X (\minn_{\vec{Y}} F(X, \vec{Y})) =
  \supn_{X} (\infn_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \minn_{\vec{Y}} (\maxn_X F(X, \vec{Y})) =
  \infn_{\vec{Y}} (\supn_{X} F(X, \vec{Y})) = \Gamma_2
\end{gather}
Maybe you prefer alignment at the first equal sign
\begin{align}
  \maxn_X (\minn_{\vec{Y}} F(X, \vec{Y})) &=
  \supn_{X} (\infn_{\vec{Y}} F(X, \vec{Y})) = \Gamma_1, \\
  \minn_{\vec{Y}} (\maxn_X F(X, \vec{Y})) &=
  \infn_{\vec{Y}} (\supn_{X} F(X, \vec{Y})) = \Gamma_2
\end{align}
which would enhance the symmetry between the two formulas.

\end{document}

我定义了一些新的运算符以避免所有那些显式的\nolimits

在此处输入图片描述

相关内容