\documentclass[a4paper]{article}
\usepackage{mathtools}
\usepackage{amssymb,amsmath}
\usepackage{mathtools}%voor Aboxed
\usepackage{bm}
\begin{document}
\begin{align*}
\overrightarrow{a_{G'_1}} = \overrightarrow{a_{G'_2}} = \overrightarrow{a_{G'}}\\
\centerline\text{met }\overrightarrow{a_{G'_1}} &=
\overrightarrow{\alpha_1}\times(\overrightarrow{r_G}-\overrightarrow{r_E}) +
\overrightarrow{\alpha_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_E'}) + \overrightarrow{\omega_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_{F,1}'})\\ & \Downarrow \overrightarrow{v_{F,1}'} = \overrightarrow{\omega_1}\times (\overrightarrow{r_F}-\overrightarrow{r_E})
=
\begin{vmatrix}
\overrightarrow{e_x'} & \overrightarrow{e_y'} & \overrightarrow{e_z'}\\
\omega_1 & 0 & 0\\l_1 & l_4 & 0\\\end{vmatrix}
\Rightarrow \text{test}\\
\end{align*}
\end{document}
渲染
为什么它们太靠右了?我怎样才能让它们居中?
答案1
您需要删除\centerline
。这是一个普通命令,不支持在文档TeX
中使用。有关信息,请返回LaTeX
\show\centerline
> \centerline=macro:
#1->\@@line {\hss #1\hss }.
因此,在您当前的代码中,\centerline\text{met}
会导致\centerline
选择\text
作为其参数(因此您会得到斜体“met”)。执行后\makeatletter
,\show\@@line
返回
->\hb@xt@ \hsize .
这是LaTeX
的内核缩写\hbox to \hsize
。因此,您的方程式前面有一个宽度为 的水平盒子\hsize
,这会将它们推到右侧。一旦\centerline
被移除,您的方程式将居中,但如果结果不是您想要的,您可能需要编辑您的问题。
答案2
不,我的错,伊恩是对的,就是这样\centerline
。
话虽如此,我想我会用
\begin{alignat*}{2}
&&\overrightarrow{a_{G'_1}} &= \overrightarrow{a_{G'_2}} =
\overrightarrow{a_{G'}}
\\
&&\text{met }\overrightarrow{a_{G'_1}} &=
\overrightarrow{\alpha_1}\times(\overrightarrow{r_G}-\overrightarrow{r_E})
+ \overrightarrow{\alpha_2}\times
(\overrightarrow{v_{G,1}'}-\overrightarrow{v_E'}) +
\overrightarrow{\omega_2}\times
(\overrightarrow{v_{G,1}'}-\overrightarrow{v_{F,1}'})
\\
\ArrowBetweenLines[\Downarrow]
&& \overrightarrow{v_{F,1}'} &=
\overrightarrow{\omega_1}\times
(\overrightarrow{r_F}-\overrightarrow{r_E}) =
\begin{vmatrix}
\overrightarrow{e_x'} & \overrightarrow{e_y'} &
\overrightarrow{e_z'}
\\
\omega_1 & 0 & 0
\\
l_1 & l_4 & 0
\\
\end{vmatrix}
\Rightarrow \text{test}
\end{alignat*}
答案3
\documentclass[a4paper]{article}
\usepackage{amssymb,amsmath}
\usepackage{mathtools}
\begin{document}
\begin{align*}
\overrightarrow{a_{G'_1}} &= \overrightarrow{a_{G'_2}} = \overrightarrow{a_{G'}}\\
\text{met }\overrightarrow{a_{G'_1}} &= \overrightarrow{\alpha_1}\times(\overrightarrow{r_G}-\overrightarrow{r_E}) +
\overrightarrow{\alpha_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_E'}) +
\overrightarrow{\omega_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_{F,1}'})\\
&\Downarrow \\
&\overrightarrow{v_{F,1}'} = \overrightarrow{\omega_1}\times (\overrightarrow{r_F}-\overrightarrow{r_E})\\
&=
\begin{vmatrix}
\overrightarrow{e_x'} & \overrightarrow{e_y'} & \overrightarrow{e_z'}
\omega_1 & 0 & 0\\l_1 & l_4 & 0
\end{vmatrix}
\Rightarrow \text{test}
\end{align*}
\end{document}