![具有双键的路易斯结构](https://linux22.com/image/460682/%E5%85%B7%E6%9C%89%E5%8F%8C%E9%94%AE%E7%9A%84%E8%B7%AF%E6%98%93%E6%96%AF%E7%BB%93%E6%9E%84.png)
为了确定分子的路易斯结构,我使用了提出的方法这里但我对某些分子如氧气有阻断作用:
如何在每个原子上放置双键和双线?
\documentclass{standalone}
\usepackage{stackengine}
\usepackage{graphicx,ifthen}
\newcommand\lewis[7]{\,%
\ifthenelse{\equal{#3}{}}%
{\def\RHS{}\def\RRHS{\hspace{.5ex}}}%
{\def\RHS{\,\rotatebox{90}{\makebox[1.5ex]{#3}}\,}\def\RRHS{}}%
\stackengine{2ex}{%
\rotatebox{90}{\makebox[1.5ex]{#5}}\,%
\stackengine{0.6ex}{%
\stackengine{1.9ex}{#1}{#2}{O}{c}{F}{F}{L}%
}{#4}{U}{c}{F}{F}{L}%
\RHS$^{#6}$\RRHS%
}{$#7$}{U}{c}{F}{F}{L}%
}
\savestack\Bond{\rule{1.2ex}{0.75pt}}
\savestack{\PBond}{\rotatebox{90}{\Bond}}
\begin{document}
\sffamily
\stackunder{%
O\lewis{O}{}{\Bond}{}{\PBond}{}{}
}{}
\end{document}