\begin{equation}
\begin{align}
\mathbf{x_{t}=f_{t}(x_{t-1},u_{t})}\\
\mathbf{y_{t}=g_{t}(x_{t},v_{t})}
\label{eq:state-space&obs-equ}
\end{align}
\end{equation}
我希望该等y(t)
式出现在下一行,但它出现在同一行?如何解决这个问题?
答案1
\documentclass[border=12pt,preview]{standalone} % change it back to your document class
\usepackage{mathtools}
\begin{document}
\section*{side-by-side}
\begin{align}
x_{t} &= f_{t}(x_{t-1},u_{t}) & y_{t} &=g_{t}(x_{t},v_{t}) \label{eq:label1}
\end{align}
Please see equation~\ref{eq:label1} on page~\pageref{eq:label1}.
\section*{split with single number}
\begin{equation}
\begin{split}
x_{t} &= f_{t}(x_{t-1},u_{t}) \\
y_{t} &=g_{t}(x_{t},v_{t})
\end{split}\label{eq:label2}
\end{equation}
Please see equation~\ref{eq:label2} on page~\pageref{eq:label2}.
\section*{aligned with single number}
\begin{equation}
\!
\begin{aligned}
x_{t} &= f_{t}(x_{t-1},u_{t}) \\
y_{t} &=g_{t}(x_{t},v_{t})
\end{aligned}\label{eq:label3}
\end{equation}
Please see equation~\ref{eq:label3} on page~\pageref{eq:label3}.
\end{document}
答案2
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\boldmath
\begin{align}
\begin{aligned}
x_t &= f_t(x_{t-1},u_t)\\
y_t &= g_t(x_t,v_t)
\end{aligned}\label{eq:state-space&obs-equ}
\end{align}
\unboldmath
\begin{align}
x_t &= f_t(x_{t-1},u_t) & y_t &= g_t(x_t,v_t)
\end{align}
\end{document}
然而,将完整的方程式以粗体显示并不是一个好主意。
答案3
问题很简单,您无法使用align
inside equation
(LaTeX 会向您显示一条错误消息,告诉您这有问题)。只需删除\begin{equation}
和\end{equation}
行即可。这应该可以正常工作:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\mathbf{x_{t}=f_{t}(x_{t-1},u_{t})}\\
\mathbf{y_{t}=g_{t}(x_{t},v_{t})}
\label{eq:state-space&obs-equ}
\end{align}
\end{document}
您可能想要修复其他问题,例如,使用 放置对齐点&
,但解决当前问题所需的最小更改是摆脱该equation
环境。