Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
+1 thanks, so when I have to use @{a2} instead of [@{a2}]? –  G M Mar 27 at 14:26
1  
@{<name>} to put a node in an atom and [@{<name>}] to put it in a bond. –  unbonpetit Mar 27 at 17:53
    
Thanks for the help! –  G M Mar 27 at 20:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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