LaTeX forum ⇒ Graphics, Figures & TablesChemical structural Formulas Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Chemical structural Formulas

Postby MatthiasN » Wed Feb 27, 2013 5:13 pm

Hi everyone,

I was wondering if there is a package for the drawing of chemical formulas. I am currently using mhchem but this only allows the user to write the formula, but not to draw the structure of the molecule. So there is no misunderstanding I attached a picture that shows what I would like to be able to do.


Thanks for reading,
Matthias
Attachments
4-nitrotolueen.gif
4-nitrotolueen.gif (1.14 KiB) Viewed 2776 times

Tags:

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Wed Feb 27, 2013 7:14 pm

Try chemfig. It is based on PGF/tikZ.
  1. \documentclass{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{chemfig}
  4.  
  5. \setdoublesep{0.35700 em} % 'Bond Spacing'
  6. \setatomsep{1.78500 em} % 'Fixed Length'
  7. \setbondoffset{0.18265 em} % 'Margin Width'
  8. \newcommand{\bondwidth}{0.06642 em} % 'Line Width'
  9. \setbondstyle{line width = \bondwidth}
  10.  
  11. \begin{document}
  12. \chemfig{*6(=(-NO_2)-=-(-CH_3)=-)}
  13. \end{document}

For detailed descriptions of the capabilities and usage please refer to the package manual. You may combine the package with the very useful chemmacros.


Thorsten
Attachments
rtmp.png
rtmp.png (988 Bytes) Viewed 2770 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Postby MatthiasN » Wed Feb 27, 2013 7:29 pm

Looks really neat and since I am currently trying to work my way through the tikz manual, I think it can be really beneficial that it is based on tikz.

Thanks for your help!


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests