Top Qs
Timeline
Chat
Perspective

Chemfig

LaTeX package for drawing chemical structures From Wikipedia, the free encyclopedia

Remove ads

Chemfig is a LaTeX package used for creating graphical representations of chemical structures, molecules, reaction schemes, and structural formulas. It provides a simple and flexible syntax to define atoms, bonds, angles, rings.[1] It allows for the construction of both organic and inorganic molecules using LaTeX markup.[2][3]

Quick Facts Developer(s), Written in ...
Remove ads

Features

Syntax

Package preamble:

\input chemfig.tex
\usepackage{chemfig}

Chemfig uses a simple syntax based on TeX commands. For example:

\chemfig{H-C(-[2]H)(-[6]H)-C(=O)-OH}

Produces a structural formula for acetic acid and a structure would render as:

Thumb
Acetic acid

There are 9 different bond types:

Thumb
\chemfig{A-B}\\
\chemfig{A=B}\\
\chemfig{A~B}\\
\chemfig{A>B}\\
\chemfig{A<B}\\
\chemfig{A>:B}\\
\chemfig{A<:B}\\
\chemfig{A>{{!}}B}\\
\chemfig{A<{{!}}B}\\
Thumb
methane molecule

Molecular angles of a methane molecule:

\chemfig{C(-[:0]H)(-[:90]H)(-[:180]H)(-[:270]H)}
Remove ads

See also

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads