Chemfig
| Chemfig | |
|---|---|
| Developer | Christian Tellechea |
| Written in | TeX |
| Operating system | Cross-platform |
| Platform | LaTeX |
| Type | Chemical structure drawing |
| License | LaTeX Project Public License |
| Website | www |
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]
Features
- Customizable bond angles and lengths
- Support for single, double, triple, and aromatic bonds
- Cyclic compounds and ring structures
- Reaction arrows and mechanisms
- Integration with TikZ for advanced diagramming and mhchem for typesetting chemical equations
- Support for submolecules and nested chemical environments[4]
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:

There are 9 different bond types:

\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}\\

Molecular angles of a methane molecule:
\chemfig{C(-[:0]H)(-[:90]H)(-[:180]H)(-[:270]H)}
See also
- Comparison of TeX editors
- Computational chemistry
- Jmol - molecular modelling of chemical structures in 3 dimensions
- List of TeX extensions
- mhchem
- Molecular geometry
- Molecular graphics
- Overleaf - web app that does chemfig package chemical structures
- TikZ
- XyMTeX - another LaTeX structural formula package
References
- ^ "Chemistry formulae". www.overleaf.com.
- ^ "chemfig" (PDF). tug.ctan.org.
- ^ Wright, Joseph (August 25, 2012). "Exploring ChemFig: Basics". Some TeX Developments.
- ^ Brefo-Mensah, Eric K.; Palmer, Michael (October 2, 2012). "mol2chemfig, a tool for rendering chemical structures from molfile or SMILES format to LATE X code". Journal of Cheminformatics. 4 (1): 24. doi:10.1186/1758-2946-4-24. PMC 3551648. PMID 23031664.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.