8

I need to draw a scheme to show the stabilization of the acetate ion by resonance and I'm going crazy :-( I started using chemfig not so long ago and it seems that I need a lot more practice! In the meanwhile, can anybody help me solve the problem? I would like something like this enter image description here

But I failed already by adding the first arrow :-(

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
\chemfig{R-C(=[1]{@{a1}\lewis{2:0:,O}})[@{db}](-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\ominus}}}})}
\arrow{<->}
\chemfig{R-C(=[1]{\lewis{2:0:,O}})(-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\ominus}}}})}
\arrow{<->}
\chemfig{R-C(=[1]{\lewis{2:0:,O}})(-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\ominus}}}})}
\schemestop
\chemmove{\draw(db).. controls +(100:5mm) and +(145:5mm).. (a1);}
\end{document}
siracusa
  • 13,411
Sam
  • 81

2 Answers2

8

Probably something like this?

Acetate resonance structures

\documentclass[
    crop,
    border=5,
    tikz=true,
    multi={page},
    12pt
]{standalone}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{chemmacros}
\chemsetup{
    modules = all,
}
\usepackage{chemfig}
    \setchemfig{
        angle increment = 15,
        atom sep = \bndlen,
        bond offset = 0.5pt,
        double bond sep = 3pt,
        compound sep = 5.0em,
        arrow coeff = 1,
        arrow offset = 12pt,
        scheme debug = false,
        bond join = true,
        chemfig style={line width=\lnwidth},
        arrow style={line width=\lnwidth},
    }

\newcommand{\bndlen}{2.0em}
\newcommand{\lnwidth}{0.7pt}

\begin{document}

\begin{page}
\schemestart
    \chemleft{[}
    \subscheme{
        \chemfig{
            CH_3
            -C
            (-[::-45]\lewis{1:5:7:,O}\rlap{\color{purple}{${\ }^-$}})
            =[@{b1}::45]@{o1}\lewis{1:3:,O}
        }
        \arrow{<->}
        \chemfig{
            CH_3
            -C\rlap{\color{teal}{${}^+$}}
            (-[@{b2}::-45]\lewis{1:5:7:,O}@{o2}\rlap{\color{purple}{${\ }^-$}})
            -[::45]\lewis{1:3:7:,O}\rlap{\color{purple}{${\ }^-$}}
        }
        \arrow{<->}
        \chemfig{
            CH_3
            -C
            (=[::-45]\lewis{5:7:,O})
            -[::45]\lewis{1:3:7:,O}\rlap{\color{purple}{${\ }^-$}}
        }
        \chemmove{
            \draw[shorten <=3pt,shorten >=1pt,purple](b1)..controls +(-15:10mm) and +(-30:5mm)..(o1);
            \draw[shorten <=3pt,shorten >=1pt,purple](o2)..controls +(90:5mm) and +(45:5mm)..(b2);
        }
    }
    \chemright{]}
\schemestop
\end{page}

\end{document}

Also, if you are after a picture-perfect replica, note that the font family used in your illustration is most likely proprietary ITC New Baskerville. In order to use it, you have to obtain the font or use a free alternative from The LaTeX Font Catalogue; it would be easier to compile with XeLaTeX at this point.

andselisk
  • 2,675
  • 2
    Both your and leandris answers are great. May I suggest a tiny change? If you add \tikzset{andselisk/.style={out=-70,in=-100,relative,looseness=2}}, you could draw the bent arrows with \draw[andselisk,shorten <=3pt,shorten >=1pt,purple](b1) to (o1);. The combination of in, out and relative would spare the user from adding different control points for every annotation. –  Nov 11 '19 at 23:23
6

Here are two possible version of the first reaction step with two variants of the arrow. The exact parameters might however still need some fine tuning.

enter image description here

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
\chemfig{R-C(=[@{db}1]{@{a1}\lewis{2:0:,O}})(-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\ominus}}}})}
\schemestop
\chemmove{\draw(db).. controls +(100:5mm) and +(145:5mm).. (a1);}

\vspace{1.5cm}

\schemestart
\chemfig{R-C(=[@{db}1]{@{a1}\lewis{2:0:,O}})(-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\ominus}}}})}
\schemestop
\chemmove{\draw[shorten <=4pt,shorten >=4pt](db).. controls +(10:5mm) and +(-10:10mm).. (a1);}
\end{document}

With color:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
\chemfig{R-C(=[@{db}1]{@{a1}\lewis{2:0:,O}})(-[7]{\lewis{0:4:6:,{\chemabove{O}{\scriptstyle\hspace{3mm}\color{red}\ominus}}}})}
\schemestop
\chemmove{\draw[shorten <=4pt,shorten >=4pt, color=red](db).. controls +(10:5mm) and +(-10:10mm).. (a1);}
\end{document}
leandriis
  • 62,593
  • Please can you put, if possible, also the colours that is, IMHO, more very nice? +1 now. – Sebastiano Nov 10 '19 at 20:52
  • 1
    @Sebastiano: I added a second MWE showing how to change the color of the charge symbol as well as of the curved arrow. – leandriis Nov 10 '19 at 21:26
  • 1
    I hope I didn't bother you. With the colors it certainly looks more pleasant. Thank you for your patience. I have seen that your code with color has this error: Package pgf Error: No shape named a1 is known. [...controls +(10:5mm) and +(-10:10mm).. (a1);}] – Sebastiano Nov 10 '19 at 21:27
  • @Sebastiano Indeed. I think curly brackets around @{a1}\lewis{2:0:,O} should be removed. – andselisk Nov 11 '19 at 05:49
  • @andselisk I will wait for the answer of the very good user leandriis. My best regards. – Sebastiano Nov 11 '19 at 12:43