你能帮我在苯分子中画一个虚线椭圆以及从分子中心到金属的吸附键吗?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\begin{document}
\begin{figure}[!h]
\begin{center}
\setcrambond{2pt}{}{}
\chemfig{H-[8,0.5]?<[7,0.7](-[5,0.5]H)-[8,,,,line width=2pt](-[7,0.5]H)>[1,0.7](-[8,0.5]H)-[3,0.7](-[1,0.5]H)-[4]?(-[3,0.5]H)}
\end{center}
\end{figure}
\end{document}
答案1
你可以画一条看不见的键到环的中心,用chemfig
的@{name}
语法命名该位置,然后从那里到我画一条稍长的键。
使用\chemmove
宏和一点 TikZ,您可以围绕标记的中心绘制椭圆:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\begin{center}
\setcrambond{2pt}{}{}
\chemfig{
H-[0,0.5]?(-[,.9949,,,draw=none]@{center}-[6,1.5]Me)
<[7,0.7](-[5,0.5]H)
-[0,,,,line width=2pt](-[7,0.5]H)
>[1,0.7]@{C4}(-[0,0.5]H)
-[3,0.7](-[1,0.5]H)
-[4]?(-[3,0.5]H)
}
\chemmove{
\draw[dashed]
(center) + (.8,0)
arc [x radius=.8, y radius=.4,start angle=0,end angle=360];
}
\end{center}
\end{document}
答案2
有很多堆叠,还有一点点tikz
。
编辑以提供更薄的环,以及断裂环的能力。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,stackengine,graphicx}
\usepackage{xcolor,tikz}
\newcommand\dottedcirc[2]{\tikz{\draw[dashed] (0,0) arc [x radius=.8,%
y radius=.4,start angle=#1,end angle=#2];}}
\begin{document}
\begin{figure}[!h]
\begin{center}
\stackunder[-6.6ex]{
\stackinset{c}{0pt}{c}{}{\dottedcirc{0}{360}}{%
\setcrambond{2pt}{}{}
\chemfig{H-[8,0.5]?<[7,0.7](-[5,0.5]H)-[8,,,,line width=2pt](-[7,0.5]H)>[1,0.7](-[8,0.5]H)-[3,0.7](-[1,0.5]H)-[4]?(-[3,0.5]H)}
}
}{\stackon{Me}{\rule{1pt}{9ex}}}
%
\stackunder[-6.6ex]{
\stackinset{c}{-6pt}{c}{}{\dottedcirc{55}{305}}{%
\setcrambond{2pt}{}{}
\chemfig{H-[8,0.5]?<[7,0.7](-[5,0.5]H)-[8,,,,line width=2pt](-[7,0.5]H)>[1,0.7](-[8,0.5]H)-[3,0.7](-[1,0.5]H)-[4]?(-[3,0.5]H)}
}
}{\stackon{Me}{\rule{1pt}{9ex}}}
\end{center}
\end{figure}
\end{document}