4

I am using ChemFig package to compile some molecule structures, however, I cannot align them at the base line. See picture 1. How could I align all the molecules, the arrow and "+" sign in the reaction exactly at the same level? Moreover, how to maintain the same alignment while adding chemical names under the molecules using \chemname{} command? Say the chemical names are A, B, C and D, respectively, as shown in picture 1? Thanks. picture 1

Tex code:

\documentclass{article}

\usepackage{chemfig}

\begin{document}
\schemestart
\chemfig{[,0.5]*6(-=-=(-CH_3)-=)} \arrow{->[\chemfig{F_2}][\chemfig{MeOH}][]}[,1.5]
\chemfig{[,0.5]*6(-=-(-F)=(-CH_3)-=)}
\+
\chemfig{[,0.5]*6(-=(-F)-=(-CH_3)-=)}
\+{,,5pt}
\chemfig{[,0.5]*6(-(-F)=-=(-CH_3)-=)}
\schemestop

\end{document}
  • 1
    You can use the anchors of the compounds for alignment using the \arrow(.<anchor>--<anchor>) syntax. – clemens Nov 4 '15 at 7:11
2

\vphantom aligns molecules, additional argument of \+ aligns plus signs and arrow:

\documentclass{article}

\usepackage{chemfig}

\begin{document}
\schemestart
\vphantom{\chemfig{[,0.5]*6(-(-F)=-=(-CH_3)-=)}} % here - PS
\chemfig{[,0.5]*6(-=-=(-CH_3)-=)} 
\arrow{->[\chemfig{F_2}][\chemfig{MeOH}][]}[,1.5]
\chemfig{[,0.5]*6(-=-(-F)=(-CH_3)-=)}
\+{,,5pt} % here - PS
\chemfig{[,0.5]*6(-=(-F)-=(-CH_3)-=)}
\+{,,5pt}
\chemfig{[,0.5]*6(-(-F)=-=(-CH_3)-=)}
\schemestop

\end{document}

enter image description here

  • Scherwentk: How could I add the molecule name under the the molecule structure using \chemname{} command while maintaining the alignment? Thanks. – Nick Nov 4 '15 at 7:01
  • @Nick Can you give proper names, please? Or should I simply give dummy names? – Przemysław Scherwentke Nov 4 '15 at 19:43
  • @scherwentk: I revised the problem. Yes, any names are OK. thanks. – Nick Nov 5 '15 at 1:37

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.