2

Hi.
I am creating a beamer presentation on Lewis dot structures. I got most of my code from this question (Draw Lewis structures like a book)... But then I got stuck with BH3...(3rd reaction). I am not sure if I can write BH3 (with double dots instead of bonds/lines) with the chemformula package or if I need to do it using the chemfig way. I tried recreating the BH3 structure with chemfigs \Charge command (commented out), wich outside the align environment seems to work, but if I paste it instead of the \chlewis command the document does not compile.

Any help is appreciated.

Thanks.

\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}

2 Answers 2

1

with chemfig and 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}

enter image description here

3

It is possible to adjust the characteristics of the bonds before the \chemfig command, so as not to repeat these characteristics with each chemical bond.

To write Lewis structures using ChemFig's \charge command:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\setchemfig{atom sep=10pt, bond style={draw=none}}
\chemfig{\charge{0=\: ,90=\:,180=\:}{B}(-[0]H)(-[2]H)(-[4]H)}
\end{document}

enter image description here

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .