在 Antibesbeamer
主题中,我想删除标题中显示子部分名称的栏,因为我的演示文稿中没有子部分。有人知道如何做到这一点吗?
答案1
Antibes主题使用了tree
外层主题,所以需要修改相应的headline
模板:
\documentclass{beamer}
\usetheme{Antibes}
\makeatletter
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,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}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}
\usebeamerfont{section in head/foot}%
\ifbeamer@tree@showhooks
\setbox\beamer@tempbox=\hbox{\insertsectionhead}%
\ifdim\wd\beamer@tempbox>1pt%
\hskip2pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
\hskip1pt%
\fi%
\else%
\hskip6pt%
\fi%
\insertsectionhead
\end{beamercolorbox}
% Code for subsections removed here
}
\makeatother
\begin{document}
\section{foo}
\subsection{foobar}
\begin{frame}{A frame}
Some text.
\end{frame}
\end{document}
考虑使用不同的外部主题,因为没有分支的树有点违背了目的。;-) 一个好的选择是
\useoutertheme[subsection=false]{miniframes}