我们如何改变幻灯片编号的位置?例如,沿 y 轴向上移动 1 厘米?
\documentclass{beamer}
\usepackage{datetime}
\ddmmyyyydate
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\definecolor{prussian}{RGB}{0,44,98}
\definecolor{prussiangrey}{RGB}{98,99,104}
\title{\textbf{Some Presentation}}
% Decrease 0.5 to make closer to the author name.
\author{Dr~Emel~Aktas \\ \vspace{0.5\baselineskip} \small \today}
\date{}
\subject{Some Presentation}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{footline}[frame number]
\setbeamercolor{page number in head/foot}{fg=red}
\setbeamercolor{title}{fg=black}
\setbeamercolor{subtitle}{fg=prussian}
\setbeamercolor{frametitle}{fg=prussiangrey}
\setbeamercolor{itemize item}{fg=prussian}
\setbeamercolor{itemize subitem}{fg=prussian}
\setbeamercolor{enumerate item}{fg=prussian}
\setbeamercolor{enumerate subitem}{fg=prussian}
\setbeamercolor{section in toc}{fg=prussian}
\setbeamerfont{frametitle}{series=\bfseries}
\begin{document}
\setbeamertemplate{itemize items}[square]
% Increase 3.5 to move away from the line on southwest corner
\addtobeamertemplate{title page}{\vspace{3.5\baselineskip}}{}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{First Section}
\subsection{First Subsection}
\begin{frame}{First Slide Title}{Optional Subtitle}
\begin{enumerate}
\item {
My first point.
}
\item {
My second point.
}
\end{enumerate}
\end{frame}
\end{document}
答案1
一个选项,以与 中定义的选项footline
类似的方式重新定义模板。您可以通过更改我在标有 的部分中使用的长度来调整所需的位置:frame number
beamerbaseauxtemplates.sty
<--- change here
\documentclass{beamer}
\usepackage{datetime}
\ddmmyyyydate
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\definecolor{prussian}{RGB}{0,44,98}
\definecolor{prussiangrey}{RGB}{98,99,104}
\title{\textbf{Some Presentation}}
% Decrease 0.5 to make closer to the author name.
\author{Dr~Emel~Aktas \\ \vspace{0.5\baselineskip} \small \today}
\date{}
\subject{Some Presentation}
\beamertemplatenavigationsymbolsempty
\setbeamercolor{page number in head/foot}{fg=red}
\setbeamercolor{title}{fg=black}
\setbeamercolor{subtitle}{fg=prussian}
\setbeamercolor{frametitle}{fg=prussiangrey}
\setbeamercolor{itemize item}{fg=prussian}
\setbeamercolor{itemize subitem}{fg=prussian}
\setbeamercolor{enumerate item}{fg=prussian}
\setbeamercolor{enumerate subitem}{fg=prussian}
\setbeamercolor{section in toc}{fg=prussian}
\setbeamerfont{frametitle}{series=\bfseries}
\defbeamertemplate{footline}{myframe number}
{
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\raisebox{1cm}[0pt][0pt]{% <--- change here
\insertframenumber\,/\,\inserttotalframenumber\kern1em}%
}
\setbeamertemplate{footline}[myframe number]
\begin{document}
\setbeamertemplate{itemize items}[square]
% Increase 3.5 to move away from the line on southwest corner
\addtobeamertemplate{title page}{\vspace{3.5\baselineskip}}{}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{First Section}
\subsection{First Subsection}
\begin{frame}{First Slide Title}{Optional Subtitle}
\begin{enumerate}
\item {
My first point.
}
\item {
My second point.
}
\end{enumerate}
\end{frame}
\end{document}
答案2
基本上一样Gonzalo Medina 的回答(快了 1 分钟),但是\raisebox
您可以简单地对 的值进行一些玩弄\vskip20pt
。
\documentclass{beamer}
\defbeamertemplate{footline}{higher page number}
{%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip20pt%
}
\setbeamertemplate{footline}[higher page number]
\begin{document}
\begin{frame}
test
\end{frame}
\end{document}
警告:
请注意,此解决方案的缺点是整个脚注的大小会增加,从而导致文本主体的空间减少。但在某些情况下,例如投影仪会切掉幻灯片的下半部分,这可能会有所帮助。
[代码\defbeamertemplate{footline}{page number}
取自beamerbaseauxtemplates.sty
]