我想重现类似于这里所附的屏幕截图的内容,每行有两个单独的方程式,每组方程式都相互对齐。
在我的终端,LaTeX 总是将第二个对齐符号左边的所有内容推到最左边,就好像它是第一个等式的一部分一样,而我希望同一行中第二个等式的左边紧挨着它自己的等号。
具体来说,针对这里附加的案例,我想分别将两个方程与$\to$
和分开对齐$=$
。
此外,如果可能的话,理想情况下我希望仅使用环境来实现这一点align
。
最小不工作代码:
\documentclass[11pt, oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
\begin{align}
\left(\begin{array}{c}{A_{\mu}} \\ {\rho_{\mu}^{*}}\end{array}\right) &\rightarrow\left(\begin{array}{cc}{\cos \theta} & {-\sin \theta} \\ {\sin \theta} & {\cos \theta}\end{array}\right)\left(\begin{array}{c}{A_{\mu}} \\ {\rho_{\mu}^{*}}\end{array}\right), \qquad\qquad\qquad\qquad\tan \theta&=\frac{g_{e l}}{g_{*}}\\
\left(\begin{array}{c}{\psi_{L}} \\ {\chi_{L}}\end{array}\right) &\rightarrow\left(\begin{array}{cc}{\cos \varphi_{\psi_{L}}} & {-\sin \varphi_{\psi_{L}}} \\ {\sin \varphi_{\psi_{L}}} & {\cos \varphi_{\psi_{L}}}\end{array}\right)\left(\begin{array}{c}{\psi_{L}} \\ {\chi_{L}}\end{array}\right), \hfill \tan \varphi_{\psi_{L}}&=\frac{\Delta}{m}\\
\left(\begin{array}{c}{\tilde{\psi}_{R}} \\ {\tilde{\chi}_{R}}\end{array}\right) &\rightarrow\left(\begin{array}{cc}{\cos \varphi_{\tilde{\psi}_{R}}} & {-\sin \varphi_{\tilde{\psi}_{R}}} \\ {\sin \varphi_{\tilde{\psi}_{R}}} & {\cos \varphi_{\tilde{\psi}_{R}}}\end{array}\right)\left(\begin{array}{c}{\tilde{\psi}_{R}} \\ {\tilde{\chi}_{R}}\end{array}\right), \quad \tan \varphi_{\tilde{\psi}_{R}}&=\frac{\tilde{\Delta}}{\tilde{m}}
\end{align}
\end{document}
答案1
像这样?
使用pmatrix
来自 asmath 并扩展align
环境并加上一个 & 符号:
\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{align}
\begin{pmatrix}
A_{\mu}\\ \rho_{\mu}^{*}
\end{pmatrix}
& \rightarrow \begin{pmatrix}
\cos \theta & -\sin \theta \\
\sin \theta & \cos \theta
\end{pmatrix}\begin{pmatrix}
A_{\mu} \\ \rho_{\mu}^{*}
\end{pmatrix},
& \tan \theta & = \frac{g_{e l}}{g_{*}} \\
\begin{pmatrix}\psi_{L} \\ \chi_{L} \end{pmatrix}
& \rightarrow \begin{pmatrix}
\cos \varphi_{\psi_{L}} & -\sin \varphi_{\psi_{L}} \\
\sin \varphi_{\psi_{L}} & \cos \varphi_{\psi_{L}}
\end{pmatrix}\begin{pmatrix}
\psi_{L} \\ \chi_{L}
\end{pmatrix},
& \tan \varphi_{\psi_{L}}
& = \frac{\Delta}{m} \\
\begin{pmatrix}
\tilde{\psi}_{R} \\ \tilde{\chi}_{R}
\end{pmatrix}
& \rightarrow \begin{pmatrix}
\cos \varphi_{\tilde{\psi}_{R}} & -\sin \varphi_{\tilde{\psi}_{R}} \\
\sin \varphi_{\tilde{\psi}_{R}} & \cos \varphi_{\tilde{\psi}_{R}}
\end{pmatrix}\begin{pmatrix}
\tilde{\psi}_{R} \\\tilde{\chi}_{R}
\end{pmatrix},
& \tan \varphi_{\tilde{\psi}_{R}}
& =\frac{\tilde{\Delta}}{\tilde{m}}
\end{align}
\end{document}
答案2
我建议alignat
,这样可以更好地控制列对之间的间距。
我认为,每行的第二部分不应该在等号处对齐,因为突出部分应该是“棕褐色”。
\documentclass[11pt, oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{2}
\begin{pmatrix} A_{\mu} \\ \rho_{\mu}^{*} \end{pmatrix}
& \rightarrow
\begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}
\begin{pmatrix} A_{\mu} \\ \rho_{\mu}^{*} \end{pmatrix},
&\quad& \tan \theta = \frac{g_{e l}}{g_{*}}
\\
\begin{pmatrix} \psi_{L} \\ \chi_{L} \end{pmatrix}
& \rightarrow
\begin{pmatrix}
\cos \varphi_{\psi_{L}} & -\sin \varphi_{\psi_{L}} \\
\sin \varphi_{\psi_{L}} & \cos \varphi_{\psi_{L}}
\end{pmatrix}
\begin{pmatrix} \psi_{L} \\ \chi_{L} \end{pmatrix},
&& \tan \varphi_{\psi_{L}} = \frac{\Delta}{m}
\\
\begin{pmatrix} \tilde{\psi}_{R} \\ \tilde{\chi}_{R} \end{pmatrix}
& \rightarrow
\begin{pmatrix}
\cos \varphi_{\tilde{\psi}_{R}} & -\sin \varphi_{\tilde{\psi}_{R}} \\
\sin \varphi_{\tilde{\psi}_{R}} & \cos \varphi_{\tilde{\psi}_{R}}
\end{pmatrix}
\begin{pmatrix} \tilde{\psi}_{R} \\ \tilde{\chi}_{R} \end{pmatrix},
&& \tan \varphi_{\tilde{\psi}_{R}} = \frac{\tilde{\Delta}}{\tilde{m}}
\end{alignat}
\end{document}
您可能有不同的看法。无论如何,请避免过度使用牙套。