在模型图的一部分周围绘制轮廓

在模型图的一部分周围绘制轮廓

我需要modiagram在下beamer一张幻灯片的部分周围绘制一个轮廓,就像图片中那样:

在此处输入图片描述

\documentclass{beamer}
\usepackage[version=3]{mhchem}
\usepackage{modiagram}

\begin{document}

\begin{frame}
    \MOsetup{
        style=square, 
        labels,
        names,
        AO-width=8pt,
        labels-fs=\footnotesize,
        labels-style={blue}
    }
    \begin{overprint}
        %============================== B2 ======================
        \onslide<1>
        \begin{columns}[T]
            \begin{column}{.45\linewidth}
                \scalebox{0.7}{
                    \begin{MOdiagram}
                        \atom[\ce{a}]{left}{
                            1s  = {;pair}, 
                            2s  = {;pair}, 
                            2p = {;up}
                        }
                        \atom[\ce{b}]{right}{
                            1s  = {;pair}, 
                            2s  = {;pair}, 
                            2p = {;up}
                        }
                        \molecule[\ce{B2}]{
                            1sMO = {;pair,pair}, 
                            2sMO = {;pair,pair}, 
                            2pMO = {0.9/2,1.7/1;,up,up},
                            color = { 1sigma*=red, 2sigma*=red }
                        }
                        \EnergyAxis
                    \end{MOdiagram}
                }
            \end{column}
            \begin{column}{.5\linewidth}
                \vspace*{8em}
                Paramagnetic
            \end{column}
        \end{columns}
    \end{overprint}
\end{frame}


\end{document}

答案1

您可以使用tikz,覆盖箭头框:

\documentclass{beamer}
\usepackage[version=3]{mhchem}
\usepackage{modiagram}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}

\begin{document}
\begin{frame}
    \MOsetup{
        style=square, 
        labels,
        names,
        AO-width=8pt,
        labels-fs=\footnotesize,
        labels-style={blue}
    }
    \begin{overprint}
        %============================== B2 ======================
        \onslide<1>
        \begin{columns}[T]
            \begin{column}{.45\linewidth}
                \scalebox{0.7}{
                    \begin{MOdiagram}
                        \atom[\ce{a}]{left}{
                            1s  = {;pair}, 
                            2s  = {;pair}, 
                            2p = {;up}
                        }
                        \atom[\ce{b}]{right}{
                            1s  = {;pair}, 
                            2s  = {;pair}, 
                            2p = {;up}
                        }
                        \molecule[\ce{B2}]{
                            1sMO = {;pair,pair}, 
                            2sMO = {;pair,pair}, 
                            2pMO = {0.9/2,1.7/1;,up,up},
                            color = { 1sigma*=red, 2sigma*=red }
                        }
                        \EnergyAxis
                    \end{MOdiagram}
                }
            \end{column}
            \begin{column}{.5\linewidth}
                \vspace*{19.2ex}
                Paramagnetic
            \end{column}
        \end{columns}
        \begin{tikzpicture}[overlay]
              \node[arrow box, draw, red, arrow box arrows={east:1.9cm},
              text width=2.4em, minimum height=3.4ex]
              at (2.84,3.4) {};
        \end{tikzpicture}
    \end{overprint}
\end{frame}
\end{document}

在此处输入图片描述

相关内容