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
  • 1
    You can use the anchors of the compounds for alignment using the \arrow(.<anchor>--<anchor>) syntax.
    – cgnieder
    Nov 4, 2015 at 7:11

1 Answer 1

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

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

You must log in to answer this question.

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