我使用align
生成一个参数组,其右侧中央有一个数字。现在我想通过添加 来对齐每列的顶部\vspace{0pt}
。但是,它不起作用。如果有任何其他方法可以实现此目的,我将不胜感激!有什么建议吗?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\vspace{0pt}
\begin{aligned}
a_1 &= \frac{x}{h},\\ a_2 &= \frac{h \rho v}{\mu},\\
a_3 &= \frac{k}{2},
\end{aligned}
&&
\begin{aligned}
b_1 &= \frac{h}{h}, \\ b_2 &= \frac{h_0^2 \rho p}{\mu^2},\\
b_3 &= \frac{h_0 j}{2}.
\end{aligned}
&&
\begin{aligned}
c_1 &= \frac{\mu t}{\rho h}, \\ c_2 &= \frac{h \rho \phi}{\mu^2},
\end{aligned}
\end{align}
\end{document}
答案1
尝试:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{aligned}
a_1 & = \frac{x}{h},
&\qquad
b_1 & = \frac{h}{h},
&\qquad
c_1 & = \frac{\mu t}{\rho h}, \\
%
a_2 & = \frac{h \rho v}{\mu},
&\qquad
b_2 & = \frac{h_0^2 \rho p}{\mu^2}
&
c_2 & = \frac{h \rho \phi}{\mu^2}, \\
%
a_3 & = \frac{k}{2},
&
b_3 & = \frac{h_0 j}{2}.
&&
\end{aligned}
\end{equation}
\end{document}
答案2
这是一个使用array
环境来对齐行和列的解决方案。
\documentclass{article}
\usepackage{array} % for "\newcolumntype" and "\extrarowheight" macros
\newcolumntype{L}{>{\displaystyle}l}
\begin{document}
\begin{equation}
\setlength{\extrarowheight}{2.5ex} % extra vertical space between rows
\begin{array}{ r @{{}={}} L @{\qquad} r @{{}={}} L @{\qquad} r @{{}={}} L }
a_1 & \frac{x}{h}, & b_1 & \frac{h}{h}, & c_1 & \frac{\mu t}{\rho h}, \\
a_2 & \frac{h \rho v}{\mu}, & b_2 & \frac{h_0^2 \rho p}{\mu^2} & c_2 & \frac{h \rho \phi}{\mu^2},\\
a_3 & \frac{k}{2}, & b_3 & \frac{h_0 j}{2}. \\
\end{array}
\end{equation}
\end{document}
答案3
由于 Micro 替换了他的\phantom
(或多或少)基于的答案,因此这里是我的minipage
解决方案:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent\fbox{\parbox{\textwidth}{\refstepcounter{equation}%
\begin{minipage}[t]{0.33\textwidth}
\begin{align*}
a_1 &= \frac{x}{h},\\ a_2 &= \frac{h \rho v}{\mu},\\
a_3 &= \frac{k}{2},
\end{align*}
\end{minipage}%
\begin{minipage}[t]{0.33\textwidth}
\begin{align*}
b_1 &= \frac{h}{h}, \\ b_2 &= \frac{h_0^2 \rho p}{\mu^2},\\
b_3 &= \frac{h_0 j}{2}.
\end{align*}
\end{minipage}%
\begin{minipage}[t]{0.33\textwidth}
\begin{align*}
c_1 &= \frac{\mu t}{\rho h}, \\ c_2 &= \frac{h \rho \phi}{\mu^2},
\end{align*}
\end{minipage}\newline\vspace{\baselineskip}}\llap{(\theequation)}}
\end{document}