EDIT: I now know what causes the problem.
I failed to mention in this post that I used a header file and the command \include.
I thought it would make no difference, and I was wrong.
\input, however, works as expected.
I'm trying to put curvedarrows in my chemfig diagrams but the curved arrows are placed beside the whole scheme instead of on top.
Screenshot of my unfinished reaction scheme:
You can see the curved arrow to the right of the imine molecule, even though I've placed the nodes on the aldehyde.
I tried to draw the aldehyde on its own with the curved arrow too, but it failed just the same.
And the relevant code:
\documentclass[a4paper]{article}
\usepackage{chemfig}
\usepackage{mhchem}
\begin{document}
\setchemfig{atom sep=2em}
\begin{figure}[h]
\centering
\scriptsize
\sffamily
\mhchemoptions{font=sf}
\schemestart
\chemfig{(-[:-150]R)(=[@{db}:90]@{o}O)-[:-30]H}
+
\chemfig{N(-[:-150]H)(-[:90]H)-[:-30]R}
\arrow(s1--int){<=>[\ce{H+}]}
\chemname{\chemfig{(-[:-150]R)(-[:120]HO)(-[:60]N(-[:120]H)-[:0]R)-[:-30]H}}{hemiaminal}
+
\arrow{<=>[\ce{H+}]}
\chemname{\chemfig{(-[:-150]R)(=[:90]N-[:30]R)-[:-30]H}}{imine}
\arrow(@s1--s2){<=>[\ce{H+}]}[-90]
\schemestop
\chemmove{\draw(db)..controls +(-30:4mm) and +(0:4mm)..(o);}
\end{figure}
\end{document}
\documentclass[a4paper]{article}
\usepackage{chemfig}
\usepackage{mhchem}
\begin{document}
\setchemfig{atom sep=2em}
\begin{figure}[h]
\centering
\scriptsize
\sffamily
\mhchemoptions{font=sf}
\schemestart
\chemfig{(-[:-150]R)(=[@{db}:90]@{o}O)-[:-30]H}
\schemestop
\chemmove{\draw(db)..controls +(-30:4mm) and +(0:4mm)..(o);}
\end{figure}
\end{document}
The chemfig manual mentions something about the viewer supporting "picture remembering", but I have no idea what this means.
Thanks for any and all help.
Edited to make the code compilable


latexmkfor auto-compilation, so that shouldn't be an issue. I've also tried withpdflatexand even Overleaf as a desperate last-attempt. Recompiling does not fix the issue. – ajzcole May 24 '21 at 22:40