5

My Code is:

\documentclass[12pt,letterpaper]{report}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}

\usepackage{chemfig}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{
  elmove/.style={-{Stealth[#1]},shorten >=3pt,shorten <=2pt}
}

\begin{document}
\begin{center}
\schemestart
\chemfig{@{Cl}\lewis{0.2:4:6:,Cl}}
\chemsign{+}\arrow(--nb){0}[,.2]
 \mbox{}
 \arrow{0}[,.2]\chemfig{H-[@{b}]@{C}CH_3}
 \schemestop
\chemmove{
 \draw[elmove=right, bend right]
  (Cl) ..controls +(30:7mm) and +(115:7mm) .. (nb) ;
 \draw[elmove=left]
  (b) ..controls +(90:7mm) and +(75:7mm) .. (nb) ;
  \draw[elmove=right]
  (b) ..controls +(-90:7mm) and +(-90:7mm) .. (C) ;
 }
 \end{center}\par
 \end{document}

I wanted to reproduce this: enter image description here

I got this so far:

enter image description here

3

Here is what I would probably do: you already found out about the 0 arrow. It can be combined with the fact that everything between two arrows again is a node that can be referred to. chemfig names them consecutively c1, c2, ... (you can check the nodes and their names placing \schemedebug{true} befor the scheme starts). However, the \arrow macro allows to give them custom names as well:

\arrow(name1--name2)

names the node before the arrow name1 and the following node name2.

We can use this to place the plus in a node itself and refer to it in \chemmove:

\documentclass{article}

\usepackage{chemfig}
% \usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{
  elmove/.style={-{Stealth[#1]},shorten >=3pt,shorten <=2pt}
}

\begin{document}

\begin{center}
  \schemestart
    \chemfig{@{Cl}\lewis{0.2:4:6:,Cl}}
    \arrow(--plus){0}[,0]% empty error with 0 length
    \+
    \arrow{0}[,0]
    \chemfig{H-[@{b}]@{C}CH_3}
  \schemestop
  \chemmove{
    \draw[elmove=right, bend right]
      (Cl) ..controls +(10:2mm) and +(100:10mm) .. (plus) ;
    \draw[elmove=left]
      (b) ..controls +(90:7mm) and +(80:7mm) .. (plus) ;
    \draw[elmove=right]
      (b) ..controls +(-90:7mm) and +(-90:7mm) .. (C) ;
 }
\end{center}

\end{document}

enter image description here

This can easily be extended to add another empty compound above the +, or in a certain angle to it by adding \arrow(@plus--nb){0}[45,.05]\null (or similar) to the scheme. This will create an invisible arrow starting at the plus node in an angle of 45 degrees and .05 of the usual length, ending in a node named nb. (\null is another way of writing \mbox{} and is needed because the empty compound cannot be completely empty if you want to refer to it.) This way it is possible to reach any point in the vicinity of the + rather easy.

Another and arguably easier way to get to a place near the plus node is using something like

\path (plus) ++(45:4mm) coordinate (nb) ;

inside \chemmove naming a point relative (using the ++ syntax for coordinates) to the plus node.

In both variants nb now is a node above right of the +.

\documentclass{article}

\usepackage{chemfig}
% \usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{
  elmove/.style={-{Stealth[#1]},shorten >=3pt,shorten <=2pt}
}

\begin{document}

\begin{center}
  \schemestart
    \chemfig{@{Cl}\lewis{0.2:4:6:,Cl}}
    \arrow(--plus){0}[,.1]% empty error
    \+
    \arrow{0}[,.1]
    \chemfig{H-[@{b}]@{C}CH_3}
  \schemestop
  \chemmove{
    \path (plus) ++(45:4mm) coordinate (nb) ;
    \draw[elmove=right]
      (Cl) ++(.25,0) ..controls +(90:4mm) and +(100:12mm) .. (nb) ;
    \draw[elmove=left]
      (b) ..controls +(90:7mm) and +(80:7mm) .. (nb) ;
    \draw[elmove=right]
      (b) ..controls +(-90:7mm) and +(-90:7mm) .. (C) ;
 }
\end{center}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.