![方程式标签位置:两个方程式之间](https://linux22.com/image/343101/%E6%96%B9%E7%A8%8B%E5%BC%8F%E6%A0%87%E7%AD%BE%E4%BD%8D%E7%BD%AE%EF%BC%9A%E4%B8%A4%E4%B8%AA%E6%96%B9%E7%A8%8B%E5%BC%8F%E4%B9%8B%E9%97%B4.png)
我想对这两个方程式仅使用一个标签(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}