我正在使用华沙主题。我通过“谷歌搜索”找到了一个代码来添加帧编号。举个简单的例子:
\documentclass[table]{beamer}
\usetheme{Warsaw}
\usepackage{graphicx}
\usepackage{color}
\defbeamertemplate*{footline}{shadow theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertframenumber\,/\,\inserttotalframenumber\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}}%
\vskip0pt%
}
\title{Linearized Model}
\subtitle{Results from Numerical Implementation}
\author[DA, GC]{\underline{First Author}, Second Author}
\date{\today}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Presentation Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Overview of VENU Model}
\begin{frame}
\frametitle{Motivations for the Modeling\ldots}
\begin{itemize}
\item BlaBla
\item BlaBla
\item BlaBla
\item BlaBla
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Original work; 2012}
\begin{itemize}
\pause \item BlaBla
\pause \item BlaBla
\pause \item BlaBla
\end{itemize}
\end{frame}
\end{document}
帧编号按预期显示。问题:1) 我应该在序言中添加什么以避免标题页(第一页)的帧编号。演示文稿大纲中的编号应从 2 继续。
2)如果我想让编号从演示大纲开始(即标题页根本不算在总页数中),该怎么办?
3)我应该如何修改上述代码以便将编号移动到右角而不是左角;
添加 \begin{frame}[noframenumbering] \titlepage \end{frame}
结果是从 0 开始编号但仍然不是我想要的。
提前致谢。
答案1
1) 我应该在序言中添加什么内容以避免标题页(第一页)的帧编号。 编号应从演示文稿大纲中的 2 继续。
如果你使用
\begin{frame}
\titlepage
\end{frame}
大纲的数量为 2。为了不在标题框上打印框号,请使用[plain]
删除页脚的选项或重新定义标题页的页脚。
2)如果我想让编号从演示大纲开始(即标题页根本不算在总页数中),该怎么办?
这正是
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
您在问题中提到过,确实如此。
3)我应该如何修改上述代码以便将编号移动到右角而不是左角;
移动\insertframenumber\,/\,\inserttotalframenumber
到页脚的另一侧
\documentclass[table]{beamer}
\usetheme{Warsaw}
\usepackage{graphicx}
\usepackage{color}
\defbeamertemplate*{footline}{shadow theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber%
\end{beamercolorbox}}%
\vskip0pt%
}
\title{Linearized Model}
\subtitle{Results from Numerical Implementation}
\author[DA, GC]{\underline{First Author}, Second Author}
\date{\today}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Presentation Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
{
\setbeamertemplate{footline}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}}%
\vskip0pt%
}
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
}
\section{Overview of VENU Model}
\begin{frame}
\frametitle{Motivations for the Modeling\ldots}
\begin{itemize}
\item BlaBla
\item BlaBla
\item BlaBla
\item BlaBla
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Original work; 2012}
\begin{itemize}
\pause \item BlaBla
\pause \item BlaBla
\pause \item BlaBla
\end{itemize}
\end{frame}
\end{document}
答案2
为标题页设置单独的页脚,在标题页后1
减去framenumber
:
\documentclass[table]{beamer}
\usetheme{Warsaw}
\usepackage{graphicx}
\usepackage{color}
\defbeamertemplate*{footline}{shadow theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
\mbox{}\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle \hfill \insertframenumber\,/\,\inserttotalframenumber%
\end{beamercolorbox}}%
\vskip0pt%
}
\title{Linearized Model}
\subtitle{Results from Numerical Implementation}
\author[DA, GC]{\underline{First Author}, Second Author}
\date{\today}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Presentation Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
{\setbeamertemplate{footline}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\mbox{}\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}}%
\vskip0pt%
}
\begin{frame}
\titlepage
\end{frame}
}
\addtocounter{framenumber}{-1} %% add this here
\section{Overview of VENU Model}
\begin{frame}
\frametitle{Motivations for the Modeling\ldots}
\begin{itemize}
\item BlaBla
\item BlaBla
\item BlaBla
\item BlaBla
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Original work; 2012}
\begin{itemize}
\pause \item BlaBla
\pause \item BlaBla
\pause \item BlaBla
\end{itemize}
\end{frame}
\end{document}