我很好奇,对于 Beamer 树外部主题包来说,什么是有效的解决方法,可以实现两级导航而不是默认的三级导航。
例如,我比较偏爱这种格式:http://www.math.umbc.edu/~rouben/beamer/beamer_pstricks.pdf
在此演示文稿中,子小节是子节的水平树。我该如何做?任何意见都将不胜感激。
答案1
您可以headline
按照 中的定义重新定义模板beamerouterthemetree.sty
,以获得所需的布局;如下所示:
\documentclass{beamer}
\useoutertheme{tree}
\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
\usebeamerfont{subsection in head/foot}%
\ifbeamer@tree@showhooks
\setbox\beamer@tempbox=\hbox{\insertsubsectionhead}%
\ifdim\wd\beamer@tempbox>1pt%
\ \raise1.9pt\hbox{\vrule width 5pt height0.4pt}%
\hskip1pt%
\fi%
\else%
\hskip12pt%
\fi%
\insertsubsectionhead\hfill\insertframenumber/\inserttotalframenumber\hspace{0.5em}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
\makeatother
\title{Tree Outer Theme}
\begin{document}
\section{Test Section}
\begin{frame} test \end{frame}
\subsection{Test Subsection One}
\begin{frame} test \end{frame}
\subsection{Test Subsection Two}
\begin{frame} test \end{frame}
\end{document}
生成的标题的一些图像显示了所需的布局:
和