\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}
\begin{document}
\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([1]-CH_3))=)}}{Epinephrin}
\end{document}
Right now the Image looks like the above. I would like the Methyl-group (CH3) to branch off at the Nitrogen Atom (N).
I hope somebody can help me. Thanks in advance! :)
The third option of a chemical bond in Chemfig is which atom the bond goes to and fixes (if there is more than one atom). So if you write NH-[1,,1]CH_3 the CH3 will bond to nitrogen (the first atom of NH)
See page 20 of the manual Chemfig-1.6a_en.pdf
\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}
\begin{document}
\chemname[2ex]{\chemfig{[:-150]*6(-(-HO)=(-HO)-=-(-(-[7]OH)-[1]-NH(-[1,,1]CH_3))=)}}{Epinephrin}
\end{document}
But the connection angle doesn't help much in the visualization.
Note: write "HO" instead of "OH" for the hydroxyl groups on the left side of the molecule.
You could change the angle:
\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}
\begin{document}
\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([2]-CH_3))=)}}{Epinephrin}
\end{document}
Or if you like the 45 degree angle, you could specify which atom should be the bonding partner:
\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}
\begin{document}
\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([1,,1,]-CH_3))=)}}{Epinephrin}
\end{document}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.