0

I'm trying to draw a simple molecule (isopropanol) with chemfig, marking the hydrogen atom attached to the oxygen in red. But the bond is missplaced at the midle of the group OH, instead just below the oxygen atom. This is the original code:

\documentclass{article}
\usepackage{chemfig}
\setchemfig{atom sep=1.5em}

\begin{document}
\chemfig{-[:30](-[:90]O{\color{red}H})-[:-30]}
\end{document}

I'm try also to configure the bond attributes using the next code where I put the number 1 in the fourth position, but the result is the same:

\documentclass{article}
\usepackage{chemfig}
\setchemfig{atom sep=1.5em}

\begin{document}
\chemfig{-[:30](-[:90,,,1]O{\color{red}H})-[:-30]}
\end{document}

This is a picture of the molecule:

enter image description here

Could you be so nice to give me a tip for this problem? Thanks in advance!

1

1 Answer 1

1
\documentclass{article}
\usepackage{chemfig}
\setchemfig{atom sep=1.5em}
\begin{document}
    \chemfig{-[:30](-[:90]O|{\color{red}H})-[:-30]}
\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 .