Glucose models

Though chemfig makes drawing easier, writing down complex molecules can still be laborious if you got a lot of them, such as in lecture notes or exam sheets about carbohydrates.

Luckily we don’t need to reinvent the wheel all the time. The carbohydrate package provides a lot of chemfig-drawn carbohydrates for you to use. It contains trioses, tetroses, pentoses, and hexoses, and in various models: the fischer model (full and skeleton), the haworth model, and the chain model.

You can draw them as ring isomer and as chain isomer. You can download the package at: https://github.com/cgnieder/carbohydrates. There you can also find the manual. Let’s have a look, how easy it becomes, for example with glucose.

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

Edit and compile if you like:
% Glucose models
% Author: Stefan Kottwitz
% https://www.packtpub.com/hardware-and-creative/latex-cookbook
\documentclass[varwidth,border=20pt]{standalone}
\usepackage{carbohydrates}
\begin{document}
\centering
\glucose[model=fischer,chain]
\hspace{2cm}
\glucose[model={fischer=skeleton},chain]

\vspace{1cm}
\glucose[model=haworth,chain]~
\glucose[model=haworth,ring]~
\glucose[model=chair,ring]
\end{document}
Click to download: glucose.texglucose.pdf
Open in Overleaf: glucose.tex