方程式标签位置:两个方程式之间

方程式标签位置:两个方程式之间

我想对这两个方程式仅使用一个标签(OC),并将其默认放在右侧,但是(垂直)放在两个方程式的中间。

这可能吗?根据 LaTeX 规则,这是正确的吗?

在此处输入图片描述

\documentclass[12pt, a4]{article}
\usepackage{amsmath,amsfonts,amssymb}

\begin{enumerate}[a.]
\item \textit{Solve for the equilibrium prices of the contingent claims and the resulting consumption amounts.} Knowing already the first derivative of the two utility functions, we set the \textit{Optimally Condition}
\begin{gather}
        \tag{O.C.} \frac{0.5}{\Pi_{NL}} \cdot \frac{1}{C^A_{NL}} = \frac{0.5}{\Pi_{L}} \cdot \frac{1}{C^A_{L}} \quad \to \quad \Pi_{NL}\cdot C^A_{NL} = \Pi_{L} \cdot C^A_L \\
        \tag{O.C.} \frac{0.5}{\Pi_{NL}} \cdot \frac{1}{C^B_{NL}} = \frac{0.5}{\Pi_{L}} \cdot \frac{1}{C^B_{L}} \quad \to \quad \Pi_{NL}\cdot C^B_{NL} = \Pi_{L} \cdot C^B_L
\end{gather}
\end{enumerate}
\end{document}

答案1

有几种方法可以实现这一点。一种可能性是在方程中使用\begin{split}..环境。另一种选择是使用.. 。\end{split}\begin{aligned}\end{aligned}

注意:A4 纸张大小是用a4paper选项声明的,而不是a4,您还需要enumerate包来自定义枚举项。

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsfonts,amssymb,enumerate}
\begin{document}    
\begin{enumerate}[a.]
  \item \textit{Solve for the equilibrium prices of the contingent claims and the resulting consumption amounts.} Knowing already the first derivative of the two utility functions, we set the \textit{Optimally Condition}
  \begin{equation}\tag{O.C.}
    \begin{split}
      \frac{0.5}{\Pi_{NL}} \cdot \frac{1}{C^A_{NL}} &= \frac{0.5}{\Pi_{L}} \cdot \frac{1}{C^A_{L}} \quad \to \quad \Pi_{NL}\cdot C^A_{NL} = \Pi_{L} \cdot C^A_L \\
      \frac{0.5}{\Pi_{NL}} \cdot \frac{1}{C^B_{NL}} &= \frac{0.5}{\Pi_{L}} \cdot \frac{1}{C^B_{L}} \quad \to \quad \Pi_{NL}\cdot C^B_{NL} = \Pi_{L} \cdot C^B_L
    \end{split}
  \end{equation}
\end{enumerate}
\end{document}

在此处输入图片描述

相关内容