你好。
我正在制作一个beamer
关于 Lewis 点结构的演示文稿。我的大部分代码都来自这个问题 (像书一样绘制路易斯结构)...但后来我被 BH3 难住了...(第三个反应)。我不确定我是否可以用 来写 BH3(用双点代替键/线)或者chemformula package
我是否需要使用 的方式来写。我尝试用s命令(注释掉)chemfig
重新创建 BH3 结构,这在环境之外似乎有效,但如果我粘贴它而不是命令,文档就不会编译。chemfig
\Charge
align
\chlewis
任何帮助都将受到赞赏。
谢谢。
\documentclass{beamer}
\usepackage{chemformula}
\usepackage{elements}
\usepackage{chemfig}
\begin{document}
\begin{frame}{MWE}
\begin{align}
\ch{
!(\elconf{H})( "\chlewis{0.}{H}" ) +
!(\elconf{H})( "\chlewis{0.}{H}" )
& ->
!(\writeelconf{2})( "\chlewis{0.}{H}" "\chlewis{180.}{H}" ) \\
%%
!(\elconf{N})( "\chlewis{0.90:180.270.}{N}" ) +
!(\elconf{O})( "\chlewis{0:90:180.270.}{O}" )
& ->
!(\writeelconf{2,2+5}\writeelconf{2,2+6}) ( "\chlewis{0:90:180.}{N}" "\chlewis{45:180:315:}{O}" ) \\
%%
!(\elconf{H})( "\chlewis{0.}{3H}" ) +
!(\elconf{B})( "\chlewis{0.90.180.}{B}" )
& ->
!(\writeelconf{2,2+4}) ( "\chlewis{0:90:180:}{B}" )
%!(\writeelconf{2,2+4}) ( "\chemfig[atom sep=1.25em]{H-[,,,,draw=none]\Charge{[circle]0=\:,90=\:,180=\:}{B}(-[:90,,,,draw=none]H)-[,,,,draw=none]H} " )
}
\end{align}
\end{frame}
\end{document}
答案1
与chemfig
和elements
\documentclass{beamer}
\usepackage{elements}
\usepackage{chemfig}
\setchemfig{compound sep=7em, arrow offset=2em, + sep left=1.5em, + sep right=1.5em}
\setcharge{.radius=0.2ex}
\begin{document}
\begin{frame}{MWE}
\begin{align}
\schemestart
\chemname{\chemfig{\charge{0:1pt=\.}{H}}}{\scriptsize\elconf{H}}
\+
\chemname{\chemfig{\charge{180:1pt=\.}{H}}}{\scriptsize\elconf{H}}
\arrow(.mid east--.mid west){->[][][0.8pt]}[,1]
\schemestop
&
\schemestart
\chemname{\chemfig{\charge{0:1pt=\.}{H}-[,0.5,,,draw=none]\charge{180:1pt=\.}{H}}}{\scriptsize\writeelconf{2}}
\schemestop
\\[3ex]
\schemestart
\chemname{\chemfig{\charge{0:1pt=\.,90:1pt=\:,180:1pt=\.,270:1pt=\.}{N}}}{\scriptsize\elconf{N}}
\+
\chemname{\chemfig{\charge{0:1pt=\:,90:1pt=\:,180:1pt=\.,270:1pt=\.}{O}}}{\scriptsize\elconf{O}}
\arrow(.mid east--.mid west){->[][][0.8pt]}[,1]
\schemestop
&
\schemestart
\chemname{\chemfig{\charge{0:1pt=\:,90:1pt=\:,180:1pt=\.}{N}-[,0.5,,,draw=none]\charge{-45:0pt=\:,45:0pt=\:,180:1pt=\:}{O}}}{\scriptsize\writeelconf{2,2+5}\,\scriptsize\writeelconf{2,2+6}}
\schemestop
\\[2ex]
\schemestart
3\,\chemname{\chemfig{\charge{0:1pt=\.}{H}}}{\scriptsize\elconf{H}}
\+
\chemname{\chemfig{\charge{0:1pt=\.,90:1pt=\.,180:1pt=\.}{B}}}{\scriptsize\elconf{B}}
\arrow(.mid east--.mid west){->[][][0.8pt]}[,1]
\schemestop
&
\schemestart
\chemname{\chemfig{H-[,0.4,,,draw=none]\charge{0:1pt=\:,90:1pt=\:,180:1pt=\:}{B}(-[2,0.4,,,draw=none]H)-[,0.4,,,draw=none]H}}{\scriptsize\writeelconf{2,2+4}}
\schemestop
\end{align}
\end{frame}
\end{document}