0

Why these two arrows aren't in their places? First two chemmoves lines are in properly positions, and other two are something else and I can't find a problem in code. I compiled it few times.

Also I'd like to put the fourth structure above the second arrow, is it possible to put arrows there?

\schemestart
        \chemfig{@{b1}\charge{-50:2pt=$\scriptsize\ominus$}{C}(-[:30,.6]Z)(-[:150,.6]Z)-[:-120,.6]H}
        \hspace*{1cm}
        \chemfig{@{b2}C(-[:120,.6]R)(-[:-120,.6]H)=[@{b3},.6]@{b4}\charge{0=\|,-90=\|}{O}}
        \arrow{<=>}
        \chemfig{@{a5}C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]@{o1}\charge{45:2pt=$\scriptsize\ominus$}{O}}
        \+
        \chemfig{@{n1}\charge{140:2pt=$\scriptstyle\oplus$}{N}(-[:115,.6]H)(-[@{b5}:-135,.6]@{h2}H)-[:60,.6]-[:0,.6]-[:-60,.6]-[:-120,.6]-[:180,.6]-[:120,.6]}
        \arrow{<=>}
        \chemfig{C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]\charge{90=\|,0=\|}{O}-[:-90,.6]H}
    \schemestop
        \chemmove[-stealth,red]{
        \draw[shorten <=8pt,shorten >=1pt](b1).. controls +(-45:15mm) and +(180:8mm).. (b2);
        \draw[shorten <=2pt,shorten >=2pt](b3).. controls +(100:5mm) and +(90:5mm).. (b4);
        \draw[shorten <=8pt,shorten >=2pt](o1).. controls +(45:4mm) and +(160:4mm).. (h2);
        \draw[shorten <=2pt,shorten >=2pt](b5).. controls +(120:4mm) and +(180:4mm).. (n1);
        }

enter image description here

1 Answer 1

4

something like this?

arrows 3 and 4 required small adjustments in angles and lengths, that's all.

The ring in the fourth molecule was wrong, I rewrote the molecule.

\documentclass[border=2mm]{standalone}
\usepackage{chemfig} 
\begin{document} 

\schemestart
\chemfig{@{b1}\charge{-50:2pt=$\scriptsize\ominus$}{C}(-[:30,.6]Z)(-[:150,.6]Z)-[:-120,.6]H}
\hspace*{1cm}
\chemfig{@{b2}C(-[:120,.6]R)(-[:-120,.6]H)=[@{b3},.6]@{b4}\charge{0=\|,-90=\|}{O}}
\arrow{<=>}
\chemfig{@{a5}C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]@{o1}\charge{45:2pt=$\scriptsize\ominus$}{O}}
%
\arrow{<=>[\chemfig{@{n1}\charge{140:2pt=$\scriptstyle\oplus$}{N}*6([,.5]------)(-[:115,.6]H)(-[@{b5}:-135,.6]@{h2}H)}]}[,2]
%
\chemfig{C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]\charge{90=\|,0=\|}{O}-[:-90,.6]H}
\schemestop
\chemmove[-stealth,red]{
    \draw[shorten <=8pt,shorten >=1pt](b1).. controls +(-45:15mm) and +(180:8mm).. (b2);
    \draw[shorten <=2pt,shorten >=2pt](b3).. controls +(100:5mm) and +(90:5mm).. (b4);
    \draw[shorten <=8pt,shorten >=2pt](o1).. controls +(40:6mm) and +(150:6mm).. (h2);
    \draw[shorten <=2pt,shorten >=0pt](b5).. controls +(150:6mm) and +(180:4mm).. (n1);
}
\end{document} 

enter image description here

Compiling with XeLatex, a solution shown determines that the problem is in the \arrow command and a workaround and placing the \arrow command inside a \subscheme

\documentclass[border=2mm]{standalone}
\usepackage{chemfig} 
\begin{document} 

\schemestart
\chemfig{@{b1}\charge{-50:2pt=$\scriptsize\ominus$}{C}(-[:30,.6]Z)(-[:150,.6]Z)-[:-120,.6]H}
\hspace*{1cm}
\chemfig{@{b2}C(-[:120,.6]R)(-[:-120,.6]H)=[@{b3},.6]@{b4}\charge{0=\|,-90=\|}{O}}
\subscheme{\arrow{<=>}}
\chemfig{@{a5}C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]@{o1}\charge{45:2pt=$\scriptsize\ominus$}{O}}
\+ 
\chemfig{@{n1}\charge{120:2pt=$\scriptstyle\oplus$}{N}*6([,.5]------)(-[:150,.6]H)(-[@{b5}:-135,.6]@{h2}H)}
\subscheme{\arrow{<=>}}
\chemfig{C(-[:30,.6]Z)(-[:150,.6]Z)(-[:-130,.6]H)-[:-60,.6](-[:-120,.6]R)-[,.6]\charge{90=\|,0=\|}{O}-[:-90,.6]H}
%------------------------------------
\chemmove[-stealth,red]{
    \draw[shorten <=8pt,shorten >=1pt](b1).. controls +(-45:15mm) and +(180:8mm).. (b2);
    \draw[shorten <=2pt,shorten >=2pt](b3).. controls +(100:5mm) and +(90:5mm).. (b4);
    \draw[shorten <=8pt,shorten >=2pt](o1).. controls +(40:6mm) and +(150:6mm).. (h2);
    \draw[shorten <=2pt,shorten >=0pt](b5).. controls +(150:6mm) and +(180:4mm).. (n1);
}
\schemestop
\end{document} 

enter image description here

4
  • Im using TeXstudio and XeLaTeX as compiler, but it still doesnt work Commented Apr 17 at 0:54
  • The same thing happens when I compile in XeLatex. I don't know the cause of the problem. Suggestion: compile the reaction in pdflatex with \documentclass{standalone}, as in the answer I sent. This will create a PDF file with the image, which can then be inserted into the document as an image.
    – CrocoDuck
    Commented Apr 17 at 3:23
  • Compilation with XeLatex, there is a workaround, see the addition to my answer. but in this case, molecule 4 cannot stay on the arrow
    – CrocoDuck
    Commented Apr 17 at 3:43
  • Yeah thats perfect now, tkank you very much for help. Commented Apr 17 at 10:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .