Beamer - 停止页码编号

Beamer - 停止页码编号

我想停止对一些基本相同的幻灯片进行页码编排。有人知道怎么做吗?

我在下面附上了一个 (MWE) 示例。如您所见,在第一张幻灯片中,我用红色突出显示了第 1 列的标题,在第二张幻灯片(与上一张相同)中,我突出显示了第 2 列。Latex 计算两张幻灯片,而我只想计算第一张幻灯片。

\documentclass[10pt,notes=show,beamer]{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{mathpazo}
\usepackage{hyperref}
\usepackage{multimedia}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{color}


\setcounter{MaxMatrixCols}{10}

%%%%%%%%%%% BEAMER TEMPLATE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
{
    \usetheme[compress]{Singapore}
    \setbeamercovered{transparent}
}
\setbeamertemplate{footline}[frame number]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}


\begin{frame}{First slide}

\begin{table}
    \begin{tabular}{ll}
        \textcolor{red}{Column 1} & Column 2  \\
        \hline \hline
        num1    & num2   \\
        \hline
    \end{tabular}
\end{table}

\end{frame}

\begin{frame}{Second slide}

\begin{table}
    \begin{tabular}{ll}
        Column 1 & \textcolor{red}{Column 2}  \\
        \hline \hline
        num1    & num2   \\
        \hline
    \end{tabular}
\end{table}

\end{frame}

\end{document}

答案1

解决方案是命令\alert

\documentclass{beamer}
\mode<presentation>
{
    \usetheme[compress]{Singapore}
    \setbeamercovered{transparent}
}
\setbeamertemplate{footline}[frame number]
\begin{document}

\begin{frame}{First slide}

    \begin{table}
        \begin{tabular}{ll}
            \alert<1>{Column 1} & \alert<2>{Column 2}\\
            \hline \hline
            num1    & num2   \\
            \hline
        \end{tabular}
    \end{table}

\end{frame}
\end{document}

enter image description here

答案2

\only您知道 beamer添加的命令\visible吗?这些命令可能会对您有所帮助。如果您确实想使用两个frame环境,您可以将计数器减少 1 或使用方便的选项noframenumbering(后者可能是首选,因为它是beamer您希望您这样做的方式)。以下使用这两种方法:

\documentclass[10pt,notes=show,beamer]{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\usepackage{color}


%%%%%%%%%%% BEAMER TEMPLATE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
{
    \usetheme[compress]{Singapore}
    \setbeamercovered{transparent}
}
\setbeamertemplate{footline}[frame number]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}


\begin{frame}{First slide}

\begin{table}
    \begin{tabular}{ll}
        \textcolor{red}{Column 1} & Column 2  \\
        \hline \hline
        num1    & num2   \\
        \hline
    \end{tabular}
\end{table}

\end{frame}

%\addtocounter{framenumber}{-1}% possible alternative

\begin{frame}[noframenumbering]{Second slide}

\begin{table}
    \begin{tabular}{ll}
        Column 1 & \textcolor{red}{Column 2}  \\
        \hline \hline
        num1    & num2   \\
        \hline
    \end{tabular}
\end{table}

\end{frame}

\begin{frame}{combined}% >>>
  \begin{table}
    \begin{tabular}{ll}
      \only<1>{\textcolor{red}}{Column 1}
        & \only<2>{\textcolor{red}}{Column 2}\\
      \hline\hline
      num1 & num2 \\
      \hline
    \end{tabular}
  \end{table}
\end{frame}% <<<


\end{document}

正如 @samcarter 指出的那样,beamer将命令更改\textcolor为同时支持\textcolor<1>{red}{Column 1}\textcolor<2>{red}{Column 2}。因此,\only<1>{\textcolor{red}}{Column 1}也可以使用它。

相关内容