![使用 \underbrace 对齐](https://linux22.com/image/341730/%E4%BD%BF%E7%94%A8%20%5Cunderbrace%20%E5%AF%B9%E9%BD%90.png)
我想将四个方程的右侧放在彼此之下,因此 e^(...) 应该在每一列中彼此之下。由于 ,我无法理解这一点\underbrace
。
\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{eqn:4}
\begin{alignedat}{4}
&\eta(z+1)^{4}&&=e^{\frac{\pi i}{3}}\eta(z)^{4}, &\quad\quad&\phantom{~}& \eta(2(z+1))^{8}&=e^{\frac{4\pi i}{3}}\eta(2z)^{8},\\
&\eta(3(z+1))^{4}&&=\underbrace{e^{\pi i}}_{=-1}\eta(3z)^{4}, &&\phantom{~}& \eta(6(z+1))^{8}&=\underbrace{e^{4\pi i}}_{=1}\eta(6z)^{8}.
\end{alignedat}
\end{equation}
\end{document}
答案1
您可以使用eqparbox
,并进行一些调整:
\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{eqparbox}
\newcommand{\matheqparbox}[2]{%
\eqparbox[t]{#1}{\hfil$\displaystyle#2$\hfil}%
}
\begin{document}
\begin{equation}\label{eqn:4}
\begin{alignedat}{4}
&\eta(z+1)^{4}&&=\matheqparbox{1}{e^{\frac{\pi i}{3}}}\eta(z)^{4},
&\quad\quad&
& \eta(2(z+1))^{8}&=\matheqparbox{2}{e^{\frac{4\pi i}{3}}}\eta(2z)^{8},\\
&\eta(3(z+1))^{4}&&=\matheqparbox{1}{\underbrace{e^{\pi i}}_{=-1}\,}\eta(3z)^{4},
&&
& \eta(6(z+1))^{8}&=\matheqparbox{2}{\underbrace{e^{4\pi i}}_{=1}\,}\eta(6z)^{8}.
\end{alignedat}
\end{equation}
\end{document}
该命令\eqparbox
需要一个标签来计算具有相同标签的框的最大宽度。这里我使用了1
和2
,但它们可以是任何(唯一)字符串。
另一方面,我更喜欢等号前右对齐:
\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{eqparbox}
\newcommand{\matheqparbox}[2]{%
\eqparbox[t]{#1}{\hfil$\displaystyle#2$\hfil}%
}
\begin{document}
\begin{equation}\label{eqn:4}
\begin{aligned}
\eta(z+1)^{4}&=\matheqparbox{1}{e^{\frac{\pi i}{3}}}\eta(z)^{4},
& \eta(2(z+1))^{8}&=\matheqparbox{2}{e^{\frac{4\pi i}{3}}}\eta(2z)^{8},\\
\eta(3(z+1))^{4}&=\matheqparbox{1}{\underbrace{e^{\pi i}}_{=-1}\,}\eta(3z)^{4},
& \eta(6(z+1))^{8}&=\matheqparbox{2}{\underbrace{e^{4\pi i}}_{=1}\,}\eta(6z)^{8}.
\end{aligned}
\end{equation}
\end{document}
答案2
为了获得最大的灵活性,您可能需要使用array
环境。在下面的解决方案中,我假设您希望术语e^{...}
在行间居中。如果您更喜欢左对齐或右对齐,请随意切换C
到 或。L
R
\documentclass{scrartcl}
\usepackage{amsmath} % for general math typesetting support
\usepackage{array} % for "\newcolumntype" macro
\newcolumntype{C}{>{\displaystyle}c}
\newcolumntype{L}{>{\displaystyle}l}
\newcolumntype{R}{>{\displaystyle}r}
\begin{document}
\begin{equation}\label{eqn:4}
\setlength\arraycolsep{0pt}
\renewcommand\arraystretch{1.5}
\begin{array}{ R@{{}={}}C@{\kern1pt}L @{\hspace{2em}}
R@{{}={}}C@{\kern1pt}L }
\eta(z+1)^{4} & e^{\frac{\pi i}{3}} & \eta(z)^{4}, &
\eta(2(z+1))^{8} & e^{\frac{4\pi i}{3}} & \eta(2z)^{8}, \\
\eta(3(z+1))^{4} & \underbrace{e^{\pi i}}_{=-1} & \eta(3z)^{4}, &
\eta(6(z+1))^{8} & \underbrace{e^{4\pi i}}_{=1} & \eta(6z)^{8}.
\end{array}
\end{equation}
\end{document}
答案3
\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{align}\label{eqn:4}
\begin{aligned}
\eta(z+1)^{4} &= e^{\frac{\pi i}{3}} \eta(z)^{4}, &
\eta(2(z+1))^{8}&= e^{\frac{4\pi i}{3}}\eta(2z)^{8}, \\
\eta(3(z+1))^{4}&= \mkern-5mu\underbrace{e^{\pi i}}_{=-1} \eta(3z)^{4}, &
\eta(6(z+1))^{8}&= \underbrace{e^{4\pi i}}_{=1} \eta(6z)^{8}.
\end{aligned}
\end{align}
\end{document}