我正在写一份两栏报告。我写了一个很长的方程式,有好几行。我使用multlined
包将方程式放在一栏中。但是当我编译文档时,方程式并不完整。您可以看到方程式只有 4 行。最后一行移到了页面的最底部,其余行都消失了。
我的代码:
\documentclass{doublecol-new}
\usepackage{natbib,stfloats}
\usepackage{mathrsfs}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{subfig}
\usepackage{placeins}
\usepackage{comment}
\usepackage{float}
\usepackage{tabularx}
\begin{equation}
\begin{multlined}
\frac{\partial L(x, z)}{\partial W_{n i}^{(2)}}=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\left(1-z_{b n}\right)} s\left(V_{j}^{(3)}\right)\\ \left(1-s\left(V_{j}^{(3)}\right)\right)
W_{i j}^{(3)} s\left(V_{i}^{(2)}\right)\left(1-s\left(V_{i}^{(2)}\right)\right) x_{b n}\\
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\left(1-z_{b n}\right)} A_{j}^{(3)}\left(1-A_{j}^{(3)}\right)\\ W_{i j}^{(3)} A_{i}^{(2)}\left(1-A_{i}^{(2)}\right) x_{b n}\\
\frac{\partial L(x, z)}{\partial b_{i}^{(2)}}=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\left(1-z_{b n}\right)} s\left(V_{j}^{(3)}\right)\\ \left(1-s\left(V_{j}^{(3)}\right)\right)
W_{i j}^{(3)} s\left(V_{i}^{(2)}\right)\left(1-s\left(V_{i}^{(2)}\right)\right)\\
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\left(1-z_{b n}\right)} A_{j}^{(3)}\left(1-A_{j}^{(3)}\right)\\
W_{i j}^{(3)} A_{i}^{(2)}\left(1-A_{i}^{(2)}\right)\\
\frac{\partial L(x, z)}{\partial b_{j}^{(3)}}=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\left(1-z_{b n}\right)} s\left(V_{j}^{(3)}\right)\\
\left(1-s\left(V_{j}^{(3)}\right)\right)
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d} \frac{x_{b n}-z_{b n}}{z_{b n}\\\left(1-z_{b n}\right)} A_{j}^{(3)}\left(1-A_{j}^{(3)}\right)
\end{multlined}
\end{equation}
答案1
您的代码提供了单一equation
环境,并且equation
环境永远不能跨列(或页)分割。
您所谓的方程式实际上看起来是 3 个独立的方程式。因此,我建议您将 3 个独立的multlined
环境嵌入一个gather
环境中,然后运行\allowdisplaybreaks
以允许在环境末尾进行分栏multlined
。
\left(
由and生成的括号\right)
会显得太大。我建议改用\bigl(
and \bigr)
。
下面的测试文档将前两个方程放在左列的底部,将第三个方程放在右列的顶部。
\documentclass[twocolumn]{article}
% I don't have access to 'doublecol-new' document class
\usepackage{mathtools} % for 'gather' and 'multlined' environments
\allowdisplaybreaks
\usepackage{lipsum} % for filler text
\begin{document}
\raggedbottom
\lipsum[2-3]
\begin{gather}
\begin{multlined} % start of 1st equation
\frac{\partial L(x, z)}{\partial W_{n i}^{(2)}}
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}(1-z_{b n})}
s\bigl(V_{j}^{(3)}\bigr)\\
\bigl(1-s\bigl(V_{j}^{(3)}\bigr)\bigr)
W_{i j}^{(3)} s\bigl(V_{i}^{(2)}\bigr)
\bigl(1-s\bigl(V_{i}^{(2)}\bigr)\bigr) x_{b n}\\
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}(1-z_{b n})} A_{j}^{(3)}
\bigl(1-A_{j}^{(3)}\bigr)\\
W_{i j}^{(3)} A_{i}^{(2)}\bigl(1-A_{i}^{(2)}\bigr) x_{b n}
\end{multlined}\\[\jot]
\begin{multlined} % start of 2nd equation
\frac{\partial L(x, z)}{\partial b_{i}^{(2)}}
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}(1-z_{b n})}
s\bigl(V_{j}^{(3)}\bigr)\\
\bigl(1-s\bigl(V_{j}^{(3)}\bigr)\bigr)
W_{i j}^{(3)} s
\bigl(V_{i}^{(2)}\bigr)
\bigl(1-s\bigl(V_{i}^{(2)}\bigr)\bigr)\\
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}(1-z_{b n})}
A_{j}^{(3)}\bigl(1-A_{j}^{(3)}\bigr)\\
W_{i j}^{(3)} A_{i}^{(2)}\bigl(1-A_{i}^{(2)}\bigr)
\end{multlined}\\[\jot]
\begin{multlined} % start of 3rd equation
\frac{\partial L(x, z)}{\partial b_{j}^{(3)}}
=-\frac{1}{m}\sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}(1-z_{b n})}
\shoveleft{s\bigl(V_{j}^{(3)}\bigr)}\\
\bigl(1-s\bigl(V_{j}^{(3)}\bigr)\bigr)\\
=-\frac{1}{m} \sum_{b=1}^{m} \sum_{n=1}^{d}
\frac{x_{b n}-z_{b n}}{z_{b n}}%\\
(1-z_{b n}) A_{j}^{(3)}\bigl(1-A_{j}^{(3)}\bigr)
\end{multlined}
\end{gather}
\lipsum[4-6]
\end{document}