.png)
Estoy usandomhchemescribir una fórmula química, como en el ejemplo declemenes(mostrado a continuación). ¿Hay alguna manera de acortar la flecha principal ->
en un valor fijo en la segunda ecuación?
Aquí está el código:
\documentclass{article}
\usepackage[version=4]{mhchem}
\begin{document}
\ce{Na2SO4 ->[H2O] Na+ + SO4^2-}
\ce{(2Na+,SO4^2- ) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}
\end{document}
Respuesta1
\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}
Respuesta2
Teniendo en cuenta las etiquetasecuaciones,longitudes, también podrías construir tu reacción química usando el comando básico de LaTeX. Con \xrightarrow{\hspace*{6cm}}
(por ejemplo) puedes aumentar o disminuir la longitud de las flechas. Todas las ecuaciones están alineadas.
\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}