例如:
我只是想说明 H2O 分子被碳原子吸引。我找不到去除连接氧和碳的线的方法,也找不到如何将氢从氧中延伸出来的方法。
这是一个最小的工作示例。
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{C^+(-[:0]O)(-[:90]O)(-[:180]O)(-[:270]O)}
\end{document}
答案1
这是一个纯的 chemfig 溶液:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\definesubmol{eau}{O(-[::-45]H)-[::45]H}
\def\dist{.75}% set the distance between C+ and water
\chemfig{C^{+}(-[:180,\dist,,,draw=none]!{eau})(-[:60,\dist,,,draw=none]!{eau})-[:-60,\dist,,,draw=none]!{eau}}
\end{document}
答案2
也许有一个“纯粹”的chemfig
解决方案,但你可以使用TikZ
将分子放置在所需位置:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{chemfig}
\newcommand\Water{\chemfig{O(-[1]H)-[7]H}}
\begin{document}
\begin{tikzpicture}[inner sep=0pt]
\node (cp) {\chemfig{C^+}};
\node[above right=-20pt and 10pt of cp,rotate around={40:(cp)}] {\Water};
\node[below right=-20pt and 10pt of cp,rotate around={-40:(cp)}] {\Water};
\node[left=40pt of cp,xscale=-1] {\Water};
\end{tikzpicture}
\end{document}
还有另外一个选项(这次是TikZ
免费的):
\documentclass{article}
\usepackage{chemfig}
\usepackage{graphicx}
\newcommand\Water{\chemfig{O(-[1]H)-[7]H}}
\begin{document}
\begin{picture}(100,200)
\put (0,0){\chemfig{C^+}}
\put (10,10) {\rotatebox{40}{\Water}}
\put (10,-10) {\rotatebox{-40}{\Water}}
\put (-45,5) {\scalebox{-1}{\Water}}
\end{picture}
\end{document}