我有以下代码:
\documentclass{beamer}
\usetheme{Madrid}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{etoolbox}
\let\bbordermatrix\bordermatrix
\patchcmd{\bbordermatrix}{8.75}{4.75}{}{}
\patchcmd{\bbordermatrix}{\left(}{\left[}{}{}
\patchcmd{\bbordermatrix}{\right)}{\right]}{}{}
\patchcmd{\bbordermatrix}{\begingroup}{\begingroup\openup1\jot}{}{}
\makeatletter
\patchcmd{\bbordermatrix}
{\vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}}
{\vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip\kern2pt}}
{}{}
\makeatother
\title{Linear Algebra Models in Information Retrieval}
\author{Nathan Pruitt and Rami Awwad}
\date{December 12th, 2016}
\begin{document}
\begin{frame}
\tiny
\[
\bbordermatrix{
& d_{1} & d_{2} & d_{3} & d_{4} & d_{5} & \ldots & d_{1,000,000}\cr
\\
t_{1} & m_{1,1} & m_{1,2} & m_{1,3} & m_{1,4} & m_{1,5} & & m_{1,1,000,000} \cr
\\
t_{2} & m_{2,1} & m_{2,2} & m_{2,3} & m_{2,4} & m_{2,5} & & m_{2,1,000,000} \cr
\\
t_{3} & m_{3,1} & m_{3,2} & m_{3,3} & m_{3,4} & m_{3,5} & \ldots & m_{3,1,000,000} \cr
\\
t_{4}& m_{4,1} & m_{4,2} & m_{4,3} & m_{4,4} & m_{4,5} & & m_{4,1,000,000} \cr
\\
t_{5}& m_{5,1} & m_{5,2} & m_{5,3} & m_{5,4} & m_{5,5} & & m_{5,1,000,000} \cr
\\
\vdots & & & &\vdots & & & \cr
\\
t_{300,000} & m_{300,000,1} & m_{300,000,2} & m_{300,000,3} & m_{300,000,4} & m_{300,000,5} & & m_{300,000, 1,000,000}}
\]\normalsize
\end{frame}
\end{document}
但我收到以下错误:
./bordermatrixerror.tex:46: LaTeX 错误:这里没有结束的行。
该文件在我的论文中有效,但在 Beamer 中无效。有人可以提供建议吗?
答案1
由于\bbordermatrix
功能与 类似\bordermatrix
,因此它依赖于相同的换行要求。删除所有\\
,\bbordermatrix
仅使用\cr
。