I have to include organic molecules into a report and for that reason I wanted to use chemfig
. After having installed the package I tested it with one of the first lines of code in the documentation: \chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}
This was compiled without any problems. So, now I switched over to mol2chemfig and entered my SMILES code from ChemDraw. The interface converted it to a \chemfig
-command which I copied and pasted into my LaTeX document.
After compiling I receive the following Error message:
! Package pgfkeys Error: I do not know the key '/tikz/dlh' and I am going to ignore it. Perhaps you misspelled it.
For testing reasons, I then went back to mol2chemfig and searched for an other molecule – in my case caffeine – in the database and copied the code of that one.
It gives an Error too:
! Undefined control sequence.\atom@1 ->\mcfcringle {1.03}
So, it definitely seems, that something is going wrong here. Unfortunately I'm pretty new to LaTeX, and so I have no idea why I'm getting tese eroor messages.
Thanks in advance for your help.
documentclass[border=10pt]{standalone}
usepackage{chemfig}
begin{document}
\chemfig{-[:138]N-[:84]=^[:156]N-[:228]=[:300](-[:240](-[:180]N(-[:240]% )-[:120](-[:60]N(-[:120])-)=[:180]O)=[:300]O)-[:12]\phantom{N}}
\end{document}
There is something likely wrong in your preamble.\chemfig{-[:288]N-[:234](-[:0,0.85,,,draw=none]\mcfcringle{1.03})-[:306]N-[:18]-[:90](-[:162]\phantom{N})-[:30](=[:90]O)-[:330]N(-[:30])-[:270](=[:330]O)-[:210]N(-[:150])-[:270]}
I rotated the molecule by 150 degrees and used the "fancy bonds" as well as the "aromatic" options.