beamer 中出现“缺少 \endcsname 插入”错误

beamer 中出现“缺少 \endcsname 插入”错误
\documentclass[handout]{beamer}
\usetheme{Madrid}
\usepackage{amsmath,tikz}
\usetikzlibrary{arrows,matrix,positioning}

\begin{document}

\begin{frame}{Matrix}

This is an example of a matrix.

\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter=(,right delimiter=),ampersand replacement=\&] (m)
{
  8 \& 8 \& 1 \& 6 \\
  3 \& 8 \& 5 \& 7 \\
  4 \& 8 \& 9 \& 5 \\
};
\draw[color=red] (m-1-1.north west) -- (m-1-3.north east) -- (m-2-3.south east) -- (m-2-1.south west) -- (m-1-1.north west);
\draw[color=red,double,implies-](m-1-2.north) -- +(0,0.3);
\end{tikzpicture}

\end{frame}

\end{document}

我尝试在 Beamer 中绘制一个带有方框的矩阵,根据,我通过插入以下内容修复了“Package pgfbasematrix Error: Single ampersand used with mistakes catcode”错误.现在我收到错误

! Missing \endcsname inserted.
<to be read again> 
                   \pgf@arrows@invertimplies 
l.23 \end{frame}

我该如何修复它?

输出\listfiles

*File List*
beamer.cls 2007/03/11 cvs version 3.07 A class for typesetting presentatio
ns (rcs-revision 1.70)
beamerbasercs.sty 2007/01/28 (rcs-revision 1.4)
beamerbasemodes.sty 2007/01/28 (rcs-revision 1.22)
beamerbasedecode.sty 2007/01/28 (rcs-revision 1.20)
beamerbaseoptions.sty 2007/01/28 (rcs-revision 1.8)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
pgfcore.sty 2008/01/15 v2.00 (rcs-revision 1.6)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX
pgfsys.sty 2008/02/07 v2.00 (rcs-revision 1.31)
pgfrcs.sty 2008/02/20 v2.00 (rcs-revision 1.21)
pgfrcs.code.tex
pgfsys.code.tex
pgfsyssoftpath.code.tex 2008/01/23 (rcs-revision 1.6)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfbaseimage.sty
xxcolor.sty 2003/10/24 ver 0.1
amssymb.sty 2009/06/22 v3.00
amsfonts.sty 2009/06/22 v3.00 Basic AMSFonts support
geometry.sty 2008/12/21 v4.2 Page Geometry
ifpdf.sty 2009/04/10 v2.0 Provides the ifpdf switch (HO)
ifvtex.sty 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
geometry.cfg
hyperref.sty 2009/10/09 v6.79a Hypertext links for LaTeX
ifxetex.sty 2009/01/23 v0.5 Provides ifxetex conditional
hycolor.sty 2009/10/02 v1.5 Code for color options of hyperref/bookmark (HO
)
xcolor-patch.sty 2009/10/02 xcolor patch
pd1enc.def 2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty 2007/12/12 v1.2 Prefix for e-TeX command names (HO)
infwarerr.sty 2007/09/09 v1.2 Providing info/warning/message (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2009/08/13 v3.4 Keyval support for LaTeX options (HO)
kvsetkeys.sty 2009/07/30 v1.5 Key value parser with default handler support
(HO)
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
bitset.sty 2007/09/28 v1.0 Data type bit set (HO)
intcalc.sty 2007/09/27 v1.1 Expandable integer calculations (HO)
bigintcalc.sty 2007/11/11 v1.1 Expandable big integer calculations (HO)
pdftexcmds.sty 2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (
HO)
ifluatex.sty 2009/04/17 v1.2 Provides the ifluatex switch (HO)
ltxcmds.sty 2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)

atbegshi.sty 2008/07/31 v1.9 At begin shipout hook (HO)
hpdftex.def 2009/10/09 v6.79a Hyperref driver for pdfTeX
size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
beamerbasecompatibility.sty 2007/01/28 (rcs-revision 1.63)
beamerbasefont.sty 2007/01/28 (rcs-revision 1.16)
beamerbasemisc.sty 2007/01/28 (rcs-revision 1.24)
beamerbasetwoscreens.sty 2007/01/28 (rcs-revision 1.7)
beamerbaseoverlay.sty 2007/01/28 (rcs-revision 1.50)
beamerbasetitle.sty 2007/01/28 (rcs-revision 1.25)
beamerbasesection.sty 2007/01/28 (rcs-revision 1.21)
beamerbaseframe.sty 2007/01/28 (rcs-revision 1.60)
beamerbaseverbatim.sty 2007/01/28 (rcs-revision 1.8)
beamerbaseframesize.sty 2007/01/28 (rcs-revision 1.18)
beamerbaseframecomponents.sty 2007/01/28 (rcs-revision 1.41)
beamerbasecolor.sty 2007/01/28 (rcs-revision 1.42)
beamerbasenotes.sty 2007/01/28 (rcs-revision 1.23)
beamerbasetoc.sty 2007/01/28 (rcs-revision 1.21)
beamerbasetemplates.sty 2007/01/28 (rcs-revision 1.51)
beamerbaseauxtemplates.sty 2007/01/28 (rcs-revision 1.28)
beamerbaseboxes.sty 2007/03/11 (rcs-revision 1.32)
beamerbaselocalstructure.sty 2007/01/28 (rcs-revision 1.53)
enumerate.sty 1999/03/05 v3.00 enumerate extensions (DPC)
beamerbasenavigation.sty 2007/01/28 (rcs-revision 1.36)
beamerbasetheorems.sty 2007/01/28 (rcs-revision 1.10)
translator.sty 2007/03/11 ver 1.00
translator-language-mappings.tex
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsthm.sty 2004/08/06 v2.20
beamerbasethemes.sty 2007/01/28 (rcs-revision 1.10)
beamerthemedefault.sty 2007/01/28 (rcs-revision 1.7)
beamerfontthemedefault.sty 2007/01/28 (rcs-revision 1.13)
beamercolorthemedefault.sty 2007/01/28 (rcs-revision 1.28)
beamerinnerthemedefault.sty 2007/01/28 (rcs-revision 1.20)
beamerouterthemedefault.sty 2007/01/28 (rcs-revision 1.14)
beamerthemeMadrid.sty 2007/01/28 (rcs-revision 1.8)
beamercolorthemewhale.sty 2007/01/28 (rcs-revision 1.4)
beamercolorthemeorchid.sty 2007/01/28 (rcs-revision 1.3)
beamerinnerthemerounded.sty 2007/01/28 (rcs-revision 1.5)
beamerouterthemeinfolines.sty 2007/01/28 (rcs-revision 1.9)
tikz.sty 2008/02/13 v2.00 (rcs-revision 1.27)
pgf.sty 2008/01/15 v2.00 (rcs-revision 1.12)
pgfcomp-version-0-65.sty 2007/07/03 v2.00 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v2.00 (rcs-revision 1.1)
pgffor.sty 2007/11/07 v2.00 (rcs-revision 1.8)
pgffor.code.tex
tikz.code.tex
supp-pdf.mkii
nameref.sty 2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty 2008/08/11 v3.1 Data extraction from references (HO)
test.out
test.out
translator-theorem-dictionary-English.dict
umsa.fd 2009/06/22 v3.00 AMS symbols A
umsb.fd 2009/06/22 v3.00 AMS symbols B
***********

相关内容