我尝试用如下代码绘制乙内酰脲的结构:
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\def\Hv@scale{0.65}
\makeatother
\DeclareMathAlphabet{\foo}{OT1}{phv}{m}{n}
\renewcommand*\printatom[1]{\ensuremath{\foo{#1}}}
\makeatother
\setchemfig{double bond sep = 0.20700 em,
fixed length = false,
bond offset = 0.18265 em,
bond style={line width=0.50pt},
atom sep = 1.2 em}
\begin{document}
\begin{figure}[h!]
\centering
\chemfig{*6(-=*6(-O--(-=^[:-30]*5(-[2,2]HN-(=O)-NH-(=O)-))=-)-=-=)}
\end{figure}
\end{document}
输出:
然而,我期望画出类似这样的图:
该键应该与氮原子而不是氢原子连接。如何正确调整氮原子和碳原子之间的键?我尝试了 chemfig 文档(第 42 页)中的鸟嘌呤示例,但没有成功。谢谢你的解释。
答案1
这个怎么样?
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\def\Hv@scale{0.65}
\makeatother
\DeclareMathAlphabet{\foo}{OT1}{phv}{m}{n}
\renewcommand*\printatom[1]{\ensuremath{\foo{#1}}}
\makeatother
\setchemfig{double bond sep = 0.20700 em,
fixed length = false,
bond offset = 0.18265 em,
bond style={line width=0.50pt},
atom sep = 1.2 em}
\begin{document}
\begin{figure}[h!]
\centering
\chemfig{
*6(
-=*6(
-O--
(-=^[:-30]
*5(-[,,,2]HN-(=O)-NH-(=O)-NH)
)
=-
)-=-=
)
}
\end{figure}
\end{document}