2

I've been using the chemfig package to typeset my chemistry notes, and when trying to make an arene something went wrong:

myattempt

Naturally, I'd like it to not start from the middle of the atom. The chemfig documentation has an example similar to this:

documentation

That example works fine for me too. Yet for some reason, my very similar attempt seems to start too early. How could I fix this?

My code:

\documentclass{article}
\usepackage{chemfig}
\begin{document}

\chemfig{
C?[firstC](-[::-30]R) %right lower carbon
-[:90]C(-[::-60]R) %right upper
=[::60]C(-[::-60]R) %top
-[::60]C(-[::-60]R) %left upper 
=[::60]C(-[::-60]R) %left lower
-[::60]C(?[firstC,2])(-[::-60]R)} %bottom 

\end{document}
2

Your second hook is inside of a branch. Just remove the parentheses from the hook, C?[firstC,2] instead of C?([firstC,2]). Below I also propose a second version of the molecule using chemfig's ring syntax.

\documentclass{article}
\usepackage{chemfig}
\begin{document}

\chemfig{
  C?[firstC](-[::-30]R) %right lower carbon
  -[:90]C(-[::-60]R) % right upper
  =[::60]C(-[::-60]R) % top
  -[::60]C(-[::-60]R) % left upper 
  =[::60]C(-[::-60]R) % left lower
  -[::60]C?[firstC,2](-[::-60]R)
} %bottom 

\bigskip or alternatively:

\chemfig{C*6((-R)-C(-R)=C(-R)-C(-R)=C(-R)-C(-R)=)}

\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.