![在对齐环境中居中方程](https://linux22.com/image/455709/%E5%9C%A8%E5%AF%B9%E9%BD%90%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%B1%85%E4%B8%AD%E6%96%B9%E7%A8%8B.png)
我想将第三个方程置于中心,然后将其与箭头对齐。这可能吗?
\begin{align}
\intertext{Volmer-reaction:}
\begin{split}
\text{Acidic electrolyte:\hspace{1cm}} H_{ad}+H^++e^-&\rightarrow(H_2)_{ad}\\
\text{Basic electrolyte:\hspace{1cm}} H_{ad}+H_2O+e^-&\rightarrow (H_2)_{ad}+OH^-.
\end{split}\\
\intertext{Absorption:}
H_{ad} &\rightarrow H_{ab}.
\intertext{Heyrovsky-reaction:}
\begin{split}
\text{Acidic electrolyte:\hspace{1cm}} H_{ad}+H^++e^-&\rightarrow(H_2)_{ad}.\\
\text{Basic electrolyte:\hspace{1cm}} H_{ad}+H_2O+e^-&\rightarrow (H_2)_{ad}+OH^-.
\end{split}\\
\intertext{Tafel-reaction:}
2 H_{ad}&\rightarrow (H_2)_{ad}.
\end{align}
如果有人能帮助我那就太好了:)
答案1
您可以将所有箭头移到中心,前提是:
- 使两个相关左侧的宽度相等,并且
- 将文本排版在一个宽度减小的框中,这样文本就会粘在其左侧,并欺骗 TeX 认为它们只占据减小的宽度。
我热烈建议使用chemformula
。
\documentclass{article}
\usepackage{mathtools}
\usepackage{chemformula}
\newlength{\mylen}
\begin{document}
\sbox0{Acidic electrolyte:}
\sbox2{Basic electrolyte:}
\sbox4{\ch{H_{ad} + H+ + e-}}
\sbox6{\ch{H_{ad} + H2O + e-}}
\setlength{\mylen}{\dimexpr2em+\wd2-\wd0+\wd6-\wd4}
\noindent{Volmer-reaction:}
\begin{align}
\begin{split}
\makebox[2em][r]{Acidic electrolyte:\hspace{\mylen}} \ch{H_{ad} + H+ + e- &-> (H2)_{ad}} \\
\makebox[2em][r]{Basic electrolyte:\qquad} \ch{H_{ad} + H2O + e- &-> (H_2)_{ad} + OH-}
\end{split}\\
\intertext{Absorption:}
\ch{H_{ad} &-> H_{ab}}.
\intertext{Heyrovsky-reaction:}
\begin{split}
\makebox[2em][r]{Acidic electrolyte:\hspace{\mylen}} \ch{H_{ad} + H+ + e- &-> (H2)_{ad}} \\
\makebox[2em][r]{Basic electrolyte:\qquad} \ch{H_{ad} + H2O + e- &-> (H2)_{ad} + OH-}
\end{split}\\
\intertext{Tafel-reaction:}
\ch{2 H_{ad}&-> (H2)_{ad}}
\end{align}
\end{document}