How to make the arrow in a chemical formula shorter? (using mhchem)
\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}