问题描述
我在倒数第二行第 14 行遇到错误,/end{frame}:“未定义的控制序列”。有人知道为什么吗?
梅威瑟:
\documentclass[10pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}
\setbeamertemplate{section in toc}[sections numbered]
\usepackage{color}
\usepackage{framed}
\usepackage{alltt}
\usepackage{relsize}
\usepackage{color, colortbl}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[rightcaption]{sidecap}
\usepackage{mwe}
\usepackage{graphbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%% Link to proof button and placement
\setbeamercolor{button}{bg=white,fg=darkgray}
%%%%%%%%%%%%%%%%%%%%%%%%%%% R syntax template
\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
\def\at@end@of@kframe{}%
\ifinner\ifhmode%
\def\at@end@of@kframe{\end{minipage}}%
\begin{minipage}{\columnwidth}%
\fi\fi%
\def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
\colorbox{shadecolor}{##1}\hskip-\fboxsep
% There is no \\@totalrightmargin, so:
\hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
\MakeFramed {\advance\hsize-\width
\@totalleftmargin\z@ \linewidth\hsize
\@setminipage}}%
{\par\unskip\endMakeFramed%
\at@end@of@kframe}
\makeatother
\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX
\usepackage{alltt}
\expandafter\let\csname [email protected]\endcsname\relax
\definecolor{fgcolor}{rgb}{0.2, 0.2, 0.2}
%%%%%%%%%%%%%%%%%%%%%%%%%%% end R syntax template
%%%%%%%%%%%%%%%%%%%%%%%%%%% collor for table column/row to highligh in lightgray
\usepackage{color, colortbl}
\colorlet{verylightgray}{gray!25}
%%%%%%%%%%%%%%%%%%%%%%%%%%% end collor
%%%%%%%%%%%%%%%%%%%%%%%%%%% resize the \rhd symbol
\usepackage{relsize}
\newcommand{\smallsymb}[1]{\mathsmaller{\mathsmaller{#1}}}
\newcommand{\bt}{\smallsymb{\blacktriangleright}}
%%%%%%%%%%%%%%%%%%%%%%%%%%% end resize
%%%%%%%%%%%%%%%%%%%%%%%%%%% skull symbol
\DeclareFontFamily{U}{skulls}{}
\DeclareFontShape{U}{skulls}{m}{n}{ <-> skull }{}
\newcommand{\skull}{\text{\usefont{U}{skulls}{m}{n}\symbol{'101}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%% end resize
\DeclareMathOperator\symdif{\triangle}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\renewcommand{\le}{\leqslant}
\renewcommand{\ge}{\geqslant}
\newcommand{\sbigcup}{{\textstyle\bigcup}}
\newcommand{\sbigcap}{{\textstyle\bigcap}}
\newcommand{\eps}{\varepsilon}
\DeclareMathOperator\var{\text{var}}
\DeclareMathOperator\cov{\text{cov}}
\DeclareMathOperator\sign{\text{sign}}
\DeclareMathOperator\std{\text{std}}
%\DeclareMathOperator\corr{\text{corr}}
\newcommand{\corr}{\mathop{\text{corr}}}
\newcommand{\argmin}{\mathop{\arg\min}}
%\DeclareMathOperator\argmax{\arg\max}
\newcommand{\compl}[1]{\overline{#1}}
\newcommand{\dsty}{\displaystyle}
\newcommand{\thetah}{\hat{\theta}}
\newcommand{\thetab}{\boldsymbol{\theta}}
\newcommand{\bX}{\bar{X}}
\newcommand{\bY}{\bar{Y}}
\newcommand{\by}{\bar{y}}
\newcommand{\hp}{\hat{p}}
\newcommand{\rmd}{\mathrm{d}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\Y}{{\cal Y}}
\newcommand{\Z}{{\cal Z}}
\newcommand{\cadre}[1]{\fbox{$\displaystyle{#1}$}}
\newcommand{\rrt}{\raggedright}
\newcommand{\Ber}{\operatorname{Ber}}
\newcommand{\Beta}{\operatorname{B\hat{e}ta}}
\newcommand{\Bin}{\operatorname{Bin}}
\newcommand{\Exp}{\operatorname{Exp}}
\newcommand{\Gam}{\operatorname{Gam}}
\newcommand{\Geo}{\operatorname{G\acute{e}o}}
\newcommand{\Poi}{\operatorname{Poi}}
\newcommand{\Uni}{\operatorname{Uni}}
\newcommand{\Hyp}{\operatorname{Hyp}}
\newcommand{\NB}{\operatorname{NB}}
\newcommand{\eff}{\operatorname{eff}}
\newcommand{\argmax}{\operatorname{\arg\max}}
\begin{document}{\setbeamertemplate{footline}{}
\begin{frame}
\begin{center}
\large{\textbf{\textcolor{blue}{Faculté de psychologie}}}
\vspace{1cm}
{\large{\textbf{\textcolor{red}{Statistique II: Inférence pour une et deux variables\\Probabilités}}}}
\vspace{1.5cm}
{\large
\tcr{\textbf{\textcolor{blue}{Support à l’exposé oral}}} }\\[3mm]
\end{center}
\begin{flushright}
\textcolor{green}{
Titulaire\\
Bernadette Govaerts\\
LSBA/SC\\
UCLouvain
}
\end{flushright}
\end{frame}
\end{document}
答案1
命令\tcr
未定义。这就是 LaTeX 告诉您的内容。