2

Being a mechanical engineer I never had the necessity to draw chemical formulas/molecule structures in LaTeX, but now I have to draw the structure of Polyethylene glycol. So I was looking at examples of how to use chemfig and doing the chain was pretty basic, but I have no idea how to put the parentheses around the bit to be repeated n times. Could someone please help me out? Thanks!

MWE

\documentclass{scrreprt}
\usepackage{chemfig}
\begin{document}
    \chemfig{H-[:30]O-[:-30]-[:30]-[:-30]O-[:30]H}
\end{document}

I got:

enter image description here

I need:

enter image description here

1 Answer 1

3

A starting point borrowed from the manual chemfig manual page number: 44.

\documentclass{scrreprt}
\usepackage{chemfig}
\begin{document}
  \chemfig{H-[@{left,0.25}:30]O-[:-30]-[:30]-[@{right,0.25}:-30]O-[:30]H}
   \polymerdelim[delimiters ={[]}, height = 20pt, depth = 10pt, indice = n]{left}{right}
\end{document}

you will get:

enter image description here

Disclaimer: I am not sure about the technical accuracy. Because, I am not a chemist :).

2
  • 1
    That should do it: I can tweak the position of the parentheses with the parameters I think. Thanks! Commented Mar 12, 2019 at 15:18
  • @Superuser27 you are welcome. Commented Mar 12, 2019 at 16:05

You must log in to answer this question.

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