2

I am new on latex and on chemfig. Here are the molecules that I would like to draw. My problem is that I can't put the arrow where I would like it to be. I have tried with the anchors but apparently the rectangle in which I draw my molecules are all mess up, I don't know why...

Here is my code, hope that you can help me.

1st reaction:

\documentclass{standalone}
\usepackage{chemfig}
\begin{document}
\setchemfig{scheme debug=true}
%1st reaction
\schemestart[][]    
\chemname{\chemfig{F-[:-90]*6(-=-(-B([::60]-OH)-[::-60]OH)=(-F)-=N)}}{}         
\arrow(--[yshift=-80pt]){0}[,0]\+{0pt,20pt,60pt}
\chemname{\chemfig{Br-[:90]*6(=N-=-=-)}}{}  
\arrow(.north east--.west){->[5\% mol Pd(OAc)\textsubscript2,  PPh\textsubscript3][THF/H\textsubscript2O, K\textsubscript2CO\textsubscript3, 80C, Ar]}[0,3]
\chemname{\chemfig{F-[:-90]*6(-N=(-F)-([:-90]-*6(-=-=-N=))=-=)}}{}
\schemestop
%    
%2nd reaction 
\setchemfig{scheme debug=true}
\schemestart[][center]
\chemname{\chemfig{OCH\textsubscript3-[:-90]*6(-=-(-B([::60]-OH)-[::-60]OH)=-=)}}{4-methoxyphenyl boronic acid}          
\arrow(--[yshift=-80pt]){0}[,0]\+{0pt,10pt,60pt}
\chemname{\chemfig{Br-[:90]*6(=N-=-=-)}}{2-bromo pyridine}               
\arrow(.east--.west){->[5\% Pd(OAc)\textsubscript2,  PPh                    \textsubscript3][EtOH/Toluene/H\textsubscript2O, K\textsubscript2CO\textsubscript3, 110C, Ar]}[0,2]
\chemname{\chemfig{OCH\textsubscript3-[:-90]*6(-=-([:-90]-*6(-=-=-N=))=-=)}}{}
\schemestop
\end{document}

thank you

  • 2
    Welcome to TeX.SX! Plase make your code a complete, compilable document, so that it's easier for others to help you. – siracusa Jul 9 at 9:55
2

Welcome to TeX.SE. The second molecule (c2) is shorter than the first molecule (c1), but c2 inherits the height of the c1 molecule making it too tall. This inheritance can be prevented by executing \chemnameinit immediately after drawing the first molecule. Thereafter, the arrows and remaining molecules in the sequence are vertically aligned without the need to resort to shifting coordinates manually.

\documentclass{standalone}
\usepackage{chemfig}

\begin{document}
\setchemfig{scheme debug=true}
\schemestart[][]
\chemname{\chemfig{F-[:-90]*6(-=-(-B([::60]-OH)-[::-60]OH)=(-F)-=N)}}{\phantom{M}}
\chemnameinit{}  % <-- added this
\arrow(.east--.west)
\chemname{\chemfig{Br-[:90]*6(=N-=-=-)}}{}
\arrow(.east--.west){->[5\% mol Pd(OAc)\textsubscript{2},  PPh\textsubscript3][THF/H\textsubscript{2}O, K\textsubscript{2}CO\textsubscript{3}, 80C, Ar]}[0,3]
\chemname{\chemfig{F-[:-90]*6(-N=(-F)-([:-90]-*6(-=-=-N=))=-=)}}{}
\schemestop
\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.