我想知道如何才能使方程式在多个对齐环境中实现垂直对齐:
\begin{align*}
\mathbf{y}_{t} &= \mathbf{A'} \cdot \mathbf{x}_{t} + \mathbf{H'} \cdot \boldsymbol{\xi}_{t} + \textbf{v}_{t},\\
\boldsymbol{\xi}_{t} &= \mathbf{F} \cdot \boldsymbol{\xi}_{t-1} + \varepsilon_{t},
\end{align*}
Here, $\mathbf{y}_{t}$ is a vector of observed contemporaneous variables; $\mathbf{x}_{t}$ is a vector of observed exogenous and lagged exogenous variables, and $\boldsymbol{\xi}_{t}$ is the vector of unobserved states. The vectors of stochastic disturbances are assumed to be Gaussian and mutually uncorrelated, with mean zero and covariance matrices $\mathbf{R}$ and $\mathbf{Q}$, respectively:
\begin{align*}
\mathbf{v}_{t} & \sim \mathcal{N}(0, \mathbf{R})\\
\boldsymbol{\varepsilon}_{t} & \sim \mathcal{N}(0, \mathbf{Q})
\end{align*}
The first-stage model is represented by the following matrices:
\begin{align*}
\mathbf{y}_{t} &= \begin{bmatrix}
y_{t} & \pi_{t}
\end{bmatrix}\\
\mathbf{x}_{t} &= \begin{bmatrix}
y_{t-1} & y_{t-2} & \pi_{t-1} \pi_{t-2,4}
\end{bmatrix}\\
\boldsymbol{\xi}_{t} &= \begin{bmatrix}
y^{*}_{t} & y^{*}_{t-1} & y^{*}_{t-2}
\end{bmatrix}\\
\end{align*}
需要澄清的是,从垂直角度来看,方程式并非从页面上的同一点开始:它们根据其长度位于页面的中心。我希望所有方程式在页面上的起点都相同,这样它们就可以“垂直对齐”。
此外,如何在bmatrix
环境中施加矩阵转置?
谢谢!
答案1
您可以使用单一align
环境和\intertext
对齐组之间的文本命令,但它是为短句设计的,因此,如果\intertext
在页面底部发生这种情况,它可能会转到下一页,从而在页面底部留下不需要的空白。
我不认为这是个好主意——人们只对齐紧密相连的方程式:对齐二次方程的判别式公式和三角恒等式有什么意义呢?方程式不是行进的部队。
无论如何,这里有一个代码:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{mathtools}
\begin{document}
\begin{align*}
\mathbf{y}_{t} &= \mathbf{A'}\mathbf{x}_{t} + \mathbf{H'}\boldsymbol{\xi}_{t} + \textbf{v}_{t},\\
\boldsymbol{\xi}_{t} &= \mathbf{F}\boldsymbol{\xi}_{t-1} + \varepsilon_{t},
\intertext{Here, $\mathbf{y}_{t}$ is a vector of observed contemporaneous variables; $\mathbf{x}_{t}$ is a vector of observed exogenous and lagged exogenous variables, and $\boldsymbol{\xi}_{t}$ is the vector of unobserved states. The vectors of stochastic disturbances are assumed to be Gaussian and mutually uncorrelated, with mean zero and covariance matrices $\mathbf{R}$ and $\mathbf{Q}$, respectively:}
\mathbf{v}_{t} & \sim \mathcal{N}(0, \mathbf{R})\\
\boldsymbol{\varepsilon}_{t} & \sim \mathcal{N}(0, \mathbf{Q})
\intertext{The first-stage model is represented by the following matrices:}
\mathbf{y}_{t} &= \begin{bmatrix}
y_{t} & \pi_{t}
\end{bmatrix}\\
\mathbf{x}_{t} &= \begin{bmatrix}
y_{t-1} & y_{t-2} & \pi_{t-1} \pi_{t-2,4}
\end{bmatrix}\\
\boldsymbol{\xi}_{t} &= \begin{bmatrix}
y^{*}_{t} & y^{*}_{t-1} & y^{*}_{t-2}
\end{bmatrix}\\
\end{align*}
\end{document}
答案2
如果希望每个 环境都左对齐,可以在加载包时equation
添加选项fleqn
amsmath
\usepackage[fleqn]{amsmath}
或者如果您只想在本地使用,请使用flalign
或环境。flalign*
请参见这个帖子了解更多信息。
使用芭芭拉·比顿的建议进行编辑
\documentclass[10pt]{article}
\usepackage[fleqn]{amsmath}
\begin{document}
\makeatletter \@mathmargin=10pt\makeatother % to set flalign margin to 10 pt
\begin{flalign}
1+2=3
\end{flalign}
\end{document}