You need to pass the [table]
option to beamer
(which will then pass it to the xcolor
package, which it loads).
\documentclass[table]{beamer}
\usepackage{multirow}
\begin{document}
\begin{frame}
\frametitle{}
\begin{center}
\begin{tabular}{cc|c|c|}
\cline{3-4}
& & \multicolumn{2}{|c|}{Condition (Gold standard)}\\
\cline{3-4}
& & True & False \\
\hline
\multicolumn{1}{ |c| }{\multirow{2}{*}{Test outcome}}&
\multicolumn{1}{ |c| }{Positive} & True Positive \cellcolor{green} &
False Positive\cellcolor{red}\\
\cline{2-4}
\multicolumn{1}{ |c| }{} & \multicolumn{1}{ |c| }{Negative} &
False Negative\cellcolor{red} & True Negative \cellcolor{green}\\
\hline
\end{tabular}
\end{center}\end{frame}
\end{document}
You are missing a final closing brace in the headline
definition:
\documentclass{beamer}
\usetheme{CambridgeUS}
\makeatletter
\setbeamertemplate{headline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.75ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{section in head/foot}\insertshorttitle\hspace*{2ex}
\end{beamercolorbox}}% <- this closing brace was missing
}
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{title in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshortinstitute
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\author{The Author}
\title{The Title}
\institute{The Institute}
\begin{document}
\begin{frame}
test
\end{frame}
\end{document}
I took the liberty to slightly increase the height for the box in the headline (this is just a suggestion, of course, and you can revert to your original settings).
To suppress the headline
and footline
, use the plain
option for frame
; to suppress one template only, redefine it locally to be empty:
\documentclass{beamer}
\usetheme{CambridgeUS}
\makeatletter
\setbeamertemplate{headline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.75ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{section in head/foot}\insertshorttitle\hspace*{2ex}
\end{beamercolorbox}}%
}
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{title in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshortinstitute
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\author{The Author}
\title{The Title}
\institute{The Institute}
\begin{document}
\begin{frame}[plain]
test
\end{frame}
\begingroup
\setbeamertemplate{headline}{}
\begin{frame}
test
\end{frame}
\endgroup
\begingroup
\setbeamertemplate{footline}{}
\begin{frame}
test
\end{frame}
\endgroup
\begin{frame}
test
\end{frame}
\end{document}
Best Answer
The
spanish
module for babel offers various ways to do this without using\AtBeginDocument
.One possibility is to redefine the corresponding
\spanish<element-name>
command implemented by the module:It also provides the option
es-tabla
:It also has the
mexico
option that, amongst other things, translates "table" as "tabla" (as it is customary in Mexico and other Latin American countries):