箭头的尖端位置不正确,它们稍微向左偏移了。有人知道如何修复它以便它们可以位于中间吗?
\documentclass{article}
\usepackage{chemformula}
\usepackage{chemfig}
\usepackage{chemmacros}
\begin{document}
\schemestart
\chemfig{@{a1}Cl-[@{a2},.8]@{a3}\textcolor{red}{H}}
\+
\chemfig{@{a4}\textcolor{blue}{\charge{0=\: , 180=\:}{O}}(-[:65,.6]H)-[:-65,.6]H}
\ch{<>}
\chemfig{\textcolor{blue}{\charge{0=\: , 125:3pt=\scriptsize $ \oplus $}{O}}(-[:65,.6]H)(-[:180,.6]\textcolor{red}{H})-[:-65,.6]H}
\+
\chemfig{\charge{25:3pt=\scriptsize $\ominus$}{Cl}}
\schemestop
\chemmove{
\draw(a2)..controls +(85:4mm) and +(105:4mm)..(a1);
\draw(a4.135)..controls +(100:4.5mm) and +(80:4.5mm)..(a3);}
\end{document}
答案1
当我在最新版本的 latex(texlive 2023)中编译您的代码时,结果还不错。
我调整了箭头上的一些数字,并添加了一些选项。
\documentclass{article}
\usepackage{chemformula}
\usepackage{chemfig}
\usepackage{chemmacros}
\begin{document}
\schemestart
\chemfig{@{a1}Cl-[@{a2},.8]@{a3}\textcolor{red}{H}}
\+
\chemfig{@{a4}\textcolor{blue}{\charge{0=\:,180=\:}{O}}(-[:65,.6]H)-[:-65,.6]H}
\ch{<>}
\chemfig{\textcolor{blue}{\charge{0=\: , 125:3pt=\scriptsize $ \oplus $}{O}}(-[:65,.6]H)(-[:180,.6]\textcolor{red}{H})-[:-65,.6]H}
\+
\chemfig{\charge{25:3pt=\scriptsize $\ominus$}{Cl}}
\schemestop
\chemmove{
\draw[red,shorten <=1pt,shorten >=1pt](a2)..controls +(90:4mm) and +(80:6mm)..(a1);
\draw[red,shorten <=3pt,shorten >=1pt](a4.180)..controls +(90:8mm) and +(80:5mm)..(a3);}
\end{document}
答案2
作为@CrocoDuck 的好答案的一个小变化:你可以使用to
路径操作而不是贝塞尔曲线来获得看起来更对称的箭头:
\documentclass{article}
\usepackage{chemformula}
\usepackage{chemfig}
\usepackage{chemmacros}
\begin{document}
\schemestart
\chemfig{@{a1}Cl-[@{a2},.8]@{a3}\textcolor{red}{H}}
\+
\chemfig{@{a4}\textcolor{blue}{\charge{0=\:,180=\:}{O}}(-[:65,.6]H)-[:-65,.6]H}
\ch{<>}
\chemfig{\textcolor{blue}{\charge{0=\: , 125:3pt=\scriptsize $ \oplus $}{O}}(-[:65,.6]H)(-[:180,.6]\textcolor{red}{H})-[:-65,.6]H}
\+
\chemfig{\charge{25:3pt=\scriptsize $\ominus$}{Cl}}
\schemestop
\chemmove{
\draw[red,shorten <=1pt,shorten >=1pt](a2) to [out=90,in=80,looseness=2.5] (a1);
\draw[red,shorten <=3pt,shorten >=1pt](a4.180) to [out=100,in=80,looseness=1.5] (a3);}
\end{document}