我想用多行拆分这个等式但无法实现!
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\E}{E}
\begin{document}
\begin{multline*}
\P_t=
\frac{1}{2}\Bigl(m_t+v_t-u_t
+(\frac{1-\zeta }{2})(\frac{E_{t-1}m_t+\frac{1-\zeta }{2\zeta }E_{t-
2}m_t+\frac{\zeta (1-\zeta )}{2(1+\zeta )}E_{t-2}P_{t-1}+\frac{\zeta }
{2}P_{t-1}+\frac{\zeta }{1+\zeta }P_{t-2}}{(1+\zeta )}))\bigr\\
+\frac{(1-\zeta )}{4}\Bigl(\frac{E_{t-2}m_t+(\frac{\zeta }{2})(E_{t-2}P_{t-
1}+P_{t-2})}{(1+\zeta )})\Bigr) \\
+\frac{\zeta }{4}(\Bigl((P_{t-1}+P_{t-2})\Bigr)
\end{multline*}
\end{document}
它已经脱离了 mage,所以我试图打破它,但它仍然没有显示正确的内容。有人能帮忙找出编码中的问题吗?如何使用breqn
?
答案1
您过度使用括号。如果我理解了您的公式,这里有一个适合两行的布局,带有geometry
包,以便有更合适的边距。此外,我更喜欢使用中等大小的分数作为nccmath
分数系数:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{amsmath, nccmath}
\DeclareMathOperator{\E}{E}
\begin{document}
\vspace*{2ex}
\begin{multline*}
\P_t=
\mfrac{1}{2}\biggl(m_t+v_t-u_t
+\frac{1-\zeta }{2}\,\frac{E_{t-1}m_t+\frac{1-\zeta }{2\zeta }E_{t-2}m_t+\frac{\zeta (1-\zeta )}{2(1+\zeta )}E_{t-2}P_{t-1}+\frac{\zeta }{2}P_{t-1} +\frac{\zeta }{1+\zeta }P_{t-2}}{1+\zeta}\biggr) \\
+\frac{1-\zeta }{4}\,\frac{E_{t-2}m_t+\frac{\zeta }{2}(E_{t-2}P_{t-1}+P_{t-2})}{1+\zeta} +\frac{\zeta }{4}(P_{t-1}+P_{t-2})
\end{multline*}
\end{document}
答案2
我将首先简化公式,然后使用align*
环境将其排版到三行。
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\E}{E} % expectations operator
\begin{document}
\begin{align*}
P_t
&=\frac{1}{2}(m_t+v_t-u_t)
+\frac{1}{4}\frac{1-\zeta}{1+\zeta}
\biggl[\E_{t-1}m_t +\frac{1-\zeta}{2\zeta }\E_{t-2}m_t\\
&\quad +\frac{\zeta (1-\zeta)}{2(1+\zeta)}\E_{t-2}P_{t-1}
+\frac{\zeta}{2}P_{t-1}+\frac{\zeta}{1+\zeta }P_{t-2}
+\E_{t-2}m_t\\
&\quad +\frac{\zeta}{2} (\E_{t-2}P_{t-1}+P_{t-2})\biggr]
+\frac{1}{4}\zeta (P_{t-1}+P_{t-2})
\end{align*}
\end{document}
答案3
删除所有不必要的括号后,修正已使用的括号的大小,使用nccmath
中等大小的分数并改变等式行:
\documentclass{article}
\usepackage{nccmath}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
\begin{document}
\begin{multline*}
P_t=
\frac{1}{2}\Biggl(m_t+v_t-u_t \\
+ \frac{1-\zeta }{2}\frac{E_{t-1}m_t
+ \mfrac{1-\zeta}{2\zeta}E_{t-2}m_t
+ \mfrac{\zeta(1-\zeta)}{2(1+\zeta)}E_{t-2}P_{t-1}
+ \mfrac{\zeta}{2}P_{t-1}
+ \mfrac{\zeta}{1+\zeta}P_{t-2}}
{1+\zeta}\Biggr) \\
+ \frac{1-\zeta}{4}
\frac{E_{t-2}m_t + \frac{\zeta}{2}(E_{t-2}P_{t-1}
+ P_{t-2})}{1+\zeta}
+ \frac{\zeta }{4}\Bigl(P_{t-1}+P_{t-2}\Bigr)
\end{multline*}
\end{document}
(红线表示文本边框)