mhchem パッケージを使用して、水性炭酸イオンの式を書きたいと思います。 CO3^{2-} と書き出すと、正しい形になります。(画像を参照してください。)
しかし、私は次のように書きたいのです: CO3^{2-}_{(aq)}。2- 電荷は (aq) 状態記号の右側に移動します。(画像を参照してください。)
これを修正する方法はありますか?
答え1
\documentclass[a4paper,12pt]{article}
\usepackage{mhchem}
\begin{document}
\ce{CO3^{2-}_{\rlap{(aq)}}\; ->}
\end{document}
\rlap
コンテンツの幅が抑制されるため、\;
正しい間隔を取得するには が必要です。
答え2
使用できます{}_{(aq)}
\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}
\noindent IUPAC recommendation:\\
\ce{2H+(aq) + CO3^{2-}(aq) -> CO2(g) + H2O(l)}
\bigskip
\noindent Subscript:\\
\ce{2H+{}_{(aq)} + CO3^{2-}{}_{(aq)} -> CO2{}_{(g)} + H2O{}_{(l)}}
\end{document}
答え3
パッケージを切り替えても構わない場合:chemformula
パッケージと パッケージを組み合わせることで、chemmacros
さまざまな出力が可能になります。
\documentclass{article}
\usepackage{chemmacros}
\begin{document}
IUPAC recommendation:\par
\ch{2 H+ \aq{} + CO3^2- \aq -> CO2 \gas{} + H2O \lqd}
\bigskip
\chemsetup{phases/pos=sub}
subscript phase descriptors after the compounds:\par
\ch{2 H+ \aq{} + CO3^2- \aq -> CO2 \gas{} + H2O \lqd}
\bigskip
phase descriptors as subscripts to the compounds directly:\par
\ch{2 H^+_{(aq)} + CO3^{2-}_{(aq)} -> CO2_{(g)} + H2O_{(l)}}
\bigskip
as before but disabled horizontal shift of the charge of \ch{H+}:\par
\ch{@{charge-hshift=0pt} 2 H^+_{(aq)} + CO3^{2-}_{(aq)} -> CO2_{(g)} + H2O_{(l)}}
\end{document}