I'm trying to make a figure to show hydrogen bounds. But the figure, draw using chemfig and tikz, but the figure overlaps the surrounding text.
Here is my MWE:
\documentclass{article}
\usepackage{chemfig}
\usepackage{lipsum}
\begin{document}
\lipsum[10]
\begin{figure}[h]
\centering
\begin{tikzpicture}
\schemestart
\draw (0,0) node {\chemfig{H-@{doublet}\charge{[circle]270=\|,340=\|}{O}-[:75]H}}
(340:3) node [rotate=-20] {\chemfig{{@{hydrogene}H-\charge{[circle]270=\|,340=\|}{O}-[:75]H}}};
\schemestop
\chemmove{\draw [dashed,-] (doublet.340)--(hydrogene.160);}
\end{tikzpicture}
\caption{Schématisation d'une liaison hydrogène dans l'eau}
\label{fig:liaisonH}
\end{figure}
\lipsum[1]
\end{document}
As the chemfig/tikz code is obviously not perfect, any help to improve it is welcome. My primary concern is about the overlap between the figure and the text.
Edit: I found an unsatisfaying way to get it right: I added \vspace{1cm}
before the picture and the caption. And then it almost looks like what I want:
I would prefer: the figure centered, and if someone wants to correct the figure, the dashed line should go from O to H.
\schemestart
are you making a reaction scheme?