我正在努力解决以下问题:
\documentclass{beamer}
\mode<presentation>
{
\usetheme{default} % nebo zkuste Darmstadt, Madrid, Warsaw,...
\usecolortheme{default} % nebo zkuste albatross, beaver, crane, ...
\usefonttheme{default} % nebo zkuste serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\newenvironment{squareenv}{\only{\setbeamertemplate{items}[square]}}{}
\usepackage{amsthm}
\setbeamertemplate{theorems}[numbered] % to number
\usepackage{verbatim}
%%% PAGE NUMBERING
\defbeamertemplate{footline}{page number appendix}
{%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertpagenumber\kern1em\vskip2pt%
}
\makeatletter
\g@addto@macro\appendix{%
}
\makeatother
\usepackage{appendixnumberbeamer}
\newenvironment{myframe}{
\makeatletter
\setbeamertemplate{footline}{}
\makeatother
\begin{frame}}
{\end{frame}}
\addtobeamertemplate{navigation symbols}{}{ \hspace{2em} \usebeamerfont{footline}%
\insertframenumber / \inserttotalframenumber }
\begin{frame}[noframenumbering,plain]
\titlepage
\end{frame}
即使我指定[noframenumbering,plain]
页面显示如下:
请注意,页码在页面末尾半隐藏。因此,似乎这里的普通选项只是“部分隐藏”了页码。为什么?我做错了吗?我希望页码在某些幻灯片中完全不显示。
谢谢你,
费德里科
答案1
您正在滥用navigation symbols
模板来显示页码。无论是否显示,此模板都会显示在所有框架上plain
。
如果您希望帧编号尊重plain
帧,请将它们放在脚注中:
\documentclass{beamer}
\mode<presentation>
{
\usetheme{default} % nebo zkuste Darmstadt, Madrid, Warsaw,...
\usecolortheme{default} % nebo zkuste albatross, beaver, crane, ...
\usefonttheme{default} % nebo zkuste serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\newenvironment{squareenv}{\only{\setbeamertemplate{items}[square]}}{}
\usepackage{amsthm}
\setbeamertemplate{theorems}[numbered] % to number
\usepackage{verbatim}
\setbeamertemplate{page number in head/foot}[appendixframenumber]%
\setbeamertemplate{footline}{%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate*{page number in head/foot}\kern1em\vskip2pt%
}
\begin{document}
\begin{frame}[noframenumbering,plain]
\titlepage
\end{frame}
\begin{frame}
test
\end{frame}
\appendix
\begin{frame}
test
\end{frame}
\end{document}