
答案1
\documentclass{article}
\usepackage[version=4]{mhchem}
\ExplSyntaxOn
\keys_define:nn { mhchem }
{
arrow-min-length .code:n =
\cs_set:Npn \__mhchem_arrow_options_minLength:n { {#1} } % default is 2em
}
\ExplSyntaxOff
\begin{document}
\ce{(2Na+,SO4^2- ) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}
\mhchemoptions{arrow-min-length=1em}
\ce{(2Na+,SO4^2- ) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}
\mhchemoptions{arrow-min-length=10em}
\ce{(2Na+,SO4^2- ) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}
\end{document}
答案2
考慮標籤方程式,長度,您也可以使用 LaTeX 的基本命令來建立化學反應。使用\xrightarrow{\hspace*{6cm}}
(例如),您可以增加或減少箭頭的長度。方程式全部對齊。
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[
\begin{aligned}
\mathrm{Na}_2\mathrm{SO}_6 & \overset{\mathrm{H}_2\mathrm{O}}{\longrightarrow} \mathrm{Na}^+ + \mathrm{SO}_4^{2-}\\
(2\mathrm{Na}^+\mathrm{SO}_4^{2-})+(\mathrm{Ba}^{2+}, 2\mathrm{Cl}^-) & \longrightarrow \mathrm{Ba}\mathrm{SO}_4\!\downarrow+2\mathrm{NaCl} \\
\mathrm{Na}_2\mathrm{SO}_6 & \overset{\mathrm{H}_2\mathrm{O}}{\xrightarrow{\hspace*{5cm}}} \mathrm{Na}^+ + \mathrm{SO}_4^{2-}\\
(2\mathrm{Na}^+\mathrm{SO}_4^{2-})+(\mathrm{Ba}^{2+}, 2\mathrm{Cl}^-) & \xrightarrow{\hspace*{6cm}} \mathrm{Ba}\mathrm{SO}_4\!\downarrow+2\mathrm{NaCl}
\end{aligned}
\]
\end{document}