阻止已在 Beamer 中定义的错误

阻止已在 Beamer 中定义的错误

我通过 Beamer 进行演示。我想使用如下所示的块,但出现错误。请参阅下面给出的代码:

 \documentclass{beamer}
\usepackage{mathtools}
 \usepackage{array}
\usepackage{amsmath}
 %\usetheme{Boadilla}
   \usetheme{Madrid}
 \usepackage{bibentry}
  \usepackage[linesnumbered,ruled,vlined]{algorithm2e}
  \setbeamertemplate{theorems}[numbered]

   \usepackage{graphicx}

     \usepackage[section]{placeins}
    \usepackage[utf8]{inputenc}

  \newcommand{\block}[2]{%
   \begin{array}[t]{@{}c@{}}
  \boxed{\mathstrut #1}\\
    \scriptstyle\blockleftarrowfill\,#2\,\blockrightarrowfill
   \end{array}%
 }
  \newcommand{\blockleftarrowfill}{%
   \mathord\leftarrow
    \mkern -7mu
   \cleaders\hbox{$\scriptstyle\mkern -2mu\smash-\mkern -2mu$}\hfill
 \mkern -7mu\smash-%
   }
   \newcommand{\blockrightarrowfill}{%
    \smash-%
   \mkern -7mu
    \cleaders\hbox{$\scriptstyle\mkern -2mu\smash-\mkern -2mu$}\hfill
    \mkern -7mu
    \mathord\rightarrow
       }


      \begin{document}

              \[
           g = \block{\ g_1^{\epsilon_1(g)} \cdots\  
         g_l^{\epsilon_l(g)}\ } 
            {l}\quad
          \block{g_{l+1}^{\epsilon_{l+1}(g)} \cdots 
                  g_{2l}^{\epsilon_{2l}(g)}}{l}\quad
                \cdots\quad
        \block{g_{r}(g)^{\epsilon_{r}(g)}\cdots 
              g_k^{\epsilon_k(g)}\quad}{l}
               \]



            \end{document}

问题 :出现块已定义错误。如何纠正?

相关内容