
Ich habe diese Gleichungen und ihre Zahlen stehen auf derselben Zeile.
\begin{equation}
i_t = \sigma(W_{xi} * X_t + W_ {hi} * H_{t-1} + W_{ci} \circ C_{t-1} + b_i)
\end{equation}
\begin{equation}
f_t = \sigma(W_{xf} * X_t + W_ {hf} * H_{t-1} + W_{cf} \circ C_{t-1} + b_f)
\end{equation}
\begin{equation}
C_t = f_t \circ C_{t-1} + i_t \circ \textnormal{tanh}(W_{xc} * X_t + W_{hc} * H_{t-1} + b_c)
\end{equation}
\begin{equation}
o_t = \sigma(W_{xo} * X_t + W_ {ho} * H_{t-1} + W_{co} \circ C_{t} + b_o)
\end{equation}
Diese Formatierung führt jedoch dazu, dass die Nummer nicht in derselben Zeile steht. Wie kann ich erzwingen, dass die Nummer in derselben Zeile steht?
\begin{align}
i_t &= \sigma(W_{\!\textit{xi}} * X_t + W_{\textit{hi}} * H_{t-1} + W_{\!\textit{ci}} \circ C_{t-1} + b_i)\\
f_t &= \sigma(W_{\!\textit{xf}} * X_t + W_{\textit{hf}} * H_{t-1} + W_{\!\textit{cf}} \circ C_{t-1} + b_f)\\
C_t &= f_t \circ C_{t-1} + i_t \circ \text{tanh}(W_{\!\textit{xc}} * X_t + W_{\!\textit{hc}} * H_{t-1} + b_c)\\
o_t &= \sigma(W_{\!\textit{xo}} * X_t + W_{\!\textit{ho}} * H_{t-1} + W_{\!\textit{co}} \circ C_{t} + b_o)
\end{align}
Antwort1
Sofern Sie keine Möglichkeit finden, den Inhalt der rechten Seite der Gleichung (3) zu vereinfachen und zu kürzen, besteht die beste Lösung darin, in diesen Inhalt einen absichtlichen Zeilenumbruch einzufügen.
\documentclass{article}
\usepackage{amsmath} % for 'align' environment
\newcommand\vn[1]{\textit{#1}}
\usepackage{newtxtext,newtxmath} % optional
\setlength\textwidth{3in} % just for this example
\begin{document}
\begin{align}
i_t &= \sigma(W_{\!\vn{xi}} * X_t + W_{\vn{hi}} * H_{t-1} + W_{\!\vn{ci}} \circ C_{t-1} + b_i)\\
f_t &= \sigma(W_{\!\vn{xf}} * X_t + W_{\vn{hf}} * H_{t-1} + W_{\!\vn{cf}} \circ C_{t-1} + b_{\vn{f}})\\
C_t &= f_t \circ C_{t-1} \notag \\
&\qquad + i_t \circ \text{tanh}(W_{\!\vn{xc}} * X_t + W_{\vn{hc}} * H_{t-1} + b_c)\\
o_t &= \sigma(W_{\!\vn{xo}} * X_t + W_{\vn{ho}} * H_{t-1} + W_{\!\vn{co}} \circ C_{t} + b_o)
\end{align}
\end{document}