我想创建一系列具有相同对齐方式的相互叠加的方程式。为此,我&
在不同点使用了三个 ' 来将符号彼此对齐。但是,两个部分之间的空间太宽,不易阅读。有什么方法可以解决这个问题吗?
\begin{align*}
& _{6}^{12}{C}+_{1}^{1}{H} & \to & _{7}^{13}{N}+\gamma \\
& _{13}^{7}{N} & \to & _{6}^{13}{C}+e^++v_e\\
& _{6}^{13}{C}+_{1}^{1}{H} & \to & _{7}^{14}{N}+\gamma \\
& _{7}^{14}{N}+_{1}^{1}{H} & \to & _{8}^{18}{O}+\gamma \\
& _{8}^{15}{O} & \to & _{7}^{15}{N}+e^++v_e \\
& _{7}^{15}{N}+_{1}^{1}{H} & \to & _{6}^{12}{C}+_{2}^{4}{He}
\end{align*}
我不希望箭头离得太远,我希望它们位于 H 旁边,同时当行中的字符较少时仍保留空格
答案1
你可以用它tabularray
来对齐,它可以在数学中使用。你应该用它\prescript
来做左下标。
\documentclass{article}
\usepackage{tabularray}
\usepackage{mathtools}
\begin{document}
\begin{equation*}
\begin{tblr}{columns={colsep=2pt}}
\prescript{6}{12}{C}+\prescript{1}{1}{H} & \to & \prescript{7}{13}{N}+\gamma \\
\prescript{13}{7}{N} & \to & \prescript{6}{13}{C}+e^++v_e \\
\prescript{6}{13}{C}+\prescript{1}{1}{H} & \to & \prescript{7}{14}{N}+\gamma \\
\prescript{7}{14}{N}+\prescript{1}{1}{H} & \to & \prescript{8}{18}{O}+\gamma \\
\prescript{8}{15}{O} & \to & \prescript{7}{15}{N}+e^++v_e \\
\prescript{7}{15}{N}+\prescript{1}{1}{H} & \to & \prescript{6}{12}{C}+\prescript{2}{4}{He} \\
\end{tblr}
\end{equation*}
\begin{equation*}
\begin{tblr}{cells={halign=c,valign=m},columns={colsep=1.5pt}}
\prescript{6}{12}{C} & + & \prescript{1}{1}{H} & \to & \prescript{7}{13}{N} & + & \gamma & & \\
\prescript{13}{7}{N} & & & \to & \prescript{6}{13}{C} & + & e^+ & + & v_e \\
\prescript{6}{13}{C} & + & \prescript{1}{1}{H} & \to & \prescript{7}{14}{N} & + & \gamma & & \\
\prescript{7}{14}{N} & + & \prescript{1}{1}{H} & \to & \prescript{8}{18}{O} & + & \gamma & & \\
\prescript{8}{15}{O} & & & \to & \prescript{7}{15}{N} & + & e^+ & + & v_e \\
\prescript{7}{15}{N} & + & \prescript{1}{1}{H} & \to & \prescript{6}{12}{C} & + & \prescript{2}{4}{He} & & \\
\end{tblr}
\end{equation*}
\end{document}
答案2
ams 对齐在左对齐和右对齐列之间交替。您只需要左对齐,因此使用&&
将右对齐列留空。然后您需要{}
箭头获得 mathbin 间距。 align*
在每对列之间添加空间,因此使用alignat
不添加空间。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{4}
& _{6}^{12}{C}+_{1}^{1}{H} && \to {}&& _{7}^{13}{N}+\gamma \\
& _{13}^{7}{N} && \to {}&& _{6}^{13}{C}+e^++v_e\\
& _{6}^{13}{C}+_{1}^{1}{H} && \to {}&& _{7}^{14}{N}+\gamma \\
& _{7}^{14}{N}+_{1}^{1}{H} && \to {}&& _{8}^{18}{O}+\gamma \\
& _{8}^{15}{O} && \to {}&& _{7}^{15}{N}+e^++v_e \\
& _{7}^{15}{N}+_{1}^{1}{H} && \to {}&& _{6}^{12}{C}+_{2}^{4}{He}
\end{alignat*}
\end{document}
答案3
您可能会考虑chemformula
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{chemformula}
\pgfkeys{
cf /.tip = {Computer Modern Rightarrow} ,
}
\begin{document}
\begin{alignat*}{2}
\ch{
& _{6}^{12}C + ^{1}_{1}H && -> _{7}^{13}N + $\gamma$ \\
& _{7}^{13}N && -> _{6}^{13}C + e+ + $v_e$ \\
& _{6}^{13}C + _{1}^{1}H && -> _{7}^{14}N + $\gamma$ \\
& _{7}^{14}N + _{1}^{1}H && -> _{8}^{18}O + $\gamma$ \\
& _{8}^{15}O && -> _{7}^{15}N + e+ + $v_e$ \\
& _{7}^{15}N + _{1}^{1}H && -> _{6}^{12}C + _{2}^{4}He
}
\end{alignat*}
\end{document}