我有一个带侧边栏的投影仪演示文稿,但目录太长,无法容纳,例如这家伙。不同之处在于我使用的是自定义主题(只是颜色修改过的 Boadilla,因此下面的 MWE 也做了同样的事情:
\documentclass[a4paper]{beamer}
\usetheme{Boadilla} % load `/usr/share/texlive/texmf-dist/tex/latex/beamer/themes/theme/beamerthemeBoadilla.sty`
\useoutertheme[left]{sidebar}
\title{PhD stuff}
\author{Me \textsc{Myself}}
\date{\today}
\begin{frame}[plain]{}
\titlepage
\end{frame}
\begin{frame}[plain, allowframebreaks]
\tableofcontents
\end{frame}
\section{Introduction}
\subsection{The genetics of speciation}\begin{frame}{}\end{frame}
\subsection{Models of diversification}\begin{frame}{}\end{frame}
\subsection{Consequences of gene duplication}\begin{frame}{}\end{frame}
\subsection{Fates of gene duplicates}\begin{frame}{}\end{frame}
\subsection{Population genetics models for the fate of gene duplicates}\begin{frame}{}\end{frame}
\subsection{How to narrow down the topic?}\begin{frame}{}\end{frame}
\section{Date gene duplications}
\subsection{Method: infer synonymous substitution rates}
\subsubsection{pipeline}\begin{frame}{}\end{frame}
\subsection{Method: convert synonymous substitution rates to million years}\begin{frame}{}\end{frame}
\subsection{Method: data pre-filtering}\begin{frame}{}\end{frame}
\subsection{A methodological bias?}\begin{frame}{}\end{frame}
\section{Evaluating hypothetical bias}
\subsection{Do some gene trees have ``incorrect'' branch lengths?}\begin{frame}{}\end{frame}
\subsection{Unequal branch lengths biasing MPL?}\begin{frame}{}\end{frame}
\subsection{Wrong codeml computation?}\begin{frame}{}\end{frame}
\subsection{Are input tree topologies wrong?}
\subsubsection{Which distance measure is best? treebest VS codeml dS}\begin{frame}{}\end{frame}
\section[Correlation between duplication and diversification]{Next: phylogenetic
\subsection{Existing phylogenetic correlation tools}\begin{frame}{}\end{frame}
\subsubsection{trait VS trait}\begin{frame}{}\end{frame}
\subsubsection{trait VS tree (diversification)}\begin{frame}{}\end{frame}
\end{document}
我想避免将代码放在演示文稿本身中(如建议的那样这里), 反而在主题里面,以便可重复使用。
我需要在 beamertheme 文件中添加以下内容:
- 仅显示当前部分的子部分,例如解决方案 2,使用相当于
\tableofcontents[currentsection, hideothersubsections]
? - 随着我进行演讲,逐渐“向下滚动”目录,以当前章节和小节为中心?
提前感谢任何帮助/建议:)
答案1
如何使用\useoutertheme[hideothersubsections,left]{sidebar}
?这将仅显示当前部分的小节。
\documentclass[a4paper]{beamer}
\usetheme{Boadilla}
\useoutertheme[hideothersubsections,left]{sidebar}
\title{PhD stuff}
\author{Me \textsc{Myself}}
\date{\today}
\begin{document}
\begin{frame}[plain]{}
\titlepage
\end{frame}
\begin{frame}[plain, allowframebreaks]
\tableofcontents
\end{frame}
\section{Introduction}
\subsection{The genetics of speciation}\begin{frame}{}\end{frame}
\subsection{Models of diversification}\begin{frame}{}\end{frame}
\subsection{Consequences of gene duplication}\begin{frame}{}\end{frame}
\subsection{Fates of gene duplicates}\begin{frame}{}\end{frame}
\subsection{Population genetics models for the fate of gene duplicates}\begin{frame}{}\end{frame}
\subsection{How to narrow down the topic?}\begin{frame}{}\end{frame}
\section{Date gene duplications}
\subsection{Method: infer synonymous substitution rates}
\subsubsection{pipeline}\begin{frame}{}\end{frame}
\subsection{Method: convert synonymous substitution rates to million years}\begin{frame}{}\end{frame}
\subsection{Method: data pre-filtering}\begin{frame}{}\end{frame}
\subsection{A methodological bias?}\begin{frame}{}\end{frame}
\section{Evaluating hypothetical bias}
\subsection{Do some gene trees have ``incorrect'' branch lengths?}\begin{frame}{}\end{frame}
\subsection{Unequal branch lengths biasing MPL?}\begin{frame}{}\end{frame}
\subsection{Wrong codeml computation?}\begin{frame}{}\end{frame}
\subsection{Are input tree topologies wrong?}
\subsubsection{Which distance measure is best? treebest VS codeml dS}\begin{frame}{}\end{frame}
\section[Correlation between duplication and diversification]{Next: phylogenetic}
\subsection{Existing phylogenetic correlation tools}\begin{frame}{}\end{frame}
\subsubsection{trait VS trait}\begin{frame}{}\end{frame}
\subsubsection{trait VS tree (diversification)}\begin{frame}{}\end{frame}
\end{document}