0

I am new to chemfig. I am trying to draw epoxyethane. Here is my code:

\documentclass{standalone}
\usepackage{chemfig}
\begin{document}
\chemfig{([::-30]*3(C(-[::180]H)(-[::280]H)-C(-[::30]H)(-[::-80]H)-O-))}
\end{document}

How do you get rid of the little piece of bound overlapping the first carbon ?enter image description here

2 Answers 2

2

I never used chemfig, I found in the doc ?[⟨nom⟩,⟨liaison⟩,⟨tikz⟩]

    \documentclass{standalone}
    \usepackage{chemfig}
    \begin{document}
    \chemfig{([::-30]*3(C(-[::+90]O?[o])(-[::180]H)(-[::280]H)-C?[o](-[::30]H)(-[::-80]H)))}
    \end{document}

enter image description here

1

Chemfig has a special syntax for rings (see page 16 of the chemfig-1.6a_en.pdf manual.

C*3() indicates that the ring will start at a carbon atom and have 3 sides, ([:-30]...) rotates the ring by -30 degrees to adjust the position.

Adding a small margin to the figure is desirable, too.

\documentclass[margin={2mm 2mm}]{standalone}
\usepackage{chemfig}
\begin{document}
\chemfig{C*3([:-30](-[:150]H)(-[:240]H)-C(-[:30]H)(-[:300]H)-O-)}
\end{document}

enter image description here

You must log in to answer this question.

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