在一頁的 Beamer 簡報中,我想去掉標題。我寧願保留背景,但去掉章節和小節的名稱。怎麼可能做到這一點?
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{top}
\vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{bottom}
\usebeamerfont{subsection in head/foot}\insertsubsectionhead
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
} \mode <all>
答案1
如果你想隱藏完整的標題,可以在本地重新定義模板headline
為空:
\documentclass{beamer}
\usetheme{CambridgeUS}
\begin{document}
\begin{frame}
test frame
\end{frame}
\begingroup
\setbeamertemplate{headline}{}
\begin{frame}
test frame with empty headline
\end{frame}
\endgroup
\begin{frame}
test frame
\end{frame}
\end{document}
如果您只想抑制部分和子部分的導航訊息,則需要做更多的工作;您需要headline
按照所使用的外部主題中的定義重新定義範本。例如,使用給定的headline
模板,可以定義一個命令,例如\nosecinhead
,以抑制某些幀的標題中的導覽列;要使用這個命令,你所要做的就是說
\begingroup
\nosecinhead
正確的前 \begin{frame}
, 進而
\endgroup
正確的後 \end{frame}
,如以下示例所示(我假設top
和bottom
顏色已在某處定義;我提供了一些特別指定僅用於範例):
\documentclass[svgnames,x11names]{beamer}
\setbeamercolor{top}{fg=white,bg=red}
\setbeamercolor{bottom}{fg=white,bg=blue}
\setbeamercolor{lower separation line head}{bg=LightSteelBlue3}
\newcommand\nosecinhead{%
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{top}
\vskip2pt\mbox{}
\end{beamercolorbox}%
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{bottom}
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}%
}
\begin{document}
\section{test}
\begin{frame}
test frame
\end{frame}
\begingroup
\nosecinhead
\begin{frame}
test frame with modified headline
\end{frame}
\endgroup
\begin{frame}
test frame
\end{frame}
\end{document}
答案2
\documentclass{beamer}
\title{How to use Beamer}
\subtitle{from novice to professional}
\author{Aggresive User}
\date{\today}
\institute{\TeX\ User Group}
\usetheme{AnnArbor}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Table of Contents}
\tableofcontents
\end{frame}
\bgroup
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{example-grid-100x100pt.pdf}}
\begin{frame}[plain]
What is your next question \scalebox{10}{\bf ?}
\end{frame}
\egroup
\end{document}