我正在使用模板进行演示,我希望目录显示在为其定义的框架中,而不是其他地方。但它一直显示在每一节的开头,我不明白模板代码的哪一部分实现了这一点。
\documentclass[xcolor=table]{beamer}
% \usepackage[table]{xcolor}
\usepackage{ctex, hyperref}
\usepackage[T1]{fontenc}
% other packages
\usepackage{latexsym,amsmath,xcolor,multicol,booktabs,calligra}
\usepackage{graphicx,pstricks,listings,stackengine}
\usepackage{wrapfig,tikz}
\author{My name}
\title{My title}
\institute{My school}
\date{the date}
\usepackage{whu}
% defs
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{deepblue},
emphstyle=\ttfamily\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
numbers=left,
numberstyle=\small\color{halfgray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
}
\begin{document}
\kaishu
\begin{frame}
\titlepage
\begin{figure}[htpb]
\begin{center}
\includegraphics[width=0.15\linewidth]{pic/whulogo.jpeg}
\end{center}
\end{figure}
\end{frame}
\begin{frame}
\tableofcontents[sectionstyle=show,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
\end{frame}
% \section{thing}
% [...]
\end{document}
StackExchange 上其他人对此的问题似乎更感兴趣的是除了特定部分的开头之外的所有地方都显示目录。我如何让它在专用框架之外的所有地方消失?
答案1
假设这是whu
你正在使用的主题https://github.com/Xinchen-Fan/WHU-Beamer-Theme/blob/master/whu.sty然后你可以使用以下方法隐藏新章节开头的目录:\AtBeginSection{}
\documentclass[xcolor=table]{beamer}
% \usepackage[table]{xcolor}
%\usepackage{ctex, hyperref}
\usepackage[T1]{fontenc}
% other packages
\usepackage{latexsym,amsmath,xcolor,multicol,booktabs,calligra}
\usepackage{graphicx,pstricks,listings,stackengine}
\usepackage{wrapfig,tikz}
\author{My name}
\title{My title}
\institute{My school}
\date{the date}
\usepackage{whu}
% defs
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{deepblue},
emphstyle=\ttfamily\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
numbers=left,
numberstyle=\small\color{halfgray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
}
\AtBeginSection{}
\begin{document}
%\kaishu
\begin{frame}
\titlepage
\begin{figure}[htpb]
\begin{center}
\includegraphics[width=0.15\linewidth]{example-image-duck}
\end{center}
\end{figure}
\end{frame}
\begin{frame}
\tableofcontents[sectionstyle=show,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
\end{frame}
\section{thing}
\begin{frame}
content...
\end{frame}
% [...]
\end{document}