我拥有与我的柏林主题 Beamer 演示所需的导航符号风格完全相同的导航符号风格:
\documentclass[xcolor=dvipsnames,compress]{beamer}
\usetheme{Berlin}
\makeatletter
\beamer@theme@subsectionfalse
\makeatother
\setbeamertemplate{navigation symbols}{}
\useoutertheme{miniframes}
\setbeamertemplate{mini frame in other subsection}{}
\usepackage{etoolbox}
\makeatletter
\beamer@compressfalse
\patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{}{}{}
\patchcmd{\sectionentry}{\beamer@section@set@min@width}{}{}{}
\patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{}{}{}
\patchcmd{\sectionentry}{\hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot shaded}}}}{}{}{}
\patchcmd{\slideentry}{\beamer@ypos=#2\relax}{}{}{}
\patchcmd{\fakeslideentry}{\beamer@ypos=#2\relax}{}{}{}
\makeatother
\makeatletter
\patchcmd{\slideentry}{\advance\beamer@tempdim by -.05cm{\advance\beamer@tempdim by\beamer@vboxoffset\advance\beamer@tempdim by\beamer@boxsize\advance\beamer@tempdim by 1.2\pgflinewidth}{}{}
\patchcmd{\slideentry}{\kern\beamer@tempdim}{\advance\beamer@tempdim by 2pt\advance\beamer@tempdim by\wd\beamer@sectionbox\kern\beamer@tempdim}{}{}
\makeatother
\author[sklum]{sklum}
\title{mytitle}
\institute[myinst]{
institution \\
}
\begin{document}
\section{Sec00}
\subsection{Sec00} {
\begin{frame}{001}
\end{frame}
\begin{frame}{002}
\end{frame}
}
\end{document}
使用答案这里和这里,此代码使导航符号仅出现在部分中,并且符号直接出现在部分标题的右侧。但是,我想将包含导航符号的页眉移动到页脚的最下部分(即我的名字和标题下方)。不幸的是,答案这里不适用于柏林主题。
这可能吗?
答案1
Berlin 主题使用的miniframes
主题具有将作者和机构放在页脚中的选项,但所有导航都定义为在标题中。因此,您需要定义一个footline
包含标题、作者机构和导航的新模板。这是我在下一个代码中所做的。我从定义中复制了headline
定义beamerouterthememiniframes.sty
并将其插入到footline
定义之后。您的补丁也适用。您还需要使用一个空的headline
。
\documentclass[xcolor=dvipsnames,compress]{beamer}
\usepackage{etoolbox}
\usetheme{Berlin}
\makeatletter
\beamer@theme@subsectionfalse
\makeatother
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{mini frame in other subsection}{}
\setbeamertemplate{headline}{}
\makeatletter
\beamer@compressfalse
\patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{}{}{}
\patchcmd{\sectionentry}{\beamer@section@set@min@width}{}{}{}
\patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{}{}{}
\patchcmd{\sectionentry}{\hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot shaded}}}}{}{}{}
\patchcmd{\slideentry}{\beamer@ypos=#2\relax}{}{}{}
\patchcmd{\fakeslideentry}{\beamer@ypos=#2\relax}{}{}{}
\makeatother
\makeatletter
\patchcmd{\slideentry}{\advance\beamer@tempdim by -.05cm}{\advance\beamer@tempdim by\beamer@vboxoffset\advance\beamer@tempdim by\beamer@boxsize\advance\beamer@tempdim by 1.2\pgflinewidth}{}{}
\patchcmd{\slideentry}{\kern\beamer@tempdim}{\advance\beamer@tempdim by 2pt\advance\beamer@tempdim by\wd\beamer@sectionbox\kern\beamer@tempdim}{}{}
\makeatother
\author[sklum]{sklum}
\title{mytitle}
\institute[myinst]{
institution \\
}
\makeatletter
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
\hfill%
{\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
\end{beamercolorbox}%
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
{\usebeamerfont{title in head/foot}\insertshorttitle}%
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
\end{beamercolorbox}
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip2pt
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\insertsubsectionhead
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
\makeatother
\begin{document}
\section{Sec00}
\subsection{Sec00} {
\begin{frame}{001}
\end{frame}
\begin{frame}{002}
\end{frame}
}
\section{Sec01}
\subsection{Sec01} {
\begin{frame}{001}
\end{frame}
\begin{frame}{002}
\end{frame}
}
\end{document}