Pentane

In the Benzene ring example we saw a ring molecule.

Now we use the chemfig package for drawing a big molecule, while making work easier using submoles.

The code is fully explained in the LaTeX Cookbook, Chapter 11, Science and Technology, Drawing molecules.

Edit and compile if you like:
% Pentane
% Author: Stefan Kottwitz
% https://www.packtpub.com/hardware-and-creative/latex-cookbook
\documentclass[border=10pt]{standalone}
\usepackage{chemfig}
\begin{document}
\definesubmol{C}{-C(-[2]H)(-[6]H)}
\chemfig{H!C!C!C!C!C-H}
\end{document}
Click to download: pentane.texpentane.pdf
Open in Overleaf: pentane.tex