\documentclass[10pt]{article}
\usepackage{chemfig}
\usepackage[margin=1.2in]{geometry}
\newcommand{\chem}{\setatomsep{2em}\chemfig}
\begin{document}
\begin{itemize}
\item[--] 1$^\circ$ Alcohol $\rightarrow$ Aldehyde\\
\centerline{\schemestart
\chem{R-C(-[2]OH)(-[6]H)-H} \arrow{0}[,0] \+ [O] \arrow \chem{R-[:30]C(=[2]O)-[:-30]H} \arrow{0}[,0] \+ H$_2$O
\schemestop}
\end{itemize}
\end{document}
The above gives:
Overfull \hbox (25.00003pt too wide) in paragraph
It was working but now it doesn't, how can I fix it?
\documentclass{...}
and ending with\end{document}
.\newcommand{\chem}{\setatomsep{2em}\chemfig}
is to have a command that's supposed to locally use anatomsep
of2em
? If yes then the definition is wrong since the scope is not local to\chem
. It simply sets theatomsep
to2em
for all following appearances of\chemfig
. It works in your MWE since the scheme places its compounds into TikZ nodes which are TeX groups. So it probably doesn't matter if you only use\chem
inside\schemestart ...\schemestop
. But it you use it anywhere else in the document beware to use it inside a group.