5

I'm trying to draw mesomeric effect for a molecule using chemfig I would like to create something like this:

enter image description here

From the documentation page (see chapter 11 "Representing electron movements")seems easy but I've spent the last 4 hours without any success. The first arrow is the most difficult because goes form lewis pair to the bond.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{chemfig}
\usepackage{tikz}
\setlewis{4pt}{0.8em}{black}
\begin{document}
\chemfig{*6((-H_{2}@{sb1}\lewis{26,N}{\hspace{7mm}\scriptstyle})@{dncc}=-=(-N=N-*6(=-=(-OH)-=-))-=-=)}
\chemmove{
\draw[->](sb1)..controls +(90:4mm) and +(45:4mm)..(dncc);}
\end{document}

This is the molecule without anything else:

\chemfig{*6((-H_{2}\lewis{26,N}{\hspace{7mm}\scriptstyle})=-=(-N=N-*6(=-=(-OH)-=-))-=-=)}

If possible I would like an explanation of my faults!

6

Here is how to draw the 2 first arrows:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{*6((-[@{a1}]H_2@{a2}\Lewis{26,N})=[@{r1}]-[@{r2}]=(-N=N-*6(=-=(-OH)-=-))-=-=)}
\chemmove[-stealth,shorten <=1pt, shorten >=1pt]{%
    \draw(a2)..controls +(90:5mm) and +(135:5mm)..(a1);% first arrow
    \draw(r1)..controls +(225:12mm) and +(300:12mm)..(r2);% ring arrow
    }
\end{document}

enter image description here

  • 1
    +1 thanks, so when I have to use @{a2} instead of [@{a2}]? – G M Mar 27 '14 at 14:26
  • 2
    @{<name>} to put a node in an atom and [@{<name>}] to put it in a bond. – unbonpetit Mar 27 '14 at 17:53

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.