我之前问过一个关于两列方程式之间的垂直间距的问题。这个问题已经得到解答,但是当我使用以下代码时,这些方程式和下面的文本之间出现了很大的垂直间距。
此外,目前,每个方程都有一个单独的编号。我希望这两个方程,即方程行只有一个数字。因此,理想情况下,整行都应编号(8)。
有人可以帮我吗?
\documentclass{article}
\begin{document}
\begin{multicols}{2}
\noindent
\begin{equation}
C_{O,t}(j) = (1-\alpha_c)\left(\frac{P_{O,t}}{P_{C,t}}\right)^{-\omega_c} C_{t}(j)
\end{equation}\columnbreak
\begin{equation}
C_{Z,t}(j) = \alpha_c\left(\frac{P_{Z,t}}{P_{C,t}}\right)^{-\omega_c} C_{t}(j).
\end{equation}
\end{multicols}
\noindent
Therefore, the consumption-based price index (CPI), $P_{C,t}$ is given by,
\end{document}
答案1
考虑到所需的输出,我认为使用multicols
和两个equation
环境并不是完成当前任务的正确工具。你可以只使用一 equation
amsmath
如果需要多行对齐,则添加一些水平间距或其他的环境:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$P_{O,t}$ are the core consumption deflator and the price of oil, respectively. This implies,
\begin{equation}
C_{O,t}(j) = (1-\alpha_c)\biggl(\frac{P_{O,t}}{P_{C,t}}\biggr)^{-\omega_c} C_{t}(j)\qquad
C_{Z,t}(j) = \alpha_c\biggl(\frac{P_{Z,t}}{P_{C,t}}\biggr)^{-\omega_c} C_{t}(j).
\end{equation}
Therefore, the consumption-based price index (CPI), $P_{C,t}$ is given by,
$P_{O,t}$ are the core consumption deflator and the price of oil, respectively. This implies,
\begin{equation}
\begin{aligned}
C_{O,t}(j) &= (1-\alpha_c)\biggl(\frac{P_{O,t}}{P_{C,t}}\biggr)^{-\omega_c} C_{t}(j)\\
C_{Z,t}(j) &= \alpha_c\biggl(\frac{P_{Z,t}}{P_{C,t}}\biggr)^{-\omega_c} C_{t}(j).
\end{aligned}
\end{equation}
Therefore, the consumption-based price index (CPI), $P_{C,t}$ is given by,
\end{document}
结果:
我还将\left
,对更改\right
为\bbigl
,\bbigr
以避免为前者添加不必要的水平间距。
答案2
您可以使用并排minipage
环境,每个环境0.5\textwidth
都很宽。在第一个环境中使用一个equation*
环境,equation
在第二个环境中使用一个环境。
\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}
\begin{document}
\setcounter{equation}{7} % just for this example
\noindent
Therefore, the consumption-based price index (CPI), $P_{C,t}$ is given by \dots
\par\noindent
\begin{minipage}{0.5\textwidth}
\begin{equation*}
C_{O,t}(j) = (1-\alpha_c)\left(\frac{P_{O,t}}{P_{C,t}}\right)^{-\omega_c} C_{t}(j)
\end{equation*}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\begin{equation}
C_{Z,t}(j) = \alpha_c\left(\frac{P_{Z,t}}{P_{C,t}}\right)^{-\omega_c} C_{t}(j).
\end{equation}
\end{minipage}
\par\noindent
Therefore, the consumption-based price index (CPI), $P_{C,t}$ is given by \dots
\end{document}
答案3
这里不需要使用“双列布局”。相反,可以使用单列布局,equation
中间留有固定的空格(例如\qquad
),或者使用以下布局之一amsmath
类似align
的环境来均匀分布方程:
\documentclass{article}
\usepackage[margin=1in,showframe]{geometry}% Just for this example
\usepackage{amsmath,mleftright}
\begin{document}
$P_{O,t}$ are the core consumption deflator and the price of oil, respectively. This implies
\begin{equation}
C_{O,t}(j) = (1-\alpha_c)\mleft(\frac{P_{O,t}}{P_{C,t}}\mright)^{-\omega_c} C_{t}(j)
\qquad
C_{Z,t}(j) = \alpha_c\mleft(\frac{P_{Z,t}}{P_{C,t}}\mright)^{-\omega_c} C_{t}(j).
\end{equation}
Therefore, the consumption-based price index (CPI),~$P_{C,t}$ is given by, \ldots
\noindent\hrulefill
$P_{O,t}$ are the core consumption deflator and the price of oil, respectively. This implies
\begin{align}
C_{O,t}(j) = (1-\alpha_c)\mleft(\frac{P_{O,t}}{P_{C,t}}\mright)^{-\omega_c} C_{t}(j)
&&
C_{Z,t}(j) = \alpha_c\mleft(\frac{P_{Z,t}}{P_{C,t}}\mright)^{-\omega_c} C_{t}(j).
\end{align}
Therefore, the consumption-based price index (CPI),~$P_{C,t}$ is given by, \ldots
\end{document}