4

I am building the selegiline structure and for this I use \chembelow and \chemabove from the chemfig package. The problem is that I cannot align the hydrogens (H_2) with the carbon (C), that is, the hydrogen symbol (H) is exactly on/under the carbon atom and not aligned to the left.

I hope you can help me. Greetings.

\setchemfig{atom style={scale=.85},atom sep=2.5em}
\chemname{%
\chemfig{%
\chemabove{C}{H}(-[:150]\chemabove{C}{H_2}-[:210]*6(=-=-=-))(-[:30]CH_3)-[:270]N(-[:210]H_3C)(-[:330]\chembelow{C}{\;H_2}-[:30]C~[:30]CH)
}}%
{Selegiline}%
2
  • Currently, the H_2 appears to be horizontally centered with respect to the C atom, but you mention not wanting them to be left aligned. Would you mind adding a sketch of the expected output? Is this closer to the expected alignment? i.stack.imgur.com/Fcaef.png
    – leandriis
    Sep 23 at 19:28
  • @leandriis That's right, I would like to get a structure like the one in i.stack.imgur.com/Fcaef.png, but I get this: i.imgur.com/V78fUd6.png (notice how hydrogen remains a little to the left with respect to carbon). Sep 23 at 19:41
3

a version showing all H, without using \chemabove or \chembelow

\setchemfig{atom style={scale=.85},atom sep=2.5em}
%
\chemname{\chemfig{C(-[2,.35,,,,draw=none]H)(-[:150]C(-[6,.35,,,,draw=none]H)(-[2,.35,,,,draw=none]H)-[:210]*6(=-=-=-))(-[:30]CH_3)-[:270]N(-[:210]H_3C)(-[:330]C(-[6,.35,,,,draw=none]H)(-[2,.35,,,,draw=none]H)-[:30]C~[:30]CH)}}
{Selegiline}
%

enter image description here

OR...

\setchemfig{atom style={scale=.85},atom sep=2.5em}
%
\chemname{\chemfig{C(-[2,.35,,,,draw=none]H)(-[:150]C(-[:70,.35,,,,draw=none]H_2)-[:210]*6(=-=-=-))(-[:30]CH_3)-[:270]N(-[:210]H_3C)(-[:330]C(-[:290,.37,,,,draw=none]H_2)-[:30]C~[:30]CH)}}
{Selegiline}
%

enter image description here

4

enter image description here

\documentclass[margin=5mm]{standalone}
\usepackage{chemfig}

\begin{document}

\setchemfig{atom style={scale=.85},atom sep=2.5em}
\chemname{%
\chemfig{%
\chemabove{C}{H}(-[:150]\Chemabove{C}{\phantom{_2}H_2}-[:210]*6(=-=-=-))(-[:30]CH_3)-[:270]N(-[:210]H_3C)(-[:330]\Chembelow{C}{\phantom{_2}H_2}-[:30]C~[:30]CH)
}}%
{Selegiline}%
\qquad
%
\chemname{%
\chemfig{%
(-[:150]-[:210]*6(=-=-=-))(-[:30]CH_3)-[:270]N(-[:210]H_3C)(-[:330]-[:30]~[:30]CH)
}}%
{Selegiline}%
\qquad
%
\chemname{%
\chemfig{%
(-[:150]-[:210]*6(=-=-=-))(-[:30])-[:270]N(-[:210])(-[:330]-[:30]~[:30])
}}%
{Selegiline}%

\end{document}
1

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.