0

I've just started using chemfig. I am quite new to LaTeX and don't understand a lot of the package's nuances. I am trying to create this diagram: enter image description here

I am having trouble properly placing the charge on the oxygen atom without affecting the lone electron pairs. I'm also having trouble figuring out how to add the arrows and the hydroxide ion in the bottom left. Here is what I currently have

\chemfig{H_3C-[:0,0.6](-[:-60,0.6]\lewis[0.5]{4:7:,O}-[:0,0.6]-[:-60,0.6]CH_3)(=[:60,0.6]\lewis[0.5]{3:0:,O})} \ce{<=>} \chemfig{(-[:0,0.6]\lewis[0.5]{5:7:,O}-[:30,0.6]-[:0,0.6]CH_3)(-[:90,0.6]\lewis{0:2:4:,O\rlap{${}^{-}$}})(-[:180,0.6]H_3C)(-[:-90,0.6]\lewis{4:6:,O}H)}

enter image description here

Any help is greatly appreciated!

2

I simplified your example in order to have a more compact code. However, you need to have some understanding of how to use TikZ package.

I am having trouble properly placing the charge on the oxygen atom without affecting the lone electron pairs.

You can place the charge on the oxygen atom by moving \rlap out of the lewis diagram and then raising it:

\lewis{0:2:6:,O}\raisebox{1mm}{\rlap{${}^{-}$}}

I'm also having trouble figuring out how to add the arrows

Electron movement can be shown as follows:

  1. Put departure and arrival points of the electron by placing @{one} and @{two} markers on the bond:

    (=[@{one}:60,0.6]@{two}\lewis[0.5]{3:0:,O})
    
  2. Draw an arrow from start departure (named one in the example) to the arrival point (two):

    \draw[shorten <=4pt,shorten >=2pt] (one) .. controls +(335:4mm) and +(320:5mm) .. (two);
    

...and the hydroxide ion in the bottom left

Put the hydroxide ion in the bottom left by drawing TikZ node:

\tikz[remember picture]\node(n0)[yshift=-4mm]{\chemfig{H\lewis{0:2:6:,O}\raisebox{1mm}{\rlap{${}^{-}$}}}};

And finally, draw an arrow towards to upper folmula:

\draw[shorten <=4pt,shorten >=5pt] (n0) .. controls +(100:2mm) and +(220:7mm) .. (three);

Please find the full MWE below:

\documentclass[a4paper]{article}
\usepackage{chemfig}
\parskip=0.1in
\begin{document}
\chemfig{H_3C-[:0,0.6]@{three}(-[:-60,0.6]\lewis[0.5]{4:7:,O}-[:0,0.6]-[:-60,0.6]CH_3)
    (=[@{one}:60,0.6]@{two}\lewis[0.5]{3:0:,O})}
\par
\tikz[remember picture]\node(n0)[yshift=-4mm]{\chemfig{H\lewis{0:2:6:,O}\raisebox{1mm}{\rlap{${}^{-}$}}}};
\chemmove{
  \draw[shorten <=4pt,shorten >=2pt] (one) .. controls +(335:4mm) and +(320:5mm) .. (two);
  \draw[shorten <=4pt,shorten >=5pt] (n0) .. controls +(100:2mm) and +(220:7mm) .. (three);
}
\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.