Spacing – Spacing and Fitting a Big Reaction Mechanism with Chemfig

chemfigspacing

I want to replicate the following reaction mechanism:
enter image description here

Problems are:

  • Arrows are not middle centered to the compounds
  • Vertical and horizontal spacing is insufficient and unequal
  • Names appear at different distances
  • I ignore how to make everything fit inside the margins in a centered way (already tried \begin{small} \end{small} and until atom sep=0.1cm)

I thought \hspace{1em} would help, that is why I added it after each compound and arrow. I assigned a letter to each compound:

a = Q

b = 14THQ

c = DHQ

d = PCHA

e = PCHE

f = PCH

g = 58THQ

h = OPA

i = PB

This is my code:

\documentclass{article}
\usepackage[version=4]{mhchem}
\usepackage{mol2chemfig}
\setchemfig{atom sep=0.8cm}
\begin{document}

\begin{center}
\schemestart[0,1,thick]
\chemname{\chemfig{=^[:270]-[:330]=^[:30]-[:90](=^[:150]-[:210])-[:30]=_[:330]-[:270]=_[:210]N(-[:150])}}{Quinoline}\hspace{1em}
\arrow(a--b){<=>}[,0]\hspace{1em}
\chemname{\chemfig{-[:150]-[:210]=^[:150]-[:210]=^[:270]-[:330]=^[:30](-[:90])-[:330]\mcfbelow{N}{H}-[:30](-[:90])}}{14THQ}\hspace{1em}
\arrow(@b--c){<=>}[-90,0]\hspace{1em}
\chemname{\chemfig{-[:270]-[:330]-[:30]-[:90](-[:150]-[:210])-[:30]-[:330]-[:270]-[:210]\mcfbelow{N}{H}(-[:150])}}{DHQ}\hspace{1em}
\arrow(@c--d){<-}[,0]\hspace{1em}
\chemname{\chemfig{NH_2-[:150,,1]-[:210]-[:150]-[:90]-[:30]-[:330](-[:270])-[:30]-[:330]-[:30]}}{PCHA}\hspace{1em}
\arrow(@d--e){<-}[,0]\hspace{1em}
\chemname{\chemfig{-[:180]-[:120]-[:180]=_[:240]-[:180]-[:120]-[:60]-(-[:300])}}{PCHE}\hspace{1em}
\arrow(@e--f){<-}[,0]\hspace{1em}
\chemname{\chemfig{-[:180]-[:120]-[:180]-[:240]-[:180]-[:120]-[:60]-(-[:300])}}{PCH}\hspace{1em}
\arrow(@c--g){<=>}[180,0]\hspace{1em}
\chemname{\chemfig{-[:30]-[:90](-[:150]-[:210]-[:270]-[:330])-[:30]=_[:330]-[:270]=_[:210]N(-[:150])}}{58THQ}\hspace{1em}
\arrow(@g--){<=>}[90,0]\hspace{1em}
\arrow(@b--h){<-}[,0]\hspace{1em}
\chemname{\chemfig{-[:180]-[:120]-[:180]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])-[:60,,,1]NH_2}}{OPA}\hspace{1em}
\arrow(@h--i){<-}[0,0]\hspace{1em}
\chemname{\chemfig{-[:180]-[:240]-[:180]=^[:120]-[:180]-[:240]-[:300]-(-[:60])}}{PB}\hspace{1em}
\schemestop
\end{center}

\end{document}

And this is my ugly result:

enter image description here

Best Answer

To make this kind of reaction mechanism, it is best to use the chemfig program. Chemfig package

I put the name of the molecules using markers, and invisible arrows, instead of using the \chemname command.

\documentclass[margin={2mm 2mm}]{standalone}
\usepackage{tikz}
\usepackage{chemfig}

\begin{document}
\schemestart
%
\chemfig{*6(-=@{a}*6(-N=-=-)-@{c}=-=)}
%
\arrow{<=>}
%
\chemfig{*6(-=@{b}*6(-\chembelow{N}{H}----)-@{d}=-=)}
%
\arrow{->}
%
\chemfig{*6(-=(-NH_2)-@{e}(-[:30]-[:330]-[:30])=-=)}
%
\arrow{->}
%
\chemfig{*6(-=-@{f}(-[:30]-[:330]-[:30])=-=)}
%
\arrow(@{a}--){0}[270,.2]{}\arrow{<=>}[270,1.5]
%
\chemfig{*6(--@{g}*6(-N=-=-)----)}
%
\arrow{<=>}
%
\chemfig{*6(--@{h}*6(-\chembelow{N}{H}----)----)}
%
\arrow{->}
%
\chemfig{*6(--@{i}(-NH_3)-(-[:30]-[:330]-[:30])---)}
%
\arrow{->}
%
\chemfig{*6(-@{j}-=(-[:30]-[:330]-[:30])---)}
%
\arrow{->}
%
\chemfig{*6(-@{k}--(-[:30]-[:330]-[:30])---)}
%
\arrow(@{b}--){0}[270,.2]{}\arrow{<=>}[270,1.5]
%-----------------------------------------
\arrow(@{c}--){0}[90,.4]\parbox{.5cm}{\textbf{Q}}
\arrow(@{d}--){0}[90,.4]\parbox{1cm}{\centering{\textbf{14THQ}}}
\arrow(@{e}--){0}[90,.4]\parbox{1cm}{\centering{\textbf{OPA}}}
\arrow(@{f}--){0}[90,.4]\parbox{1cm}{\centering{\textbf{PB}}}
%
\arrow(@{g}--){0}[270,.4]\parbox{1cm}{\centering{\textbf{58THQ}}}
\arrow(@{h}--){0}[270,.4]\parbox{1cm}{\centering{\textbf{DHQ}}}
\arrow(@{i}--){0}[270,.4]\parbox{1cm}{\centering{\textbf{PCHA}}}
\arrow(@{j}--){0}[270,.1]\parbox{1cm}{\centering{\textbf{PCHE}}}
\arrow(@{k}--){0}[270,.1]\parbox{1cm}{\centering{\textbf{PCH}}}
%
\schemestop
\end{document}

enter image description here