众所周知,人们可以在帧之间跳转例如使用超链接。
我不想跳到结尾,但要包括固定的框架。它们不应该是额外的。例如,我有汽车主题,并进行了一次关于发动机回到汽车的短途旅行。
当我添加中间的“发动机”部分时,我遇到了问题,即我的内容表显示了两次“汽车”部分和树状视图。
可以修复目录,\section*{car}
但不能修复“树视图”。
这是一个例子(我想要修改的是顶行的单词):
\documentclass{beamer}
%using my default theme
\usepackage{beamerthemesplit}
\usetheme{Dresden}
\setbeamertemplate{footline}[frame number]
\usecolortheme{beaver}
\usefonttheme{professionalfonts}
\useoutertheme{shadow}
\begin{document}
\begin{frame}
\frametitle{Overview}
\tableofcontents
\end{frame}
\section{cars}
\begin{frame}
\frametitle{there are so many different cars}
\begin{itemize}
\item Transmissions
\item Motors
\item Drive shafts
\end{itemize}
\end{frame}
\section{motors}
\begin{frame}
\frametitle{and motors are also interesting}
\begin{itemize}
\item big motor
\item small motor
\item tiny motor
\end{itemize}
\end{frame}
\section*{cars}
\begin{frame}
\frametitle{coming back to cars}
\begin{itemize}
\item Cars need fuel
\item Cars are expensive
\item Cars bring us from a to be
\end{itemize}
\end{frame}
\end{document}
是否有另一个命令可以确定下一帧并强制投影仪“重新排序”文档,或跳至末尾?
也许可以重置目录计数器?
谢谢你的帮助,问候
答案1
正如您所建议的,您可以通过一些反向操作获得成功。我添加了一个新的部分“交通堵塞”,以便您可以看到一切都按预期进行。
这是您的修改后的代码,其结果如上所示:
\documentclass{beamer}
%using my default theme
\usepackage{beamerthemesplit}
\usetheme{Dresden}
\setbeamertemplate{footline}[frame number]
\usecolortheme{beaver}
\usefonttheme{professionalfonts}
\useoutertheme{shadow}
\begin{document}
\begin{frame}
\frametitle{Overview}
\tableofcontents
\end{frame}
\section{cars}
% Save the section counter in the cars section
\newcounter{carscounter}\setcounter{carscounter}{\thesection}
\begin{frame}
\frametitle{there are so many different cars}
\begin{itemize}
\item Transmissions
\item Motors
\item Drive shafts
\end{itemize}
\end{frame}
\section{motors}
% Save the section counter in the motors section
\newcounter{motorscounter}\setcounter{motorscounter}{\thesection}
\begin{frame}
\frametitle{and motors are also interesting}
\begin{itemize}
\item big motor
\item small motor
\item tiny motor
\end{itemize}
\end{frame}
\begin{frame}
% Set section counter to the proviously stored value
\setcounter{section}{\value{carscounter}}
\frametitle{coming back to cars}
\begin{itemize}
\item Cars need fuel
\item Cars are expensive
\item Cars bring us from a to be
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{further things}
\begin{itemize}
\item Some more car things
\end{itemize}
\end{frame}
% Before adding the next section, we have to set the counter accordingly, so that everything is in correct order again (otherwise the top view panel will go crazy)
\setcounter{section}{\value{motorscounter}}
\section{traffic jams}
\begin{frame}
\frametitle{one major problem of cars are traffic jams}
\begin{itemize}
\item long traffic jams
\item short traffic jams
\item and, of course, boring ones
\end{itemize}
\end{frame}
\end{document}