[Tex/LaTex] How to line up the arrow and structure in chemfig

chemfig

I have the following problems:

  1. in the first reaction scheme the arrow is too high and I would like to bring it a little down.

  2. in the second reaction scheme the third chemical structure (after the arrow) is a little bit low and I would like to bring it up.

  3. in the third structure I would like to connect A to C not to B.

Thanks a lot.

\documentclass[12pt,doublespacing,letterpaper]{report}

\usepackage{chemfig}

\begin{document}

\setatomsep{2em}
\setbondoffset{1pt}
\setdoublesep{3pt}
\setbondstyle{line width=1pt}

\schemestart[0,1.2,thick]
\chemfig{R_3B}
\+
\chemfig{CH_2=CH-C(=[:90]O)-CH_3}
\arrow{%
->[\footnotesize H$_2$O]%
  []%
 }[,2,thick]
 \chemfig{R-CH_2-CH-C(=[:90]O)-CH_3}
\schemestop

\bigskip

\schemestart[0,2,thick]
  \scriptsize\chemfig{[:-30]*6(-=-(-[,1.2]BF_3K)=-=)}
  \arrow{0}[,0]\+{1em,1em ,17pt}
  \scriptsize\chemfig{HO-[:75,,2](-[:115])(-[:150])-(-[:65]OH)(-[:-45])-[:-90]}
 \arrow{%
 ->[\footnotesize SiO$_2$]%
  [\footnotesize H$_2$O]%
  }
  \scriptsize\chemfig{*6(-=-(-[,1.1]B?-[:60,1.1]O-[:10](-[:60])(-[:20])-[:-60](-[:45])(-[:-5])-[:-145]O-[:-195]?)=-=-)}
\schemestop

\bigskip

\scriptsize\chemfig{*6(-=-(-A(-[:90]B*5(-C-*6(-=-=-)=-D=))-[:-30,1.2]OEt)=-=)}

\end{document}

reaction scheme

Best Answer

For the alignment issues: you can use anchors as described in section 5 Anchoring of part IV Reaction Schemes in the chemfig manual. Basically this is done using the following syntax:

\arrow(.<anchor>--.<anchor>)

where <anchor> is either the name of the TikZ anchor or the value of a angle. The code below uses

\arrow(.mid east--.mid west)

for the first scheme and

\arrow(--.-162.5)

for the second. You can find details on anchoring both in the chemfig manual and of course in the pgfmanual.

As for the “issue” with the connection of atoms: just draw it the way you want it. Stupid as this sounds it is exactly what I changed in your molecule. The important part is

B*5(-C-*6(-=-=-)=-D=)

“Rotating” the ring by one bond you get what you need:

C*5(-*6(-=-=-)=-D=B-)

The code below also fixes the erroneous redefinition of \printatom and moves it and the other global settings into the preamble (where they belong, IMHO). I also added indentation to make the code more readable.

enter image description here

\documentclass[12pt,doublespacing,letterpaper]{report}

\usepackage{chemfig}

\setatomsep{2em}
\setbondoffset{1pt}
\setdoublesep{3pt}
\setbondstyle{line width=1pt}

\renewcommand\printatom[1]{%
  \fontsize{11pt}{11pt}\selectfont
  \ensuremath{\mathrm{#1}}%
}

\begin{document}

\schemestart[0,1.2,thick]
  \chemfig{R_3B}
  \+
  \chemfig{CH_2=CH-C(=[:90]O)-CH_3}
  \arrow(.mid east--.mid west){%
    ->[\footnotesize H$_2$O]%
  }[,2,thick]
  \chemfig{R-CH_2-CH-C(=[:90]O)-CH_3}
\schemestop

\bigskip


\schemestart[0,2,thick]
  \scriptsize
  \chemfig{[:-30]*6(-=-(-[,1.2]BF_3K)=-=)}
  \arrow{0}[,0]\+{1em,1em ,17pt}
  \scriptsize
  \chemfig{HO-[:75,,2](-[:115])(-[:150])-(-[:65]OH)(-[:-45])-[:-90]}
  \arrow(--.-162.5){%
    ->[\footnotesize SiO$_2$]%
      [\footnotesize H$_2$O]%
  }
  \scriptsize
  \chemfig{
    *6(-=-(
      -[,1.1]B?-[:60,1.1]O-[:10](-[:60])(-[:20])
      -[:-60](-[:45])(-[:-5])
      -[:-145]O-[:-195]?
    )=-=-)
  }
\schemestop


\bigskip

\scriptsize
\chemfig{
  *6(-=-(
    -A(-[:90]C*5(-*6(-=-=-)=-D=B-))
    -[:-30,1.2]OEt)
  =-=)
}

\end{document}
Related Question