# Caffeine

> The fused six- and five-membered rings of caffeine, with its three methyl groups. A chemfig example with its LaTeX source.

A chemfig example in the TeXeR TikZ library: https://texer.org/library/chemfig/caffeine

Package: [chemfig](https://texer.org/library/chemfig.md), on CTAN at https://ctan.org/pkg/chemfig.

Tags: caffeine, alkaloid, heterocycle

## Source

```latex
\usepackage{chemfig}

\chemfig{*6((=O)-N(-CH_3)-(=O)-N(-CH_3)-*5(-N=-N(-CH_3)-)=-)}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{chemfig}

\begin{document}

\chemfig{*6((=O)-N(-CH_3)-(=O)-N(-CH_3)-*5(-N=-N(-CH_3)-)=-)}
\end{document}
```
