您丢失了一些文本。!LaTeX 错误:不在外部模式

您丢失了一些文本。!LaTeX 错误:不在外部模式

我在尝试编译此框架时收到上述错误消息:

\documentclass[11pt]{beamer}
\usetheme{Singapore}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{grffile}
\usepackage{xcolor}
\usepackage{todonotes}
\usepackage[round]{natbib}
\numberwithin{equation}{section}
\usepackage{fancyhdr}
\usepackage{ragged2e}
\usepackage{etoolbox}
\apptocmd{\frame}{}{\justifying}{}
\usepackage[varioref=false]{chemstyle} 
\usepackage{mhchem,chemfig} 
\usepackage{flowchart} 
\usepackage{float}
\usepackage[lofdepth=2]{subfig}
\setbeamercovered{transparent} 
\setbeamertemplate{navigation symbols}{}
\usepackage{booktabs} 
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}

\begin{document}
\begin{frame}
\frametitle{Empirical Framework}
\begin{table}[htb!]
\caption{Previous Studies}
\begin{center}
\begin{tabular}{clcl}
\toprule
\multicolumn{4}{c}{Lerner Index Model results in other studies}\\
\midrule
Author(s)   &   Sample (\# of African countries &   Periods &   Results \\
\midrule
Amidu and Wolfe (2013)  &   55 Developing countries (22)    &   2000-2007   &       \\
Turk Ariss (2010)   &   60 Developing countries (14)    &   1999-2005   &       \\
Beck et al. (2013)  &   79 countries    &   1994-2009   &       \\
Agoraki et al. (2011)   &   13 CEE countries    &   1998-2005   &       \\
Fu et al. (2014)    &   14 Asian countries  &   2003-2010   &       \\
Berger et al. (2009)    &   23 industrialized countries     &   1999-2005   &       \\
Kouki and Al-Nasser (2014)  &   31 African countries    &   2005-2010   &       \\
de Guevara and Maudos (2011)    &       &   1993-2003   &       \\
Aboagye et al. (2008)   &   Ghana   &   2001-2006   &       \\
Weill (2013)    &   22 EU countries &   2002-2010   &       \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{frame}

\end{document}

答案1

问题是chemstyle似乎与 不能很好地配合table。幸运的是坎帕进行了一些挖掘并发现罪魁祸首是chemstyle加载floatrow与 beamer 不兼容(并且没有意义的)的包。

因此有两种可能性:

  1. 消除\usepackage[varioref=false]{chemstyle}
\documentclass[11pt]{beamer}
\usetheme{Singapore}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{grffile}
%\usepackage{xcolor}
\usepackage{todonotes}
\usepackage[round]{natbib}
\numberwithin{equation}{section}
\usepackage{fancyhdr}
\usepackage{ragged2e}
\usepackage{etoolbox}
\apptocmd{\frame}{}{\justifying}{}
%\usepackage[varioref=false]{chemstyle} 
\usepackage{mhchem,chemfig} 
\usepackage{flowchart} 
%\usepackage{float}
\usepackage[lofdepth=2]{subfig}
\setbeamercovered{transparent} 
\setbeamertemplate{navigation symbols}{}
\usepackage{booktabs} 
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}

\begin{document}
\begin{frame}
\frametitle{Empirical Framework}
\begin{table}
\caption{Previous Studies}
\tiny
\begin{tabular}{clcl}
\toprule
\multicolumn{4}{c}{Lerner Index Model results in other studies}\\
\midrule
Author(s)   &   Sample (\# of African countries &   Periods &   Results \\
\midrule
Amidu and Wolfe (2013)  &   55 Developing countries (22)    &   2000-2007   &       \\
Turk Ariss (2010)   &   60 Developing countries (14)    &   1999-2005   &       \\
Beck et al. (2013)  &   79 countries    &   1994-2009   &       \\
Agoraki et al. (2011)   &   13 CEE countries    &   1998-2005   &       \\
Fu et al. (2014)    &   14 Asian countries  &   2003-2010   &       \\
Berger et al. (2009)    &   23 industrialized countries     &   1999-2005   &       \\
Kouki and Al-Nasser (2014)  &   31 African countries    &   2005-2010   &       \\
de Guevara and Maudos (2011)    &       &   1993-2003   &       \\
Aboagye et al. (2008)   &   Ghana   &   2001-2006   &       \\
Weill (2013)    &   22 EU countries &   2002-2010   &       \\
\bottomrule
\end{tabular}
\end{table}
\end{frame}

\end{document}
  1. 不要使用table
\documentclass[11pt]{beamer}
\usetheme{Singapore}
\usepackage{chemstyle} 
\usepackage{booktabs} 
\usepackage{caption}

\begin{document}
\begin{frame}
\frametitle{Empirical Framework}
\captionof{table}{Previous Studies}
\centering
\tiny
\begin{tabular}{clcl}
\toprule
\multicolumn{4}{c}{Lerner Index Model results in other studies}\\
\midrule
Author(s)   &   Sample (\# of African countries &   Periods &   Results \\
\midrule
Amidu and Wolfe (2013)  &   55 Developing countries (22)    &   2000-2007   &       \\
Turk Ariss (2010)   &   60 Developing countries (14)    &   1999-2005   &       \\
Beck et al. (2013)  &   79 countries    &   1994-2009   &       \\
Agoraki et al. (2011)   &   13 CEE countries    &   1998-2005   &       \\
Fu et al. (2014)    &   14 Asian countries  &   2003-2010   &       \\
Berger et al. (2009)    &   23 industrialized countries     &   1999-2005   &       \\
Kouki and Al-Nasser (2014)  &   31 African countries    &   2005-2010   &       \\
de Guevara and Maudos (2011)    &       &   1993-2003   &       \\
Aboagye et al. (2008)   &   Ghana   &   2001-2006   &       \\
Weill (2013)    &   22 EU countries &   2002-2010   &       \\
\bottomrule
\end{tabular}
\end{frame}

\end{document}

在此处输入图片描述


除此之外,清理软件包可能是一个好主意。您不需要xcolor使用 beamer,因为它已经提供了这些功能。

\usepackage{fancyhdr}在投影机中这是否\usepackage{float}有意义?

相关内容